/// <summary> /// This will build a proxy for the interface representing the gateway and register the /// proxy instance in the container based on the definition. /// </summary> /// <param name="container"><seealso cref="IContainer"/></param> /// <param name="gatewayDefinition">Definition of the gateway</param> public void BuildProxy(IObjectBuilder container, IGatewayDefinition gatewayDefinition) { var methodInterceptor = new GatewayMethodInterceptor(container, gatewayDefinition); var gatewayInstance = container.Resolve<IReflection>().GetTypeForNamedInstance(gatewayDefinition.Contract); var proxy = BuildFor(gatewayInstance, methodInterceptor); container.Register(gatewayDefinition.Id, gatewayInstance, proxy); }
/// <summary> /// Registers the specified types. /// </summary> /// <param name="types">The types.</param> public void Register(IEnumerable <Type> types) { _objectBuilder.Register(types); }