static public bool IsDefined(AddressFilterMode x) { return (x == AddressFilterMode.Exact || x == AddressFilterMode.Prefix || x == AddressFilterMode.Any); }
static public bool IsDefined(AddressFilterMode x) { return x == AddressFilterMode.Exact || x == AddressFilterMode.Prefix || x == AddressFilterMode.Any; }
public static bool IsDefined(AddressFilterMode x) { if ((x != AddressFilterMode.Exact) && (x != AddressFilterMode.Prefix)) { return (x == AddressFilterMode.Any); } return true; }
public static bool IsDefined(AddressFilterMode x) { if ((x != AddressFilterMode.Exact) && (x != AddressFilterMode.Prefix)) { return(x == AddressFilterMode.Any); } return(true); }
public ListenerLoopManager(ChannelDispatcher owner) { this.owner = owner; var sba = owner.Host != null?owner.Host.Description.Behaviors.Find <ServiceBehaviorAttribute> () : null; if (sba != null) { address_filter_mode = sba.AddressFilterMode; } }
public static void SetAddressFilterMode(this ServiceHostBase host, AddressFilterMode mode) { ServiceBehaviorAttribute existingBehavior = host.Description.Behaviors.FirstOrDefault(b => b.GetType() == typeof(ServiceBehaviorAttribute)) as ServiceBehaviorAttribute; if (existingBehavior == null) { existingBehavior = new ServiceBehaviorAttribute(); host.Description.Behaviors.Add(existingBehavior); } existingBehavior.AddressFilterMode = mode; }
public static IHost AddressFilterMode(this IHost me, AddressFilterMode mode) { (me as _Host).ServiceHost.Description.Behaviors.Find <ServiceBehaviorAttribute>().AddressFilterMode = mode; return(me); }
public void ConfigureService_alters_ServiceBehaviorAttribute(WcfServiceHostConfiguration <TestService> configurator, ServiceHost serviceHost, AddressFilterMode filterMode) { configurator.ConfigureService(service => service.AddressFilterMode = filterMode); configurator.ConfigureServiceHost(serviceHost); Assert.That(serviceHost.Description.Behaviors.Find <ServiceBehaviorAttribute>().AddressFilterMode, Is.EqualTo(filterMode)); }