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; } }
public ChildHandles(THandle impl, AssociatedHandlesCollection <HandleGraph <THandle> > children) : base(impl) { if (children == null) { throw new ArgumentNullException(nameof(children)); } children_ = children; }
internal static HandleGraph <THandle> Composite(THandle impl, AssociatedHandlesCollection <HandleGraph <THandle> > children) => new ChildHandles(impl, children);