Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XAttributeEntry"/> struct.
 /// </summary>
 /// <param name="attName">Name of the attribte.</param>
 /// <param name="attValue">The attribute value.</param>
 public XAttributeEntry(String attName, Object attValue = null)
 {
     this.AttributeName = attName;
     if (attValue != null)
     {
         this.AttributeValue = attValue.ToString();
     }
     else
     {
         this.AttributeValue = String.Empty;
     }
     _Nameless = new NamelessObject(typeof(XAttributeEntry));
 }
Exemple #2
0
 /// <summary>
 /// Appends the entry.
 /// </summary>
 /// <param name="exc">The exception.</param>
 /// <param name="nameless">Extract the information from the nameless Object</param>
 /// <param name="printStackTrace">if set to <c>true</c> [print stack trace].</param>
 public void AppendEntry(Exception exc, NamelessObject nameless, Boolean printStackTrace = false)
 {
     if (this.GhostMode)
     {
         string entry;
         //Se generá la entrada del Log
         if (nameless != null)
         {
             entry = this.CreateEntryMessage(exc.FormatExceptionMessage(), Protocol.Error, nameless.MethodName, nameless.Class);
         }
         else
         {
             entry = this.CreateEntryMessage(exc.FormatExceptionMessage(), Protocol.Error);
         }
         //Se imprime el stack trace
         if (printStackTrace)
         {
             entry += "\n" + exc.StackTrace;
         }
         this.Save(entry);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NamelessException"/> class.
 /// </summary>
 /// <param name="msg">The MSG.</param>
 /// <param name="innerException">The inner exception.</param>
 public NamelessException(string msg, System.Exception innerException)
     : base(msg, innerException)
 {
     _Nameless = new NamelessObject(this.GetType());
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NamelessException"/> class.
 /// </summary>
 /// <param name="msg">The MSG.</param>
 public NamelessException(string msg)
     : base(msg)
 {
     _Nameless = new NamelessObject(this.GetType());
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CategoryDefinition"/> struct.
 /// </summary>
 /// <param name="categoryName">The name of the category</param>
 /// <param name="properties">The category properties.</param>
 public CategoryDefinition(string categoryName, params KeyValuePair <String, String>[] properties)
 {
     this._Nameless    = new NamelessObject(typeof(CategoryDefinition));
     this.CategoryName = categoryName;
     this.Properties   = properties;
 }
Exemple #6
0
 /// <summary>
 /// Appends an entry to the log.
 /// </summary>
 /// <param name="msg">The entry message.</param>
 /// <param name="type">The protocol type.</param>
 /// <param name="nameless">The nameless object.</param>
 public void AppendEntry(string msg, Protocol type, NamelessObject nameless)
 {
     this.AppendEntry(msg, type, nameless.MethodName, nameless.Class);
 }