void InitializeHost() { Debug.Assert(Description.Endpoints.Count == 0, "Please do not include endpoints in config. Instead, provide buffer addresses to the constructor"); Binding binding = new NetNamedPipeBinding(); binding.SendTimeout = TimeSpan.MaxValue; Type[] interfaces = typeof(T).GetInterfaces(); Debug.Assert(interfaces.Length > 0); foreach (Type interfaceType in interfaces) { if (interfaceType.GetCustomAttributes(typeof(ServiceContractAttribute), false).Length == 1) { ServiceBusHelper.VerifyOneway(interfaceType); string address = @"net.pipe://localhost/" + Guid.NewGuid(); AddServiceEndpoint(interfaceType, binding, address); } } m_Factory = binding.BuildChannelFactory <IDuplexSessionChannel>(); m_Factory.Open(); }
static BufferedServiceBusClient() { ServiceBusHelper.VerifyOneway(typeof(T)); }
static BufferedServiceBusChannelFactory() { ServiceBusHelper.VerifyOneway(typeof(T)); }