示例#1
0
 public static void AddToSourceLocations(IEnumerable<Object> items, SourceLocations locations)
 {
     if (locations == null || items == null) {
         return;
     }
     foreach (var item in items) {
         AddToSourceLocations(item, locations);
     }
 }
示例#2
0
 public SourceLocations Add(SourceLocations locations)
 {
     if (locations == null) {
         return this;
     }
     foreach (var location in locations.m_sourcesByName.Values) {
         Add(location);
     }
     return this;
 }
示例#3
0
 public static void AddToSourceLocations(Object obj, SourceLocations locations)
 {
     if (locations == null) {
         return;
     }
     var source = GetOrSet(obj);
     if (source != null) {
         foreach (var location in locations.m_sourcesByName.Values) {
             source.Add(location);
         }
     }
 }
示例#4
0
 private static SourceLocations GetOrSet(Object obj)
 {
     var taker = obj as ITakeSourceLocation;
     if (taker != null) {
         var source = taker.Source;
         if (source == null) {
             source = new SourceLocations();
             taker.Source = source;
         }
         return source;
     }
     return null;
 }