public Store <TOut> Get(Store <TIn> parameter) { var body = _body.Get(new ArrayView <TIn>(parameter.Instance, 0, parameter.Length)); var result = _stores.Get(body.Length); var bodyStart = body.Start + _limit.Or(body.Length); _apply(body.Array, result.Instance, body.Start, bodyStart, 0); return(result); }
public Store <T> Get() { var length = _results.Length; var result = _stores.Get(length); for (var i = 0u; i < length; i++) { result.Instance[i] = _results[i].Get(); } return(result); }
public Store <TOut> Get(Store <TIn> parameter) { var body = _body.Get(new ArrayView <TIn>(parameter.Instance, 0, parameter.Length)); var length = _limit.IsAssigned ? Math.Min(_limit.Instance, body.Length) : body.Length; var result = _stores.Get(length); var @in = body.Array; var @out = result.Instance; for (var i = 0; i < length; i++) { @out[i] = _select(@in[i + body.Start]); } return(result); }
public Array <IAspect <TIn, TOut> > Get(Array <Type> parameter) { var registrations = _registrations(); var to = registrations.Length; var elements = _stores.Get(to); var source = elements.Instance; var count = 0u; for (var i = 0u; i < to; i++) { var registration = registrations[i]; if (registration.Condition.Get(parameter)) { var instance = registration.Get(parameter); source[count++] = instance is IAspect <TIn, TOut> aspect ? aspect : _adapter.Get(instance); } } return(source.CopyInto(new IAspect <TIn, TOut> [count], 0, count)); }
public Store <T> Get(Store <T> parameter) { var other = _others.Get(); var source = other.Instance; var appending = other.Length; var body = _body.Get(new ArrayView <T>(parameter.Instance, 0, parameter.Length)); var @in = body.Array; var length = body.Length; var set = new Set <T>(_comparer); for (var i = body.Start; i < body.Start + length; i++) { set.Add(in @in[i]); } var count = 0u; for (var i = 0u; i < appending; i++) { var item = source[i]; if (set.Add(in item)) { source[count++] = item; } } var result = _stores.Get(_limit.IsAssigned ? Math.Min(_limit.Instance, length + count) : length + count); var @out = @in.CopyInto(result.Instance, body.Start, body.Length); for (var i = 0; i < count; i++) { @out[i + length] = source[i]; } return(result); }
public Store <T> Get(Store <T> parameter) { var other = _others.Get(); var source = other.Instance; var appending = _limit.IsAssigned ? Math.Min(_limit.Instance, other.Length) : other.Length; var body = _body.Get(new ArrayView <T>(parameter.Instance, 0, parameter.Length)); var @in = body.Array; var length = body.Length; var result = _stores.Get(length + appending); var @out = @in.CopyInto(result.Instance, body.Start, body.Length); for (var i = 0; i < appending; i++) { @out[i + length] = source[i]; } return(result); }