Class Debug
Facilitates debugging tasks enabled by DEBUG conditional define
Inheritance
System.Object
    Debug
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Azos
Assembly: Azos.dll
Syntax
public static class DebugFields
DEBUG
Declaration
public const string DEBUG = "DEBUG"Field Value
| Type | Description | 
|---|---|
| System.String | 
Methods
Assert(Boolean, String, DebugAction, String, MessageType, Int32, String, String, Nullable<Guid>, Int32)
Declaration
[Conditional("DEBUG")]
public static void Assert(bool condition, string text = null, DebugAction action = DebugAction.Default, string from = null, MessageType type = MessageType.Debug, int source = 0, string topic = null, string pars = null, Guid? correlationContext = default(Guid? ), int frameOffset = 2)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | condition | |
| System.String | text | |
| DebugAction | action | |
| System.String | from | |
| MessageType | type | |
| System.Int32 | source | |
| System.String | topic | |
| System.String | pars | |
| System.Nullable<System.Guid> | correlationContext | |
| System.Int32 | frameOffset | 
Fail(String, DebugAction, String, MessageType, Int32, String, String, Nullable<Guid>, Int32)
Declaration
[Conditional("DEBUG")]
public static void Fail(string text = null, DebugAction action = DebugAction.Default, string from = null, MessageType type = MessageType.Debug, int source = 0, string topic = null, string pars = null, Guid? correlationContext = default(Guid? ), int frameOffset = 2)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | text | |
| DebugAction | action | |
| System.String | from | |
| MessageType | type | |
| System.Int32 | source | |
| System.String | topic | |
| System.String | pars | |
| System.Nullable<System.Guid> | correlationContext | |
| System.Int32 | frameOffset | 
Write(Func<String>, MessageType, Nullable<Guid>)
A simplified method for tracing that doesn't evaluate text generation function if tracing is disabled by configuration
Declaration
[Conditional("DEBUG")]
public static void Write(Func<string> textFunc, MessageType type = MessageType.Trace, Guid? correlationContext = default(Guid? ))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Func<System.String> | textFunc | Functor to evaluate to get the text sent to logger | 
| MessageType | type | Message type to log | 
| System.Nullable<System.Guid> | correlationContext | Optional correlation token to relate log entries | 
Write(String, String, MessageType, Int32, String, String, Nullable<Guid>, Int32)
Declaration
[Conditional("DEBUG")]
public static void Write(string text, string from = null, MessageType type = MessageType.Debug, int source = 0, string topic = null, string pars = null, Guid? correlationContext = default(Guid? ), int frameOffset = 2)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | text | |
| System.String | from | |
| MessageType | type | |
| System.Int32 | source | |
| System.String | topic | |
| System.String | pars | |
| System.Nullable<System.Guid> | correlationContext | |
| System.Int32 | frameOffset |