Ejemplo n.º 1
0
		private void RegisterErrorHandlerBehavior(ErrorHandlerBehavior errorHandlerBehavior, ServiceHostBase host)
		{
			if (host.Description.Behaviors.Find<ErrorHandlerBehavior>() == null)
			{
				host.Description.Behaviors.Add(errorHandlerBehavior);
			}
		}
Ejemplo n.º 2
0
 private void RegisterErrorHandlerBehavior(ErrorHandlerBehavior errorHandlerBehavior, ServiceHostBase host)
 {
     if (host.Description.Behaviors.Find <ErrorHandlerBehavior>() == null)
     {
         host.Description.Behaviors.Add(errorHandlerBehavior);
     }
 }
Ejemplo n.º 3
0
		public EncapsulatedHost(
			ServiceHost host,
			Type serviceContractType,
			object service,
			Binding binding,
			string url,
			bool registerErrorHandler)
		{
			this.host = host;
			host.AddServiceEndpoint(serviceContractType, binding, url);

			RegisterServiceDebugBehavior(host);

			RegisterDependencyServiceBehavior(service, host);

			if (!registerErrorHandler)
			{
				return;
			}

			errorHandlerBehavior = new ErrorHandlerBehavior();
			RegisterErrorHandlerBehavior(errorHandlerBehavior, host);
		}
Ejemplo n.º 4
0
        public EncapsulatedHost(
            ServiceHost host,
            Type serviceContractType,
            object service,
            Binding binding,
            string url,
            bool registerErrorHandler)
        {
            this.host = host;
            host.AddServiceEndpoint(serviceContractType, binding, url);

            RegisterServiceDebugBehavior(host);

            RegisterDependencyServiceBehavior(service, host);

            if (!registerErrorHandler)
            {
                return;
            }

            errorHandlerBehavior = new ErrorHandlerBehavior();
            RegisterErrorHandlerBehavior(errorHandlerBehavior, host);
        }