IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Lib.Old.Reporter Class Reference

Base IG class for reporting, tracing and logging; provides a global reporter and a basis for creation of local reporters. This class is identical to the IGLib class (copied directly). IN EFA, refer to the derived class Reporter! More...

+ Inheritance diagram for IG.Lib.Old.Reporter:
+ Collaboration diagram for IG.Lib.Old.Reporter:

Public Member Functions

 Reporter ()
 Constructor. Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null. More...
 
 Reporter (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate, ReserveReportErrorDelegate reservereportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values. More...
 
 Reporter (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values. More...
 
 Reporter (object obj, ReportDelegate reportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems. More...
 
 Reporter (object obj, ReportDelegate reportdelegate, ReserveReportErrorDelegate reservereportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems. More...
 
void Init (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate, ReserveReportErrorDelegate reservereportdelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values. More...
 
void Init ()
 Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null. More...
 
void Init (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values. More...
 
void Init (object obj, ReportDelegate reportdelegate)
 Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems. More...
 
void Init (object obj, ReportDelegate reportdelegate, ReserveReportErrorDelegate reservereportdelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems. More...
 
virtual void ResetLevels ()
 Resets the various kinds of reporting levels to default values. More...
 
bool DoReporting (ReportType reptype)
 Returns true if the report of a given type should be shown by user interface (according to ReportingLevel), and false if not. More...
 
bool DoLogging (ReportType reptype)
 Returns true if the report of a given type should be logged in log files (according to ReportingLevel), and false if not. More...
 
bool DoTracing (ReportType reptype)
 Returns true if the report of a given type should traced (according to ReportingLevel), and false if not. More...
 
virtual EventLogEntryType ReportType2EventLogEntryType (ReportType rt)
 Returns the System.Diagnostics.EventLogEntryType value corresponding to the given ReportType. Remark: FailureAudit and SuccessAudit can not be generated because they don't have representation in ReportType. More...
 
virtual ReportType EventLogEntryType2ReportType (EventLogEntryType el)
 Returns the ReportType value corresponding to the given System.Diagnostics.EventLogEntryType. Remark: FailureAudit and SuccessAudit do not have representation in ReportType and are mapped to Error and Warning, respectively. More...
 
virtual TraceLevel ReportLevel2TraceLevel (ReportLevel level)
 Returns the System.Diagnostics.TraceLevel value corresponding to the given ReportLevel. More...
 
virtual ReportLevel TraceLevel2ReportLevel (TraceLevel tl)
 Returns the ReportLevel value corresponding to the given System.Diagnostics.TraceLevel. More...
 
virtual void Report (ReportType messagetype, string location, string message, Exception ex)
 Basic reporting method (overloaded). Launches an error report, a warning report or s kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance. More...
 
void Report (ReportType messagetype, string message, Exception ex)
 Launches a report. Predominantly for error and warning reports. More...
 
void Report (ReportType messagetype, Exception ex, string location)
 Launches a report. Predominantly for error and warning reports. More...
 
void Report (ReportType messagetype, Exception ex)
 Launches a report. Predominantly for error and warning reports. More...
 
void Report (ReportType messagetype, string location, string message)
 Launches a report. More...
 
void Report (ReportType messagetype, string message)
 Launches a report. More...
 
void ReportError (string location, string message, Exception ex)
 Basic error reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance. More...
 
void ReportError (string message, Exception ex)
 Launches an error report. More...
 
void ReportError (Exception ex, string location)
 Launches an error report. More...
 
void ReportError (Exception ex)
 Launches an error report. Predominantly for error and warning reports. More...
 
void ReportError (string location, string message)
 Launches an error report. More...
 
void ReportError (string message)
 Launches an error report. More...
 
void ReportWarning (string location, string message, Exception ex)
 Basic warning reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance. More...
 
void ReportWarning (string message, Exception ex)
 Launches a warning report. More...
 
void ReportWarning (Exception ex, string location)
 Launches a warning report. More...
 
void ReportWarning (Exception ex)
 Launches a warning report. Predominantly for error and warning reports. More...
 
void ReportWarning (string location, string message)
 Launches a warning report. More...
 
void ReportWarning (string message)
 Launches a warning report. More...
 
void ReportInfo (Exception ex)
 Launches an info. More...
 
void ReportInfo (string location, string message)
 Launches an info. More...
 
void ReportInfo (string message)
 Launches an info. More...
 

Static Public Member Functions

static bool DoLaunch (ReportType reptype, ReportLevel replevel)
 Returns true if the report of a given type will be launched at the given reporting level, and false if not. More...
 
static string DefaultReportStringMessageBox (Reporter reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration, for reports launched in a message box. More...
 
static string DefaultReportStringConsole (Reporter reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration, for reports launched in consoles. More...
 
static string DefaultReportStringConsoleTimeStamp (Reporter reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration with a TIMESTAMP, for reports launched in consoles. More...
 
static string DefaultReportStringConsoleBas (Reporter reporter, ReportType messagetype, string errorlocation, string errormessage, bool timestamp)
 Base method for DefaultReportStringConsole and DefaultReportStringConsoleTimeStamp. More...
 
static void DefaultReportConsole (Reporter reporter, ReportType messagetype, string errorlocation, string errormessage)
 Default delegate for reporting. For parameter descriptions, see ReportDlg. More...
 
static string DefaultLocationString (Reporter reporter, ReportType messagetype, string location, Exception ex)
 Default delegate for assembly of the location string when reporting on consoles. For parameter descriptions, see ReportMessageDlg. More...
 
static string DefaultMessageString (Reporter reporter, ReportType messagetype, string basicmessage, Exception ex)
 Default delegate for message assembly of the message string when reporting on consoles. For parameter descriptions, see ReportMessageDlg. More...
 
static string DefaultReserveReportMessage (Reporter reporter, ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Default function function for assembling reserve error reporting message. This is put outside the DefaultReserveReportError() method such that the same assembly method can be used in different systems. The method is considered bulletproof.
Parameters
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.
More...
 
static void DefaultReserveReportError (Reporter reporter, ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Default function function for reserve error reporting (called if an exception is thrown in an error reporting function). Writes a report to the application'result standard console (if defined). More...
 
static string ErrorLocationString0 (Exception ex)
 Returns location string derived from ex, which includes information about the location where error occurred, specified by the source file name, function and line and column numbers. More...
 
static string ErrorLocationString0 (string location, Exception ex)
 Returns Error location string derived from ex, which includes information about location of error occurrence and is prepended by additional location information (such as class name) More...
 

Public Attributes

ReportDelegate ReportDlg = null
 Delegate that performs error reporting. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way. More...
 
ReportLocationDelegate ReportLocationDlg = null
 Delegate that assembles the error location string. More...
 
ReportMessageDelegate ReportMessageDlg = null
 Delegate that assembles the eror message string. More...
 
ReserveReportErrorDelegate ReserveReportErrorDlg = null
 Delegate that reports an error when the error reporting function throws an exception. Functions assigned to this delegate should really be BULLETPROOF. It is highly recommended to do reporting in small steps enclosed in try/catch blocks and especially to use the error reporting object very carefully (because it may not be initialized properly, which can also be the reason that the error reporting function crashes). It is higly recommended to first call the DefaultReserveReportError() within the function assigned to this delegate, or at least to use the DefaultReserveReportMessage() method for assembly of the message shown. More...
 
bool DebugMode = false
 Indicates that reporting suitable for debugging mode should be performed. A standard flag that can be used by the delegate functions. More...
 
ReportDelegate ReportDlgTextWriter = new ReportDelegate(DefaultReport_TextWriter)
 Delegate that performs reporting (actually logging) via text writer. More...
 
ReportLocationDelegate ReportLocationDlgTextWriter = new ReportLocationDelegate(DefaultReportLocation_TextWriter)
 Delegate that assembles the location string for reporting via console form. More...
 
ReportMessageDelegate ReportMessageDlgTextWriter = new ReportMessageDelegate(DefaultReportMessage_TextWriter)
 Delegate that assembles the message string for reporting via text writer. More...
 

Protected Member Functions

virtual void SetDefaultReportDlg ()
 Sets the error reporting delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.) More...
 
virtual void SetDefaultReportLocationDlg ()
 Sets the error location assembling delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.) More...
 
virtual void SetDefaultReportMessageDlg ()
 Sets the error message assembling delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.) More...
 
virtual void SetDefaultReserveReportErrorDlg ()
 Sets the reserve error reporting delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.) More...
 
virtual void InitBegin ()
 Initial part of initialization. Auxiliary object is not affected because default delegates do not utilize it. More...
 
virtual void InitEnd ()
 Finalizing part of initialization. Auxiliary object is not affected because default delegates do not utilize it. More...
 
void SyncReportLevelWithTraceSwitch (TraceSwitch tswitch, ref ReportLevel level)
 Synchronizes the value of ReportLevel enumeration variable with the state of a TraceSwitch variable. Enumeration is synchronized according to the Level property of the switch. More...
 
void SyncTraceSwitchWithReportLevel (ReportLevel level, TraceSwitch tswitch)
 Synchronizes the state of a TraceSwitch object with the value of the ReportLevel enumeration. More...
 
virtual void ReserveReportError (ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Used to report errors within reporting functions. Designed to be bullet proof in order to ensure that improper behavior of the reporting system does not remain unnoticed. More...
 
virtual void Report_TextWriter (ReportType messagetype, string location, string message, Exception ex)
 Launches a report via console form. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function. More...
 

Static Protected Member Functions

static int WriteMessage (Reporter reporter, string msg)
 Writes the message msg to all output streams and files registered with the reporter. More...
 
static void DefaultReport_TextWriter (Reporter reporter, ReportType messagetype, string location, string message)
 Default delegate for launching reports (actually logging reports) via text writer. More...
 
static string DefaultReportLocation_TextWriter (Reporter reporter, ReportType messagetype, string location, Exception ex)
 Delegate for assembling a location string for this kind of report. More...
 
static string DefaultReportMessage_TextWriter (Reporter reporter, ReportType messagetype, string basicmessage, Exception ex)
 Delegate for assembling a report message for this kind of report. More...
 

Protected Attributes

bool IsGlobal = false
 Indicates whwther the current reporter is used as a global reporter or not. This flag is set when the global reporter is initialized. More...
 
ReportLevel _ReportingLevel = ReportLevel.Warning
 
TraceSwitch _ReportingSwitch = null
 
object _lockobj = new Object()
 

Properties

static bool GlobalInitialized [get]
 
static Reporter Global [get, protected set]
 Gets the global reporter object. This is typically used for configuring the global reporter. More...
 
virtual ReportLevel ReportingLevel [get, set]
 Gets or sets level of output for reporting (console output, message boxes, etc.). More...
 
virtual ReportLevel LoggingLevel [get, set]
 Gets or sets level of output for logging (writing to log files). More...
 
virtual ReportLevel TracingLevel [get, set]
 Gets or sets trace level (for external trace systems). More...
 
bool TreatError [get]
 Returns a boolean value indicating whether errors are treated by the reporter in its current state. More...
 
bool TreatWarning [get]
 Returns a boolean value indicating whether warnings are treated by the reporter in its current state. More...
 
bool TreatInfo [get]
 Returns a boolean value indicating whether info messages are treated by the reporter in its current state. More...
 
bool TreatUndefined [get]
 Returns a boolean value indicating whether undefined messages with the lowest priority are treated by the reporter in its current state. More...
 
ReportLevel Level [get, set]
 Gets the level with the lowesst priority (out of reporting, logging and tracing level), or sets all levels to the assigned level. More...
 
virtual bool this[ReportLevel level] [get, set]
 Indexer that returns true if messages of a given level are treated by the reporter (either by the reporting, logging or tracing part, according to the corresponding level states), or false if not (i.e. if all the levels are set lover than the index). In the case of assignment, when true is assigned, all levels that are set lower than the are set to index. Assignment with false should be used only exteptionally; but in this case all levels that are set higher or equal than the index are set one level below. More...
 
TraceSwitch ReportingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with ReportingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the ReportingLevel, which will override its settings). More...
 
TraceSwitch LoggingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with LoggingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the LoggingLevel, which will override its settings). More...
 
TraceSwitch TracingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with TracingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the TracingLevel, which will override its settings). More...
 
bool ThrowTestException [get, set]
 If true then the basic reporting function will throw an exception. This is intended predominantly for testing how the reporter behaves in case of internal errors. When the exception is thrown, the value is set back to false. If we want an exception to be thrown again then the value must be set to true once again. More...
 
object Obj [get, set]
 Auxiliary object used by the delegates that perform error reporting. The object is used to provide additional information used in error reporting, or to provide objects that perform some actions in error reporting tasks, or both. It is left entirely to error reporting delegates to interpret the object'result contents. More...
 
virtual object lockobj [get]
 Object used for locking. More...
 
bool UseTextWriter [get, set]
 Gets or sets the flag specifying whether reporting using a text writer is performed or not. More...
 
- Properties inherited from IG.Lib.Old.IReporter
ReportLevel ReportingLevel [get, set]
 Gets or sets level of output for reporting (console output, message boxes, etc.). More...
 
ReportLevel LoggingLevel [get, set]
 Gets or sets level of output for logging (writing to log files). More...
 
ReportLevel TracingLevel [get, set]
 Gets or sets trace level (for external trace systems). More...
 
bool TreatError [get]
 Returns a boolean value indicating whether errors are treated by the reporter in its current state. More...
 
bool TreatWarning [get]
 Returns a boolean value indicating whether warnings are treated by the reporter in its current state. More...
 
bool TreatInfo [get]
 Returns a boolean value indicating whether info messages are treated by the reporter in its current state. More...
 
bool TreatUndefined [get]
 Returns a boolean value indicating whether undefined messages with the lowest priority are treated by the reporter in its current state. More...
 
ReportLevel Level [get, set]
 Gets the level with the lowesst priority (out of reporting, logging and tracing level), or sets all levels to the assigned level. More...
 
bool this[ReportLevel level] [get, set]
 Indexer that returns true if messages of a given level are treated by the reporter (either by the reporting, logging or tracing part, according to the corresponding level states), or false if not (i.e. if all the levels are set lover than the index). In the case of assignment, when true is assigned, all levels that are set lower than the are set to index. Assignment with false should be used only exteptionally; but in this case all levels that are set higher or equal than the index are set one level below. More...
 
TraceSwitch ReportingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with ReportingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the ReportingLevel, which will override its settings). More...
 
TraceSwitch LoggingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with LoggingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the LoggingLevel, which will override its settings). More...
 
TraceSwitch TracingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with TracingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the TracingLevel, which will override its settings). More...
 
object Obj [get, set]
 Auxiliary object used by the delegates that perform error reporting. The object is used to provide additional information used in error reporting, or to provide objects that perform some actions in error reporting tasks, or both. It is left entirely to error reporting delegates to interpret the object'result contents. More...
 
object lockobj [get]
 Object used for locking. More...
 

Private Member Functions

bool SetWriter (TextWriter writer)
 Sets the text writer to which reporting is also performed. More...
 
bool SetWriter (Stream stream)
 Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed. More...
 
bool SetWriter (string filename)
 Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed. More...
 
bool SetWriter (string filename, bool overwrite)
 Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed. More...
 

Static Private Member Functions

static void Test ()
 

Private Attributes

ReportLevel _LoggingLevel = ReportLevel.Warning
 
ReportLevel _TracingLevel = ReportLevel.Info
 
TraceSwitch _LoggingSwitch = null
 
TraceSwitch _TracingSwitch = null
 
bool _ThrowTestException = false
 
object _obj = null
 
bool _UseTextWriter = false
 
List< TextWriter > Writers = new List<TextWriter>()
 
List< String > FileNames = new List<String>()
 
TextWriter Writer = null
 
bool DisposeWriter = false
 

Static Private Attributes

static Reporter _Global = null
 
static bool _GlobalInitialized = false
 

Detailed Description

Base IG class for reporting, tracing and logging; provides a global reporter and a basis for creation of local reporters. This class is identical to the IGLib class (copied directly). IN EFA, refer to the derived class Reporter!

Constructor & Destructor Documentation

IG.Lib.Old.Reporter.Reporter ( )
inline

Constructor. Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.

IG.Lib.Old.Reporter.Reporter ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate,
ReserveReportErrorDelegate  reservereportdelegate 
)
inline

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.

Parameters
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
locationdelegateDelegate that is called to assemble the error location string. The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
messagedelegateDelegate that is called to assemble the error message (without decorations). The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.
IG.Lib.Old.Reporter.Reporter ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate 
)
inline

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.

IG.Lib.Old.Reporter.Reporter ( object  obj,
ReportDelegate  reportdelegate 
)
inline

Constructor. Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.

IG.Lib.Old.Reporter.Reporter ( object  obj,
ReportDelegate  reportdelegate,
ReserveReportErrorDelegate  reservereportdelegate 
)
inline

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Parameters
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.

Member Function Documentation

virtual void IG.Lib.Old.Reporter.SetDefaultReportDlg ( )
inlineprotectedvirtual

Sets the error reporting delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

References IG.Lib.Old.ReportDelegate().

virtual void IG.Lib.Old.Reporter.SetDefaultReportLocationDlg ( )
inlineprotectedvirtual

Sets the error location assembling delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

References IG.Lib.Old.ReportLocationDelegate().

virtual void IG.Lib.Old.Reporter.SetDefaultReportMessageDlg ( )
inlineprotectedvirtual

Sets the error message assembling delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

References IG.Lib.Old.ReportMessageDelegate().

virtual void IG.Lib.Old.Reporter.SetDefaultReserveReportErrorDlg ( )
inlineprotectedvirtual

Sets the reserve error reporting delegate to the default value. The default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

References IG.Lib.Old.ReserveReportErrorDelegate().

virtual void IG.Lib.Old.Reporter.InitBegin ( )
inlineprotectedvirtual

Initial part of initialization. Auxiliary object is not affected because default delegates do not utilize it.

virtual void IG.Lib.Old.Reporter.InitEnd ( )
inlineprotectedvirtual

Finalizing part of initialization. Auxiliary object is not affected because default delegates do not utilize it.

void IG.Lib.Old.Reporter.Init ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate,
ReserveReportErrorDelegate  reservereportdelegate 
)
inline

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.

Parameters
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
locationdelegateDelegate that is called to assemble the error location string. The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
messagedelegateDelegate that is called to assemble the error message (without decorations). The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Init ( )
inline

Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Init ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate 
)
inline

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Init ( object  obj,
ReportDelegate  reportdelegate 
)
inline

Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Init ( object  obj,
ReportDelegate  reportdelegate,
ReserveReportErrorDelegate  reservereportdelegate 
)
inline

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Parameters
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.

Implements IG.Lib.Old.IReporter.

virtual void IG.Lib.Old.Reporter.ResetLevels ( )
inlinevirtual

Resets the various kinds of reporting levels to default values.

Implements IG.Lib.Old.IReporter.

static bool IG.Lib.Old.Reporter.DoLaunch ( ReportType  reptype,
ReportLevel  replevel 
)
inlinestatic

Returns true if the report of a given type will be launched at the given reporting level, and false if not.

Parameters
reptypeType of the report for which information is returned.
replevelTrue if reports of the specific type are launched, false if not.
bool IG.Lib.Old.Reporter.DoReporting ( ReportType  reptype)
inline

Returns true if the report of a given type should be shown by user interface (according to ReportingLevel), and false if not.

Parameters
reptypeType of the report for which information is returned.
Returns
True if reports of the specific type are launched, false if not.
bool IG.Lib.Old.Reporter.DoLogging ( ReportType  reptype)
inline

Returns true if the report of a given type should be logged in log files (according to ReportingLevel), and false if not.

Parameters
reptypeType of the report for which information is returned.
Returns
True if reports of the specific type are launched, false if not.
bool IG.Lib.Old.Reporter.DoTracing ( ReportType  reptype)
inline

Returns true if the report of a given type should traced (according to ReportingLevel), and false if not.

Parameters
reptypeType of the report for which information is returned.
Returns
True if reports of the specific type are launched, false if not.
virtual EventLogEntryType IG.Lib.Old.Reporter.ReportType2EventLogEntryType ( ReportType  rt)
inlinevirtual

Returns the System.Diagnostics.EventLogEntryType value corresponding to the given ReportType. Remark: FailureAudit and SuccessAudit can not be generated because they don't have representation in ReportType.

Parameters
levelReportType value to be converted.
Returns
Converted value of type EventLogEntryType.

Implements IG.Lib.Old.IReporter.

virtual ReportType IG.Lib.Old.Reporter.EventLogEntryType2ReportType ( EventLogEntryType  el)
inlinevirtual

Returns the ReportType value corresponding to the given System.Diagnostics.EventLogEntryType. Remark: FailureAudit and SuccessAudit do not have representation in ReportType and are mapped to Error and Warning, respectively.

Parameters
levelEventLogEntryType value to be converted.
Returns
Converted value of type ReportType.

Implements IG.Lib.Old.IReporter.

virtual TraceLevel IG.Lib.Old.Reporter.ReportLevel2TraceLevel ( ReportLevel  level)
inlinevirtual

Returns the System.Diagnostics.TraceLevel value corresponding to the given ReportLevel.

Parameters
levelReportLevel value to be converted.
Returns
Converted value of type TraceLevel.

Implements IG.Lib.Old.IReporter.

virtual ReportLevel IG.Lib.Old.Reporter.TraceLevel2ReportLevel ( TraceLevel  tl)
inlinevirtual

Returns the ReportLevel value corresponding to the given System.Diagnostics.TraceLevel.

Parameters
levelTraceLevel value to be converted.
Returns
Converted value of type ReportLevel.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.SyncReportLevelWithTraceSwitch ( TraceSwitch  tswitch,
ref ReportLevel  level 
)
inlineprotected

Synchronizes the value of ReportLevel enumeration variable with the state of a TraceSwitch variable. Enumeration is synchronized according to the Level property of the switch.

Parameters
tswitchA trace switch that the ReportLevel enumeration variable will be synchronized with. If it is null or it contains a level that can not be represented by the ReportLevel enumeration then nothing happens.
levelThe ReportLevel variable that is synchronized; declared as ref
void IG.Lib.Old.Reporter.SyncTraceSwitchWithReportLevel ( ReportLevel  level,
TraceSwitch  tswitch 
)
inlineprotected

Synchronizes the state of a TraceSwitch object with the value of the ReportLevel enumeration.

Parameters
levelValue of the ReportLevel enumeration that TraceSwitch will be synchronized with
tswitchTraceSwitch taht is synchronized.
virtual void IG.Lib.Old.Reporter.ReserveReportError ( ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
)
inlineprotectedvirtual

Used to report errors within reporting functions. Designed to be bullet proof in order to ensure that improper behavior of the reporting system does not remain unnoticed.

Parameters
messagetype
location
message
ex
ex1
virtual void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
)
inlinevirtual

Basic reporting method (overloaded). Launches an error report, a warning report or s kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance.

Parameters
messagetypeThe type of the report (e.g. Error, Warning, etc.).
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
string  message,
Exception  ex 
)
inline

Launches a report. Predominantly for error and warning reports.

Parameters
messagetypeLevel of the message (Error, Warnind, etc.).
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
Exception  ex,
string  location 
)
inline

Launches a report. Predominantly for error and warning reports.

Parameters
messagetypeLevel of the message (Error, Warnind, etc.).
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
Exception  ex 
)
inline

Launches a report. Predominantly for error and warning reports.

Parameters
messagetypeLevel of the message (Error, Warnind, etc.).
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
string  location,
string  message 
)
inline

Launches a report.

Parameters
messagetypeLevel of the message (Error, Warnind, etc.).
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.Report ( ReportType  messagetype,
string  message 
)
inline

Launches a report.

Parameters
messagetypeLevel of the message (Error, Warnind, etc.).
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( string  location,
string  message,
Exception  ex 
)
inline

Basic error reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance.

Parameters
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( string  message,
Exception  ex 
)
inline

Launches an error report.

Parameters
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( Exception  ex,
string  location 
)
inline

Launches an error report.

Parameters
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( Exception  ex)
inline

Launches an error report. Predominantly for error and warning reports.

Parameters
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( string  location,
string  message 
)
inline

Launches an error report.

Parameters
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportError ( string  message)
inline

Launches an error report.

Parameters
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( string  location,
string  message,
Exception  ex 
)
inline

Basic warning reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation typeflags) are obtained from the class' instance.

Parameters
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( string  message,
Exception  ex 
)
inline

Launches a warning report.

Parameters
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( Exception  ex,
string  location 
)
inline

Launches a warning report.

Parameters
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( Exception  ex)
inline

Launches a warning report. Predominantly for error and warning reports.

Parameters
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( string  location,
string  message 
)
inline

Launches a warning report.

Parameters
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportWarning ( string  message)
inline

Launches a warning report.

Parameters
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportInfo ( Exception  ex)
inline

Launches an info.

Parameters
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportInfo ( string  location,
string  message 
)
inline

Launches an info.

Parameters
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

void IG.Lib.Old.Reporter.ReportInfo ( string  message)
inline

Launches an info.

Parameters
messageUser provided message included in the report.

Implements IG.Lib.Old.IReporter.

bool IG.Lib.Old.Reporter.SetWriter ( TextWriter  writer)
inlineprivate

Sets the text writer to which reporting is also performed.

Parameters
writerWriter to which reporting will be performed.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.
bool IG.Lib.Old.Reporter.SetWriter ( Stream  stream)
inlineprivate

Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed.

Parameters
writerStream to which reporting will be performed.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.
bool IG.Lib.Old.Reporter.SetWriter ( string  filename)
inlineprivate

Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed.

Parameters
writerStream to which reporting will be performed.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.
bool IG.Lib.Old.Reporter.SetWriter ( string  filename,
bool  overwrite 
)
inlineprivate

Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed.

Parameters
writerStream to which reporting will be performed.
overwriteIf true then eventual existing contents of the file are overwritten. Otherwise, new text is appended at the end of the file.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.
static int IG.Lib.Old.Reporter.WriteMessage ( Reporter  reporter,
string  msg 
)
inlinestaticprotected

Writes the message msg to all output streams and files registered with the reporter.

Parameters
reporterReporter used for reporting, containing information about output streams and files.
msgString to be written to output streams and files.
Returns
Number of failures (0 if the message could be output to all streams and files specified).

References IG.Lib.Old.Reporter.FileNames, IG.Lib.Old.Reporter.Writer, and IG.Lib.Old.Reporter.Writers.

static void IG.Lib.Old.Reporter.DefaultReport_TextWriter ( Reporter  reporter,
ReportType  messagetype,
string  location,
string  message 
)
inlinestaticprotected

Default delegate for launching reports (actually logging reports) via text writer.

Parameters
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
locationShort string desctribing location where report was triggered.
messageMessage of the report.
static string IG.Lib.Old.Reporter.DefaultReportLocation_TextWriter ( Reporter  reporter,
ReportType  messagetype,
string  location,
Exception  ex 
)
inlinestaticprotected

Delegate for assembling a location string for this kind of report.

Parameters
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
locationUser provided location string.
exException that triggered reporting.
Returns
Location string that can be used in a report.
static string IG.Lib.Old.Reporter.DefaultReportMessage_TextWriter ( Reporter  reporter,
ReportType  messagetype,
string  basicmessage,
Exception  ex 
)
inlinestaticprotected

Delegate for assembling a report message for this kind of report.

Parameters
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
basicmessageUser provided message string.
exException that triggered reporting.
Returns
Message string that can be used in a report.
virtual void IG.Lib.Old.Reporter.Report_TextWriter ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
)
inlineprotectedvirtual

Launches a report via console form. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function.

Parameters
messagetypeType of the report(Error, Warning, Info...).
locationUser provided location string.
messageUser provided message string.
exException that triggered reporting.
static string IG.Lib.Old.Reporter.DefaultReportStringMessageBox ( Reporter  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
)
inlinestatic

Auxiliary method that composes the complete message, including decoration, for reports launched in a message box.

Parameters
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns
String that is output by the report.
static string IG.Lib.Old.Reporter.DefaultReportStringConsole ( Reporter  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
)
inlinestatic

Auxiliary method that composes the complete message, including decoration, for reports launched in consoles.

Parameters
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns
String that is output by the report.
static string IG.Lib.Old.Reporter.DefaultReportStringConsoleTimeStamp ( Reporter  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
)
inlinestatic

Auxiliary method that composes the complete message, including decoration with a TIMESTAMP, for reports launched in consoles.

Parameters
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns
String that is output by the report.
static string IG.Lib.Old.Reporter.DefaultReportStringConsoleBas ( Reporter  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage,
bool  timestamp 
)
inlinestatic

Base method for DefaultReportStringConsole and DefaultReportStringConsoleTimeStamp.

Parameters
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
timestampSpecifies whether to include a time stamp in the message.
Returns
String that is output by the report.
static void IG.Lib.Old.Reporter.DefaultReportConsole ( Reporter  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
)
inlinestatic

Default delegate for reporting. For parameter descriptions, see ReportDlg.

static string IG.Lib.Old.Reporter.DefaultLocationString ( Reporter  reporter,
ReportType  messagetype,
string  location,
Exception  ex 
)
inlinestatic

Default delegate for assembly of the location string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.

static string IG.Lib.Old.Reporter.DefaultMessageString ( Reporter  reporter,
ReportType  messagetype,
string  basicmessage,
Exception  ex 
)
inlinestatic

Default delegate for message assembly of the message string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.

static string IG.Lib.Old.Reporter.DefaultReserveReportMessage ( Reporter  reporter,
ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
)
inlinestatic

Default function function for assembling reserve error reporting message. This is put outside the DefaultReserveReportError() method such that the same assembly method can be used in different systems. The method is considered bulletproof.

Parameters
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.

static void IG.Lib.Old.Reporter.DefaultReserveReportError ( Reporter  reporter,
ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
)
inlinestatic

Default function function for reserve error reporting (called if an exception is thrown in an error reporting function). Writes a report to the application'result standard console (if defined).

Parameters
reporterReporter object whre the method can get additional information.
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.
static string IG.Lib.Old.Reporter.ErrorLocationString0 ( Exception  ex)
inlinestatic

Returns location string derived from ex, which includes information about the location where error occurred, specified by the source file name, function and line and column numbers.

Parameters
ex
Returns
static string IG.Lib.Old.Reporter.ErrorLocationString0 ( string  location,
Exception  ex 
)
inlinestatic

Returns Error location string derived from ex, which includes information about location of error occurrence and is prepended by additional location information (such as class name)

Parameters
location
ex
Returns
static void IG.Lib.Old.Reporter.Test ( )
inlinestaticprivate

Member Data Documentation

Reporter IG.Lib.Old.Reporter._Global = null
staticprivate
bool IG.Lib.Old.Reporter._GlobalInitialized = false
staticprivate
bool IG.Lib.Old.Reporter.IsGlobal = false
protected

Indicates whwther the current reporter is used as a global reporter or not. This flag is set when the global reporter is initialized.

ReportDelegate IG.Lib.Old.Reporter.ReportDlg = null

Delegate that performs error reporting. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way.

ReportLocationDelegate IG.Lib.Old.Reporter.ReportLocationDlg = null

Delegate that assembles the error location string.

ReportMessageDelegate IG.Lib.Old.Reporter.ReportMessageDlg = null

Delegate that assembles the eror message string.

ReserveReportErrorDelegate IG.Lib.Old.Reporter.ReserveReportErrorDlg = null

Delegate that reports an error when the error reporting function throws an exception. Functions assigned to this delegate should really be BULLETPROOF. It is highly recommended to do reporting in small steps enclosed in try/catch blocks and especially to use the error reporting object very carefully (because it may not be initialized properly, which can also be the reason that the error reporting function crashes). It is higly recommended to first call the DefaultReserveReportError() within the function assigned to this delegate, or at least to use the DefaultReserveReportMessage() method for assembly of the message shown.

bool IG.Lib.Old.Reporter.DebugMode = false

Indicates that reporting suitable for debugging mode should be performed. A standard flag that can be used by the delegate functions.

ReportLevel IG.Lib.Old.Reporter._ReportingLevel = ReportLevel.Warning
protected
ReportLevel IG.Lib.Old.Reporter._LoggingLevel = ReportLevel.Warning
private
ReportLevel IG.Lib.Old.Reporter._TracingLevel = ReportLevel.Info
private
TraceSwitch IG.Lib.Old.Reporter._ReportingSwitch = null
protected
TraceSwitch IG.Lib.Old.Reporter._LoggingSwitch = null
private
TraceSwitch IG.Lib.Old.Reporter._TracingSwitch = null
private
bool IG.Lib.Old.Reporter._ThrowTestException = false
private
object IG.Lib.Old.Reporter._obj = null
private
object IG.Lib.Old.Reporter._lockobj = new Object()
protected
bool IG.Lib.Old.Reporter._UseTextWriter = false
private
List<TextWriter> IG.Lib.Old.Reporter.Writers = new List<TextWriter>()
private
List<String> IG.Lib.Old.Reporter.FileNames = new List<String>()
private
TextWriter IG.Lib.Old.Reporter.Writer = null
private
bool IG.Lib.Old.Reporter.DisposeWriter = false
private
ReportDelegate IG.Lib.Old.Reporter.ReportDlgTextWriter = new ReportDelegate(DefaultReport_TextWriter)

Delegate that performs reporting (actually logging) via text writer.

ReportLocationDelegate IG.Lib.Old.Reporter.ReportLocationDlgTextWriter = new ReportLocationDelegate(DefaultReportLocation_TextWriter)

Delegate that assembles the location string for reporting via console form.

ReportMessageDelegate IG.Lib.Old.Reporter.ReportMessageDlgTextWriter = new ReportMessageDelegate(DefaultReportMessage_TextWriter)

Delegate that assembles the message string for reporting via text writer.

Property Documentation

bool IG.Lib.Old.Reporter.GlobalInitialized
staticget
Reporter IG.Lib.Old.Reporter.Global
staticgetprotected set

Gets the global reporter object. This is typically used for configuring the global reporter.

virtual ReportLevel IG.Lib.Old.Reporter.ReportingLevel
getset

Gets or sets level of output for reporting (console output, message boxes, etc.).

virtual ReportLevel IG.Lib.Old.Reporter.LoggingLevel
getset

Gets or sets level of output for logging (writing to log files).

virtual ReportLevel IG.Lib.Old.Reporter.TracingLevel
getset

Gets or sets trace level (for external trace systems).

bool IG.Lib.Old.Reporter.TreatError
get

Returns a boolean value indicating whether errors are treated by the reporter in its current state.

bool IG.Lib.Old.Reporter.TreatWarning
get

Returns a boolean value indicating whether warnings are treated by the reporter in its current state.

bool IG.Lib.Old.Reporter.TreatInfo
get

Returns a boolean value indicating whether info messages are treated by the reporter in its current state.

bool IG.Lib.Old.Reporter.TreatUndefined
get

Returns a boolean value indicating whether undefined messages with the lowest priority are treated by the reporter in its current state.

ReportLevel IG.Lib.Old.Reporter.Level
getset

Gets the level with the lowesst priority (out of reporting, logging and tracing level), or sets all levels to the assigned level.

virtual bool IG.Lib.Old.Reporter.this[ReportLevel level]
getset

Indexer that returns true if messages of a given level are treated by the reporter (either by the reporting, logging or tracing part, according to the corresponding level states), or false if not (i.e. if all the levels are set lover than the index). In the case of assignment, when true is assigned, all levels that are set lower than the are set to index. Assignment with false should be used only exteptionally; but in this case all levels that are set higher or equal than the index are set one level below.

Parameters
levelLevel for which we are interested whether it is treated.
Returns
True if a specific level (stated as index) is treated, false if not (i.e. if all of the reporting, logging )
TraceSwitch IG.Lib.Old.Reporter.ReportingSwitch
getset

Gets or sets the TraceSwitch that is synchronized with ReportingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the ReportingLevel, which will override its settings).

TraceSwitch IG.Lib.Old.Reporter.LoggingSwitch
getset

Gets or sets the TraceSwitch that is synchronized with LoggingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the LoggingLevel, which will override its settings).

TraceSwitch IG.Lib.Old.Reporter.TracingSwitch
getset

Gets or sets the TraceSwitch that is synchronized with TracingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the TracingLevel, which will override its settings).

bool IG.Lib.Old.Reporter.ThrowTestException
getset

If true then the basic reporting function will throw an exception. This is intended predominantly for testing how the reporter behaves in case of internal errors. When the exception is thrown, the value is set back to false. If we want an exception to be thrown again then the value must be set to true once again.

object IG.Lib.Old.Reporter.Obj
getset

Auxiliary object used by the delegates that perform error reporting. The object is used to provide additional information used in error reporting, or to provide objects that perform some actions in error reporting tasks, or both. It is left entirely to error reporting delegates to interpret the object'result contents.

virtual object IG.Lib.Old.Reporter.lockobj
get

Object used for locking.

bool IG.Lib.Old.Reporter.UseTextWriter
getset

Gets or sets the flag specifying whether reporting using a text writer is performed or not.


The documentation for this class was generated from the following file: