Пример #1
0
        public ReadOnlyCollection <ILocation> GetLocationsOfLine(string stratum, string sourceName, int lineNumber)
        {
            if (stratum != "Java")
            {
                return(new ReadOnlyCollection <ILocation>(new ILocation[0]));
            }

            if (Path.GetFileName(sourceName) != Path.GetFileName(DeclaringType.GetSourceName()))
            {
                return(new ReadOnlyCollection <ILocation>(new ILocation[0]));
            }

            List <ILocation> locations = new List <ILocation>(GetLineLocations().Where(i => i.GetLineNumber() == lineNumber));

            return(locations.AsReadOnly());
        }
Пример #2
0
 public ReadOnlyCollection <ILocation> GetLocationsOfLine(int lineNumber)
 {
     return(GetLocationsOfLine(DeclaringType.GetDefaultStratum(), DeclaringType.GetSourceName(), lineNumber));
 }