private string GetMethodSignature() { var methodElement = DataHelpers.GetElement(Archive, Data.PrimaryLocation); if (methodElement.Element(SRC.Block) != null) { methodElement.Element(SRC.Block).Remove(); } return(methodElement.ToSource().Trim()); }
public MethodDefinition(ISrcMLArchive archive, MethodData data, MethodCall fromCall) { this.Archive = archive; this.SourceCall = fromCall; this.Data = data; this.isValid = false; this.Location = data.PrimaryLocation; this.FullName = Data.GetFullName(); this.Id = DataHelpers.GetLocation(Location); this.Path = Location.SourceFileName; this.Signature = GetMethodSignature(); }
public MethodCall(ISrcMLArchive archive, CallData data) { this.Archive = archive; this.Data = data; this.firstMatchIsValid = false; this.hasMatches = false; this.hasNoMatches = false; this.isExternal = false; this.Location = data.Location; this.FullName = data.ParentScope.GetParentScopesAndSelf <INamedScope>().First().GetFullName(); this.Id = DataHelpers.GetLocation(data.Location); this.Path = this.Location.SourceFileName; this.numberOfValidMatches = 0; this.SourceCode = GetSourceCode(); PossibleMatches = new ObservableCollection <MethodDefinition>(GetMatches()); StartMonitoringDefinitions(); }
private string GetSourceCode() { var element = DataHelpers.GetElement(Archive, Data.Location); return(element.ToSource()); }