internal static AssociatedHandlesCollection <HandleGraph <FilterHandle> > Build (Encoding encoding, IReadOnlyList <Filter> filters) { var result = new AssociatedHandlesCollection <HandleGraph <FilterHandle> > (filters.Count); try { foreach (var filter in filters) { var filterHandle = filter.Build(encoding); result.Add(filterHandle); } return(result); } catch (Exception initEx) { try { result.Dispose(); } catch (Exception cleanupEx) { throw new AggregateException(initEx, cleanupEx); } throw; } }
protected override void DisposeChildren() => children_.Dispose();