internal static void Map(EndpointAddressProvider <T> endpointAddressProvider) { if (Cached.Metadata.IsValueCreated) { throw new InvalidOperationException("The correlationId pipe has already been created"); } Cached.Metadata = new Lazy <IEndpointConventionCache <T> >(() => new EndpointConventionCache <T>(endpointAddressProvider)); }
/// <summary> /// Map the message type to the endpoint returned by the specified method /// </summary> /// <typeparam name="T"></typeparam> /// <param name="endpointAddressProvider"></param> public static void Map <T>(EndpointAddressProvider <T> endpointAddressProvider) where T : class { EndpointConventionCache <T> .Map(endpointAddressProvider); }
EndpointConventionCache(EndpointAddressProvider <T> endpointAddressProvider) { _endpointAddressProvider = new Lazy <EndpointAddressProvider <T> >(() => endpointAddressProvider); }