public EndpointConfiguration( [NotNull] TypeConfiguration <T, TId> typeConfig, [NotNull] ICrudEndpoint <T, TId> endpoint) { if (typeConfig == null) { throw new ArgumentNullException(nameof(typeConfig)); } if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } TypeConfig = typeConfig; Endpoint = endpoint; EndpointType = typeof(T); }
/// <summary> /// Sources contain their endpoint which provides the possibility to create various channels /// on the same endpoint types. This does imply multiple channels could be writing to the same /// endpoint. In the future it might be appropriate to provide endpoint factories instead of /// instances. /// </summary> /// <typeparam name="TDerived">The type this endpoint serves.</typeparam> /// <param name="endpoint">The endpoint instance.</param> public void AddEndpoint <TDerived>(ICrudEndpoint <TDerived, TId> endpoint) where TDerived : T { _endpoints.Add(typeof(TDerived), endpoint); }
public EndpointConfiguration(TypeConfiguration <T, TId> typeConfig, ICrudEndpoint <T, TId> endpoint) { TypeConfig = typeConfig; Endpoint = endpoint; }