/// <summary>
        /// Initializes a new instance of the <see cref="ExceptionDataVersionOne" /> 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 ExceptionDataVersionOne(ExceptionDataVersionOne other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Kind, other.Message, other.Stack, other.InnerExceptions);
        }
        public virtual ExceptionDataVersionOne VisitExceptionDataVersionOne(ExceptionDataVersionOne node)
        {
            if (node != null)
            {
                node.Stack = VisitNullChecked(node.Stack);
                if (node.InnerExceptions != null)
                {
                    for (int index_0 = 0; index_0 < node.InnerExceptions.Count; ++index_0)
                    {
                        node.InnerExceptions[index_0] = VisitNullChecked(node.InnerExceptions[index_0]);
                    }
                }
            }

            return(node);
        }
Esempio n. 3
0
        private void Init(string id, string ruleId, string ruleKey, PhysicalLocationVersionOne physicalLocation, string message, NotificationLevelVersionOne level, int threadId, DateTime time, ExceptionDataVersionOne exception, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Id      = id;
            RuleId  = ruleId;
            RuleKey = ruleKey;
            if (physicalLocation != null)
            {
                PhysicalLocation = new PhysicalLocationVersionOne(physicalLocation);
            }

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

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
 public bool ValueEquals(ExceptionDataVersionOne other) => ValueComparer.Equals(this, other);
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationVersionOne" /> 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 NotificationVersionOne(string id, string ruleId, string ruleKey, PhysicalLocationVersionOne physicalLocation, string message, NotificationLevelVersionOne level, int threadId, DateTime time, ExceptionDataVersionOne exception, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(id, ruleId, ruleKey, physicalLocation, message, level, threadId, time, exception, properties);
 }