Exemplo n.º 1
0
        internal static EnvDTE.CodeDelegate CreateUnknown(
            CodeModelState state,
            FileCodeModel fileCodeModel,
            int nodeKind,
            string name)
        {
            var element = new CodeDelegate(state, fileCodeModel, nodeKind, name);

            return((EnvDTE.CodeDelegate)ComAggregate.CreateAggregatedObject(element));
        }
Exemplo n.º 2
0
        internal static EnvDTE.CodeDelegate Create(
            CodeModelState state,
            FileCodeModel fileCodeModel,
            SyntaxNodeKey nodeKey,
            int?nodeKind)
        {
            var element = new CodeDelegate(state, fileCodeModel, nodeKey, nodeKind);
            var result  = (EnvDTE.CodeDelegate)ComAggregate.CreateAggregatedObject(element);

            fileCodeModel.OnCodeElementCreated(nodeKey, (EnvDTE.CodeElement)result);

            return(result);
        }