ICSharpCode.NRefactory.CSharp.Completion.CSharpCompletionEngine.GetPartialCompletionData C# (CSharp) Method

GetPartialCompletionData() private method

private GetPartialCompletionData ( ITypeDefinition type, string modifiers ) : IEnumerable
type ITypeDefinition
modifiers string
return IEnumerable
		IEnumerable<ICompletionData> GetPartialCompletionData(ITypeDefinition type, string modifiers)
		{
			var wrapper = new CompletionDataWrapper(this);
			int declarationBegin = offset;
			int j = declarationBegin;
			for (int i = 0; i < 3; i++) {
				switch (GetPreviousToken(ref j, true)) {
					case "public":
					case "protected":
					case "private":
					case "internal":
					case "sealed":
					case "override":
						declarationBegin = j;
						break;
					case "static":
						return null; // don't add override completion for static members
				}
			}
			
			var methods = new List<IUnresolvedMethod>();
			
			foreach (var part in type.Parts) {
				foreach (var method in part.Methods) {
					if (method.BodyRegion.IsEmpty) {
						if (GetImplementation(type, method) != null) {
							continue;
						}
						methods.Add(method);
					}
				}	
			}
			
			foreach (var method in methods) {
				wrapper.Add(factory.CreateNewPartialCompletionData(
					declarationBegin,
					method.DeclaringTypeDefinition,
					method
				)
				);
			} 
			
			return wrapper.Result;
		}