public void RemoveUnusedContexts() { var usedIds = new HashSet <string>(); var contextIds = Facts. Where(f => f.Context != null). Select(f => f.Context.Id). Concat(FilingIndicators.Select(f => f.ContextRef)). Distinct(). ToList(); usedIds.UnionWith(contextIds); GetUsedContexts(Facts, usedIds); Contexts.RemoveUnusedItems(usedIds); }
public bool Equals(Instance other) { var result = false; if (other != null) { if (SchemaReference.Equals(other.SchemaReference)) { if (Units.Equals(other.Units)) { if (FilingIndicators.Equals(other.FilingIndicators)) { if (Contexts.Equals(other.Contexts)) { result |= Facts.Equals(other.Facts); } } } } } return(result); }
public FilingIndicator AddFilingIndicator(Context context, string value, bool filed) { return(FilingIndicators.Add(context, value, filed)); }
public override int GetHashCode() { return(SchemaReference.GetHashCode() ^ Units.GetHashCode() ^ FilingIndicators.GetHashCode()); }