MonoDevelop.Refactoring.InsertionPointService.GetNewMethodPosition C# (CSharp) Method

GetNewMethodPosition() static private method

static private GetNewMethodPosition ( IReadonlyTextDocument data, IEnumerable points, ITypeSymbol cls, Location part ) : MonoDevelop.Ide.Editor.InsertionPoint
data IReadonlyTextDocument
points IEnumerable
cls ITypeSymbol
part Location
return MonoDevelop.Ide.Editor.InsertionPoint
		static InsertionPoint GetNewMethodPosition (IReadonlyTextDocument data, IEnumerable<InsertionPoint> points, ITypeSymbol cls, Location part)
		{
			if (!cls.GetMembers ().OfType<IMethodSymbol> ().Any ()) 
				return GetNewPropertyPosition (data, points, cls, part);
			var lastMethod = cls.GetMembers ().OfType<IMethodSymbol> ().Last ();
			var begin = data.OffsetToLocation (lastMethod.Locations.First ().SourceSpan.Start);
			return points.FirstOrDefault (p => p.Location > begin);
		}