Exemplo n.º 1
0
            public override Task <Script> InsertWithCursor(string operation, InsertPosition defaultPosition, IList <AstNode> nodes)
            {
                EntityDeclaration entity = context.GetNode <EntityDeclaration>();

                if (entity is Accessor)
                {
                    entity = (EntityDeclaration)entity.Parent;
                }

                foreach (var node in nodes)
                {
                    InsertBefore(entity, node);
                }
                var tcs = new TaskCompletionSource <Script> ();

                tcs.SetResult(this);
                return(tcs.Task);
            }
            public override void InsertWithCursor(string operation, AstNode node, InsertPosition defaultPosition)
            {
                var entity = context.GetNode <EntityDeclaration> ();

                InsertBefore(entity, node);
            }