public FuncDescriptor Build() { Delegate[] binders = this.relationNode.Fields.Select(this.CreateBinder).ToArray(); MetadataIdentity[] attributes = this.relationNode.Attributes; IMetadataNotation notation = this.relationNode.Identity.Schema.Notation; Action <IField, IEnumerator[], IField[]>[] funcs = new Action <IField, IEnumerator[], IField[]> [this.relationNode.Items.Count]; MetadataIdentity[] listIds = new MetadataIdentity[this.relationNode.Items.Count]; for (int i = 0; i < funcs.Length; i++) { ReadFields itemReader = this.GetItemReader(this.relationNode.Items[i]); funcs[i] = (source, enumerators, fields) => itemReader(source.Model, source, attributes, binders, enumerators, fields, notation); listIds[i] = this.relationNode.Items[i].List?.Metadata.Identity ?? this.relationNode.Items[i].Metadata.Identity; } return(new FuncDescriptor() { Factories = funcs, Degree = this.relationNode.Degree, VisibleDegree = this.relationNode.VisibleDegree, Identity = this.relationNode.Identity, Lists = listIds, }); }
public SchemaStore(IMetadataNotation notation, IEnumerable <IMetadataBuilder> builders) : this(notation) { foreach (IMetadataBuilder builder in builders?.NotNull() ?? Array.Empty <IMetadataBuilder>()) { this.Add(builder); } }
public SchemaStore(IMetadataNotation notation, params IMetadataBuilder[] builders) : this(notation, (IEnumerable <IMetadataBuilder>)builders) { }
public SchemaStore(IMetadataNotation notation) { this.Notation = notation ?? throw new ArgumentNullException(nameof(notation)); }