ICSharpCode.NRefactory.CSharp.Completion.CompletionDataWrapper.GetCompletionCategory C# (CSharp) Метод

GetCompletionCategory() приватный Метод

private GetCompletionCategory ( IType type ) : CompletionCategory
type IType
Результат CompletionCategory
		internal CompletionCategory GetCompletionCategory (IType type)
		{
			if (type == null)
				return null;
			if (!completionCategories.ContainsKey (type))
				completionCategories [type] = new TypeCompletionCategory (type);
			return completionCategories [type];
		}
		

Usage Example

Пример #1
0
        void AddVirtuals(Dictionary<string, bool> alreadyInserted, CompletionDataWrapper col, ITypeDefinition type, string modifiers, ITypeDefinition curType, int declarationBegin)
        {
            if (curType == null)
                return;
            foreach (var m in curType.Methods.Where (m => !m.IsConstructor && !m.IsDestructor).Cast<IMember> ().Concat (curType.Properties.Cast<IMember> ())) {
                if (m.IsSynthetic || curType.Kind != TypeKind.Interface && !(m.IsVirtual || m.IsOverride || m.IsAbstract))
                    continue;
                // filter out the "Finalize" methods, because finalizers should be done with destructors.
                if (m is IMethod && m.Name == "Finalize")
                    continue;

                var data = factory.CreateNewOverrideCompletionData (declarationBegin, type.Parts.First (), m);
                string text = GetNameWithParamCount (m);

                // check if the member is already implemented
                bool foundMember = type.Members.Any (cm => GetNameWithParamCount (cm) == text);
                if (!foundMember && !alreadyInserted.ContainsKey (text)) {
                    alreadyInserted [text] = true;
                    data.CompletionCategory = col.GetCompletionCategory (curType);
                    col.Add (data);
                }
            }
        }
All Usage Examples Of ICSharpCode.NRefactory.CSharp.Completion.CompletionDataWrapper::GetCompletionCategory