Inheritance: ISarifNode
Esempio n. 1
0
        private void Init(string id, string ruleId, string ruleKey, PhysicalLocation physicalLocation, string message, NotificationLevel level, int threadId, DateTime time, ExceptionData exception, IDictionary<string, SerializedPropertyInfo> properties)
        {
            Id = id;
            RuleId = ruleId;
            RuleKey = ruleKey;
            if (physicalLocation != null)
            {
                PhysicalLocation = new PhysicalLocation(physicalLocation);
            }

            Message = message;
            Level = level;
            ThreadId = threadId;
            Time = time;
            if (exception != null)
            {
                Exception = new ExceptionData(exception);
            }

            if (properties != null)
            {
                Properties = new Dictionary<string, SerializedPropertyInfo>(properties);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExceptionData" /> class from the specified instance.
        /// </summary>
        /// <param name="other">
        /// The instance from which the new instance is to be initialized.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Thrown if <paramref name="other" /> is null.
        /// </exception>
        public ExceptionData(ExceptionData other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Kind, other.Message, other.Stack, other.InnerExceptions);
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Notification" /> class from the supplied values.
 /// </summary>
 /// <param name="id">
 /// An initialization value for the <see cref="P: Id" /> property.
 /// </param>
 /// <param name="ruleId">
 /// An initialization value for the <see cref="P: RuleId" /> property.
 /// </param>
 /// <param name="ruleKey">
 /// An initialization value for the <see cref="P: RuleKey" /> property.
 /// </param>
 /// <param name="physicalLocation">
 /// An initialization value for the <see cref="P: PhysicalLocation" /> property.
 /// </param>
 /// <param name="message">
 /// An initialization value for the <see cref="P: Message" /> property.
 /// </param>
 /// <param name="level">
 /// An initialization value for the <see cref="P: Level" /> property.
 /// </param>
 /// <param name="threadId">
 /// An initialization value for the <see cref="P: ThreadId" /> property.
 /// </param>
 /// <param name="time">
 /// An initialization value for the <see cref="P: Time" /> property.
 /// </param>
 /// <param name="exception">
 /// An initialization value for the <see cref="P: Exception" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P: Properties" /> property.
 /// </param>
 public Notification(string id, string ruleId, string ruleKey, PhysicalLocation physicalLocation, string message, NotificationLevel level, int threadId, DateTime time, ExceptionData exception, IDictionary<string, SerializedPropertyInfo> properties)
 {
     Init(id, ruleId, ruleKey, physicalLocation, message, level, threadId, time, exception, properties);
 }
Esempio n. 4
0
 public bool ValueEquals(ExceptionData other) => ValueComparer.Equals(this, other);