Exemple #1
0
            // Stolen from Microsoft.VisualStudio.CSharp.Services.Language.Refactoring.RefactoringInterop
            internal static FindSourceDefinitionsAndDetermineSymbolResult FindSourceDefinitionsAndDetermineSymbolFromParseTree(IDECompilation compilation, IRefactorProgressUI progressUI, ParseTreeNode parseTreeNode)
            {
                SourceDefinitionOutputs sourceDefinitionOutputs = new SourceDefinitionOutputs();
                SymbolInfoHolder        symbolInfoHolder        = new SymbolInfoHolder();

                ParseTree.Handle anonymousTypePropertyRefOwnerHandle;
                NamedSymbolKind  definitionKind;

                Refactoring_FindSourceDefinitionsAndDetermineSymbolFromParseTree(
                    CompilationHandle(compilation),
                    progressUI,
                    ParseTreeNodePointer(parseTreeNode),
                    out definitionKind,
                    out symbolInfoHolder.rqName,
                    out symbolInfoHolder.RQNameForParameterFromOtherPartialMethod,
                    out symbolInfoHolder.assemblyName,
                    out symbolInfoHolder.namespaceDefiningAssemblies,
                    out anonymousTypePropertyRefOwnerHandle,
                    out symbolInfoHolder.anonymousTypePropertyRefNodePointer,
                    out sourceDefinitionOutputs.hasExternalVisibility,
                    out sourceDefinitionOutputs.fileNames,
                    out sourceDefinitionOutputs.nodeOwners,
                    out sourceDefinitionOutputs.nodePointers,
                    out symbolInfoHolder.anonymousTypePropertyReferenceToSelfArray
                    );
                return(new FindSourceDefinitionsAndDetermineSymbolResult(compilation, sourceDefinitionOutputs, symbolInfoHolder));
            }
            // Stolen from Microsoft.VisualStudio.CSharp.Services.Language.Refactoring.RefactoringInterop
            internal static FindSourceDefinitionsAndDetermineSymbolResult FindSourceDefinitionsAndDetermineSymbolFromParseTree(IDECompilation compilation, IRefactorProgressUI progressUI, ParseTreeNode parseTreeNode)
            {
                SourceDefinitionOutputs sourceDefinitionOutputs = new SourceDefinitionOutputs();
                SymbolInfoHolder symbolInfoHolder = new SymbolInfoHolder();

                ParseTree.Handle anonymousTypePropertyRefOwnerHandle;
                NamedSymbolKind definitionKind;

                Refactoring_FindSourceDefinitionsAndDetermineSymbolFromParseTree(
                    CompilationHandle(compilation),
                    progressUI,
                    ParseTreeNodePointer(parseTreeNode),
                    out definitionKind,
                    out symbolInfoHolder.rqName,
                    out symbolInfoHolder.RQNameForParameterFromOtherPartialMethod,
                    out symbolInfoHolder.assemblyName,
                    out symbolInfoHolder.namespaceDefiningAssemblies,
                    out anonymousTypePropertyRefOwnerHandle,
                    out symbolInfoHolder.anonymousTypePropertyRefNodePointer,
                    out sourceDefinitionOutputs.hasExternalVisibility,
                    out sourceDefinitionOutputs.fileNames,
                    out sourceDefinitionOutputs.nodeOwners,
                    out sourceDefinitionOutputs.nodePointers,
                    out symbolInfoHolder.anonymousTypePropertyReferenceToSelfArray
                );
                return new FindSourceDefinitionsAndDetermineSymbolResult(compilation, sourceDefinitionOutputs, symbolInfoHolder);
            }
Exemple #3
0
                internal FindSourceDefinitionsAndDetermineSymbolResult(IDECompilation compilation, SourceDefinitionOutputs helper, SymbolInfoHolder symbolInfo) : base(compilation, helper)
                {
                    RQName = symbolInfo.rqName;
                    RQNameForParameterFromOtherPartialMethod = symbolInfo.RQNameForParameterFromOtherPartialMethod;
                    AssemblyName = symbolInfo.assemblyName;

                    if (symbolInfo.anonymousTypePropertyReferenceToSelfArray != null)
                    {
                        AnonymousTypePropertyReferenceToSelf =
                            symbolInfo.anonymousTypePropertyReferenceToSelfArray.Select(i => i != 0).ToList();
                    }
                    NamespaceDefiningAssemblies = new ReadOnlyCollection <string>(symbolInfo.namespaceDefiningAssemblies);
                }
                internal FindSourceDefinitionsAndDetermineSymbolResult(IDECompilation compilation, SourceDefinitionOutputs helper, SymbolInfoHolder symbolInfo)
                    : base(compilation, helper)
                {
                    RQName = symbolInfo.rqName;
                    RQNameForParameterFromOtherPartialMethod = symbolInfo.RQNameForParameterFromOtherPartialMethod;
                    AssemblyName = symbolInfo.assemblyName;

                    if (symbolInfo.anonymousTypePropertyReferenceToSelfArray != null) {
                        AnonymousTypePropertyReferenceToSelf =
                            symbolInfo.anonymousTypePropertyReferenceToSelfArray.Select(i => i != 0).ToList();
                    }
                    NamespaceDefiningAssemblies = new ReadOnlyCollection<string>(symbolInfo.namespaceDefiningAssemblies);
                }