public static void AddToSourceLocations(IEnumerable<Object> items, SourceLocations locations) { if (locations == null || items == null) { return; } foreach (var item in items) { AddToSourceLocations(item, locations); } }
public SourceLocations Add(SourceLocations locations) { if (locations == null) { return this; } foreach (var location in locations.m_sourcesByName.Values) { Add(location); } return this; }
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); } } }
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; }