Example #1
0
 static ServiceHost GetConfiguredHost(Type service, Type contract, string address, IRoleInspectorFactory factory)
 {
     var host = GetConfiguredHost(service, contract, address);
     host.Description.Endpoints[0].EndpointBehaviors.Add(new EmployeeValidationBehavior());
     host.Description.Endpoints[0].EndpointBehaviors.Add(new RoleValidationBehavior() {
         Factory = factory
     });
     return host;
 }
Example #2
0
        static ServiceHost GetConfiguredHost(Type service, Type contract, string address, IRoleInspectorFactory factory)
        {
            var host = GetConfiguredHost(service, contract, address);

            host.Description.Endpoints[0].EndpointBehaviors.Add(new EmployeeValidationBehavior());
            host.Description.Endpoints[0].EndpointBehaviors.Add(new RoleValidationBehavior()
            {
                Factory = factory
            });
            return(host);
        }