Sarcasm.Unparsing.FormatYielder.Spawn C# (CSharp) Méthode

Spawn() private méthode

private Spawn ( UnparsableAst child, ChildLocation childLocation = ChildLocation.Unknown ) : FormatYielder
child UnparsableAst
childLocation ChildLocation
Résultat FormatYielder
        internal FormatYielder Spawn(UnparsableAst child, ChildLocation childLocation = ChildLocation.Unknown)
        {
            if (childLocation == ChildLocation.Unknown)
            {
                return new FormatYielder(this)
                {
                    topAncestorCacheForLeft = UnparsableAst.NonCalculated
                };
            }
            else
            {
                bool isLeftMostChild =
                    childLocation == ChildLocation.Only
                    ||
                    direction == Unparser.Direction.LeftToRight && childLocation == ChildLocation.First
                    ||
                    direction == Unparser.Direction.RightToLeft && childLocation == ChildLocation.Last;

                return new FormatYielder(this)
                {
                    topAncestorCacheForLeft = isLeftMostChild
                        ? this.topAncestorCacheForLeft
                        : (child ?? UnparsableAst.NonCalculated)
                };
            }
        }

Same methods

FormatYielder::Spawn ( ChildLocation childLocation = ChildLocation.Unknown ) : FormatYielder