private void Initialize(Action <IUnionTypeDescriptor> configure) { if (configure == null) { throw new ArgumentNullException(nameof(configure)); } var descriptor = new UnionTypeDescriptor(GetType()); configure(descriptor); UnionTypeDescription description = descriptor.CreateDescription(); _types = description.Types; _resolveAbstractType = description.ResolveAbstractType; Name = description.Name; Description = description.Description; }
private void Initialize(Action <IUnionTypeDescriptor> configure) { if (configure == null) { throw new ArgumentNullException(nameof(configure)); } var descriptor = new UnionTypeDescriptor(GetType()); configure(descriptor); UnionTypeDescription description = descriptor.CreateDescription(); _types = description.Types; _resolveAbstractType = description.ResolveAbstractType; Initialize(description.Name, description.Description, new DirectiveCollection(this, DirectiveLocation.Union, description.Directives)); }