protected IMember Resolve(ITreeNavigator treeBuilder, IUnresolvedMember member, ITypeDefinition currentType = null)
        {
            var ctx = GetContext(treeBuilder);

            return(member.CreateResolved(currentType != null ? ctx.WithCurrentTypeDefinition(currentType) : ctx));
        }
		protected IMember Resolve (ITreeNavigator treeBuilder, IUnresolvedMember member, ITypeDefinition currentType = null)
		{
			var ctx = GetContext (treeBuilder);
			return member.CreateResolved (currentType != null ? ctx.WithCurrentTypeDefinition (currentType) : ctx);
		}
Esempio n. 3
0
            ICompletionData ICompletionDataFactory.CreateNewPartialCompletionData(int declarationBegin, IUnresolvedTypeDefinition type, IUnresolvedMember m)
            {
                var ctx = ext.CSharpUnresolvedFile.GetTypeResolveContext(ext.UnresolvedFileCompilation, ext.document.Editor.Caret.Location);

                return(new NewOverrideCompletionData(ext, declarationBegin, type, m.CreateResolved(ctx)));
            }
		protected IMember Resolve (ITreeNavigator treeBuilder, IUnresolvedMember member)
		{
			var mainAssembly = GetMainAssembly (treeBuilder);
			if (mainAssembly != null) {
				var simpleCompilation = new SimpleCompilation (mainAssembly);
				return member.CreateResolved (new SimpleTypeResolveContext (simpleCompilation.MainAssembly));
			}
			var project = (Project)treeBuilder.GetParentDataItem (typeof(Project), true);
			var ctx = TypeSystemService.GetCompilation (project);
			return member.CreateResolved (ctx.TypeResolveContext);
		}