private void Init(string kind, string message, StackVersionOne stack, IEnumerable <ExceptionDataVersionOne> innerExceptions)
        {
            Kind    = kind;
            Message = message;
            if (stack != null)
            {
                Stack = new StackVersionOne(stack);
            }

            if (innerExceptions != null)
            {
                var destination_0 = new List <ExceptionDataVersionOne>();
                foreach (var value_0 in innerExceptions)
                {
                    if (value_0 == null)
                    {
                        destination_0.Add(null);
                    }
                    else
                    {
                        destination_0.Add(new ExceptionDataVersionOne(value_0));
                    }
                }

                InnerExceptions = destination_0;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StackVersionOne" /> 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 StackVersionOne(StackVersionOne other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Message, other.Frames, other.Properties);
        }
        public virtual StackVersionOne VisitStackVersionOne(StackVersionOne node)
        {
            if (node != null)
            {
                if (node.Frames != null)
                {
                    for (int index_0 = 0; index_0 < node.Frames.Count; ++index_0)
                    {
                        node.Frames[index_0] = VisitNullChecked(node.Frames[index_0]);
                    }
                }
            }

            return(node);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionDataVersionOne" /> class from the supplied values.
 /// </summary>
 /// <param name="kind">
 /// An initialization value for the <see cref="P: Kind" /> property.
 /// </param>
 /// <param name="message">
 /// An initialization value for the <see cref="P: Message" /> property.
 /// </param>
 /// <param name="stack">
 /// An initialization value for the <see cref="P: Stack" /> property.
 /// </param>
 /// <param name="innerExceptions">
 /// An initialization value for the <see cref="P: InnerExceptions" /> property.
 /// </param>
 public ExceptionDataVersionOne(string kind, string message, StackVersionOne stack, IEnumerable <ExceptionDataVersionOne> innerExceptions)
 {
     Init(kind, message, stack, innerExceptions);
 }
Exemplo n.º 5
0
 public bool ValueEquals(StackVersionOne other) => ValueComparer.Equals(this, other);