public ProjectionOptions(IProjectionOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } this.Separator = options.Separator; }
public Projection(ProjectionIdentity identity, IProcContext context, IProjectionMetadata metadata) { this.Identity = identity ?? throw ProjectionException.ArgumentNull(nameof(identity), metadata); this.Context = context ?? throw ProjectionException.ArgumentNull(nameof(context), metadata); this.Metadata = metadata; this.Data = ProjectionData.Resolve(identity); this.Options = ProjectionOptions.Default; this.Header = this.CreateDefaultHeader(metadata); }
public IProjection With(IProjectionMetadata metadata = null, IEnumerable <IProjectionAttribute> attributes = null, IField field = null, IProjectionOptions options = null) { IProjectionMetadata newMetadata = metadata ?? this.Metadata; IEnumerable <IProjectionAttribute> newAttributes = attributes ?? (newMetadata != this.Metadata ? this.CreateDefaultAttributes(newMetadata) : this.Attributes); IField newField = field ?? this.Source; IProjectionOptions newOptions = options ?? this.Options; return(new Projection(this, newMetadata, newAttributes, newField, newOptions)); }
public IProjection With(IProjectionMetadata metadata = null, IProjectionData data = null, IEnumerable <IProjectionAttribute> header = null, IProjectionOptions options = null) { IProjectionMetadata newMetadata = metadata ?? this.Metadata; IProjectionData newData = data ?? this.Data; IEnumerable <IProjectionAttribute> newHeader = header ?? (newMetadata != this.Metadata ? this.CreateDefaultHeader(newMetadata) : this.Header); IProjectionOptions newOptions = options ?? this.Options; return(new Projection(this, newMetadata, newData, newHeader, newOptions)); }
protected Projection(IProjection projection, IProjectionMetadata metadata, IProjectionData data, IEnumerable <IProjectionAttribute> header, IProjectionOptions options) { if (projection == null) { throw ProjectionException.ArgumentNull(nameof(projection), metadata: null); } this.Identity = projection.Identity; this.Context = projection.Context; this.Metadata = metadata ?? throw ProjectionException.ArgumentNull(nameof(metadata), metadata); this.Data = data; this.Header = header ?? throw ProjectionException.ArgumentNull(nameof(header), metadata); this.Options = options ?? throw ProjectionException.ArgumentNull(nameof(options), metadata); }
protected Projection(IProjection projection) { if (projection == null) { throw ProjectionException.ArgumentNull(nameof(projection), metadata: null); } this.Identity = projection.Identity; this.Context = projection.Context; this.Metadata = projection.Metadata; this.Data = projection.Data; this.Header = projection.Header; this.Options = projection.Options; }
protected Projection(IProjection projection, IProjectionMetadata metadata, IEnumerable <IProjectionAttribute> attributes, IField field, IProjectionOptions options) { if (projection == null) { throw ProjectionException.ArgumentNull(nameof(projection)); } this.Identity = projection.Identity; this.Context = projection.Context; this.Metadata = metadata ?? throw ProjectionException.ArgumentNull(nameof(projection)); this.Attributes = attributes ?? throw ProjectionException.ArgumentNull(nameof(attributes)); this.Options = options ?? throw ProjectionException.ArgumentNull(nameof(options)); this.Source = field; }
public new IProjection <TModel> With(IProjectionMetadata metadata = null, IEnumerable <IProjectionAttribute> attributes = null, IField field = null, IProjectionOptions options = null) => new Projection <TModel>(base.With(metadata, attributes, field, options));
public new IProjection <TModel> With(IProjectionMetadata metadata = null, IProjectionData data = null, IEnumerable <IProjectionAttribute> header = null, IProjectionOptions options = null) => new Projection <TModel>(base.With(metadata, data, header, options));