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);
 }
Example #2
0
 /// <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);
 }
Example #3
0
 public EndpointConfiguration(TypeConfiguration <T, TId> typeConfig, ICrudEndpoint <T, TId> endpoint)
 {
     TypeConfig = typeConfig;
     Endpoint   = endpoint;
 }