private IEnumerable <IPrimarySourceLocation /*?*/> MapLocationToSourceLocations(ILocation location) { IILLocation /*?*/ mbLocation = location as IILLocation; ISourceLocationProvider provider = this.GetProvider(mbLocation); if (provider != null) { return(provider.GetPrimarySourceLocationsFor(location)); } return(Enumerable <IPrimarySourceLocation> .Empty); }
private IEnumerable <IPrimarySourceLocation /*?*/> MapLocationToSourceLocations(ILocation location) { IILLocation /*?*/ mbLocation = location as IILLocation; ISourceLocationProvider provider = this.GetProvider(mbLocation); if (provider != null) { foreach (var psloc in provider.GetPrimarySourceLocationsFor(location)) { yield return(psloc); } } }
private bool MakeSureSliceHasAtLeastMethodSourceLocation(ISlice <MethodReferenceAdaptor, FieldReferenceAdaptor, TypeReferenceAdaptor, IAssemblyReference> slice, ISourceLocationProvider sourceLocationProvider) { Contract.Requires(slice != null); Contract.Requires(sourceLocationProvider != null); foreach (var m in slice.Methods) { var methodDefinition = m.reference.ResolvedMethod; if (sourceLocationProvider.GetPrimarySourceLocationsFor(methodDefinition.Locations).Any()) { return(true); } } return(false); }