System.Diagnostics.CorrelationManager.AsyncLocalStackWrapper.ToArray C# (CSharp) Method

ToArray() public method

public ToArray ( ) : object[]
return object[]
            public override object[] ToArray()
            {
                StackNode n = _stack.Value;
                if (n == null)
                {
                    return Array.Empty<object>();
                }

                var results = new List<object>();
                do
                {
                    results.Add(n.Value);
                    n = n.Prev;
                }
                while (n != null);
                return results.ToArray();
            }
        }