Exemplo n.º 1
0
        public ICompletionSource TryCreateCompletionSource(ITextBuffer buffer)
        {
            Func <CodeCompletionSource> sc = delegate()
            {
                var labelGraph   = AsmDudeToolsStatic.GetOrCreate_Label_Graph(buffer, this._aggregatorFactory, this._docFactory, this._contentService);
                var asmSimulator = AsmSimulator.GetOrCreate_AsmSimulator(buffer, this._aggregatorFactory);
                return(new CodeCompletionSource(buffer, labelGraph, asmSimulator));
            };

            return(buffer.Properties.GetOrCreateSingletonProperty(sc));
        }
Exemplo n.º 2
0
        public ICompletionSource TryCreateCompletionSource(ITextBuffer buffer)
        {
            Contract.Requires(buffer != null);
            CodeCompletionSource sc()
            {
                LabelGraph   labelGraph   = AsmDudeToolsStatic.GetOrCreate_Label_Graph(buffer, this.aggregatorFactory_, this.docFactory_, this.contentService_);
                AsmSimulator asmSimulator = AsmSimulator.GetOrCreate_AsmSimulator(buffer, this.aggregatorFactory_);

                return(new CodeCompletionSource(buffer, labelGraph, asmSimulator));
            }

            return(buffer.Properties.GetOrCreateSingletonProperty(sc));
        }