コード例 #1
0
ファイル: ResolveResult.cs プロジェクト: carlhuth/GenXSource
        protected ArrayList GetCompletionData(LanguageProperties language, bool showStatic)
        {
            if (resolvedType == null)
            {
                return(null);
            }
            ArrayList res = new ArrayList();
            bool      isClassInInheritanceTree = false;

            if (callingClass != null)
            {
                isClassInInheritanceTree = callingClass.IsTypeInInheritanceTree(resolvedType.GetUnderlyingClass());
            }
            foreach (IMethod m in resolvedType.GetMethods())
            {
                if (language.ShowMember(m, showStatic) && m.IsAccessible(callingClass, isClassInInheritanceTree))
                {
                    res.Add(m);
                }
            }
            foreach (IEvent e in resolvedType.GetEvents())
            {
                if (language.ShowMember(e, showStatic) && e.IsAccessible(callingClass, isClassInInheritanceTree))
                {
                    res.Add(e);
                }
            }
            foreach (IField f in resolvedType.GetFields())
            {
                if (language.ShowMember(f, showStatic) && f.IsAccessible(callingClass, isClassInInheritanceTree))
                {
                    res.Add(f);
                }
            }
            foreach (IProperty p in resolvedType.GetProperties())
            {
                if (language.ShowMember(p, showStatic) && p.IsAccessible(callingClass, isClassInInheritanceTree))
                {
                    res.Add(p);
                }
            }

            if (!showStatic && callingClass != null)
            {
                AddExtensions(language, res, callingClass, resolvedType);
            }

            return(res);
        }
コード例 #2
0
		protected ArrayList GetCompletionData(LanguageProperties language, bool showStatic)
		{
			if (resolvedType == null) return null;
			ArrayList res = new ArrayList();
			bool isClassInInheritanceTree = false;
			if (callingClass != null)
				isClassInInheritanceTree = callingClass.IsTypeInInheritanceTree(resolvedType.GetUnderlyingClass());
			foreach (IMethod m in resolvedType.GetMethods()) {
				if (language.ShowMember(m, showStatic) && m.IsAccessible(callingClass, isClassInInheritanceTree))
					res.Add(m);
			}
			foreach (IEvent e in resolvedType.GetEvents()) {
				if (language.ShowMember(e, showStatic) && e.IsAccessible(callingClass, isClassInInheritanceTree))
					res.Add(e);
			}
			foreach (IField f in resolvedType.GetFields()) {
				if (language.ShowMember(f, showStatic) && f.IsAccessible(callingClass, isClassInInheritanceTree))
					res.Add(f);
			}
			foreach (IProperty p in resolvedType.GetProperties()) {
				if (language.ShowMember(p, showStatic) && p.IsAccessible(callingClass, isClassInInheritanceTree))
					res.Add(p);
			}
			
			if (!showStatic && callingClass != null) {
				AddExtensions(language, res, callingClass, resolvedType);
			}
			
			return res;
		}
コード例 #3
0
        protected List <ICompletionEntry> GetCompletionData(LanguageProperties language, bool showStatic)
        {
            if (resolvedType == null)
            {
                return(null);
            }
            List <ICompletionEntry> res = new List <ICompletionEntry>();

            foreach (IMember m in MemberLookupHelper.GetAccessibleMembers(resolvedType, callingClass, language))
            {
                if (language.ShowMember(m, showStatic))
                {
                    res.Add(m);
                }
            }

            if (!showStatic && callingClass != null)
            {
                AddExtensions(language, res.Add, callingClass, resolvedType, this.showAllNamespacesContentsInCC);
            }

            return(res);
        }
コード例 #4
0
        protected ArrayList GetCompletionData(LanguageProperties language, bool showStatic)
        {
            if (resolvedType == null)
            {
                return(null);
            }
            ArrayList res = new ArrayList();

            foreach (IMember m in MemberLookupHelper.GetAccessibleMembers(resolvedType, callingClass, language))
            {
                if (language.ShowMember(m, showStatic))
                {
                    res.Add(m);
                }
            }

            if (!showStatic && callingClass != null)
            {
                AddExtensions(language, res, callingClass, resolvedType);
            }

            return(res);
        }