當前位置: 首頁>>代碼示例>>C#>>正文


C# Dispatcher.ClientRuntime類代碼示例

本文整理匯總了C#中System.ServiceModel.Dispatcher.ClientRuntime的典型用法代碼示例。如果您正苦於以下問題:C# ClientRuntime類的具體用法?C# ClientRuntime怎麽用?C# ClientRuntime使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ClientRuntime類屬於System.ServiceModel.Dispatcher命名空間,在下文中一共展示了ClientRuntime類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: BuildProxyBehavior

        internal static ClientRuntime BuildProxyBehavior(ServiceEndpoint serviceEndpoint, out BindingParameterCollection parameters)
        {
            parameters = new BindingParameterCollection();
            SecurityContractInformationEndpointBehavior.ClientInstance.AddBindingParameters(serviceEndpoint, parameters);

            AddBindingParameters(serviceEndpoint, parameters);

            ContractDescription contractDescription = serviceEndpoint.Contract;
            ClientRuntime clientRuntime = new ClientRuntime(contractDescription.Name, contractDescription.Namespace);
            clientRuntime.ContractClientType = contractDescription.ContractType;

            IdentityVerifier identityVerifier = serviceEndpoint.Binding.GetProperty<IdentityVerifier>(parameters);
            if (identityVerifier != null)
            {
                clientRuntime.IdentityVerifier = identityVerifier;
            }

            for (int i = 0; i < contractDescription.Operations.Count; i++)
            {
                OperationDescription operation = contractDescription.Operations[i];

                if (!operation.IsServerInitiated())
                {
                    DispatcherBuilder.BuildProxyOperation(operation, clientRuntime);
                }
                else
                {
                    DispatcherBuilder.BuildDispatchOperation(operation, clientRuntime.CallbackDispatchRuntime);
                }
            }

            DispatcherBuilder.ApplyClientBehavior(serviceEndpoint, clientRuntime);
            return clientRuntime;
        }
開發者ID:shijiaxing,項目名稱:wcf,代碼行數:34,代碼來源:DispatcherBuilder.cs

示例2: ApplyClientBehavior

 public void ApplyClientBehavior(ContractDescription contractDescription, ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     clientRuntime.ChannelInitializers.Add(new MyChannelInitializer(false));
     clientRuntime.InteractiveChannelInitializers.Add(new MyInteractiveChannelInitializer());
     clientRuntime.MessageInspectors.Add(new MyClientMessageInspector());
     clientRuntime.OperationSelector = new MyClientOperationSelector();
 }
開發者ID:huoxudong125,項目名稱:WcfEverywhere,代碼行數:7,代碼來源:MyBehavior.cs

示例3: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     foreach (var operation in endpoint.Contract.Operations)
     {
         DecorateFormatterBehavior(operation, clientRuntime);
     }
 }
開發者ID:peterluo0822,項目名稱:wcf-1,代碼行數:7,代碼來源:BinaryFormatterBehavior.cs

示例4: NotImplementedException

		void IContractBehavior.ApplyClientBehavior (
			ContractDescription description,
			ServiceEndpoint endpoint,
			ClientRuntime proxy)
		{
			throw new NotImplementedException ();
		}
開發者ID:nickchal,項目名稱:pash,代碼行數:7,代碼來源:DeliveryRequirementsAttribute.cs

示例5: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     foreach (var op in clientRuntime.ClientOperations)
     {
         op.ClientParameterInspectors.Add(new WcfServiceCallInspector(op.Parent.ContractClientType.FullName));
     }
 }
開發者ID:higeneko2015,項目名稱:WCFCommon,代碼行數:7,代碼來源:WcfServiceLoggerBehavior.cs

示例6: ApplyClientBehavior

		/// <summary>
		/// Injects the user agent into the service request.
		/// </summary>
		/// <param name="endpoint">The enpoint of the service for which to set the user-agent.</param>
		/// <param name="clientRuntime">The client runtime.</param>
		public override void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
		{
			base.ApplyClientBehavior(endpoint, clientRuntime);
			CookieMessageInspector cmiInspector = new CookieMessageInspector(m_dicAuthenticationCookies);
			clientRuntime.MessageInspectors.Add(cmiInspector);

		}
開發者ID:etinquis,項目名稱:nexusmodmanager,代碼行數:12,代碼來源:CookieEndpointBehaviour.cs

示例7: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     foreach (ClientOperation operation in clientRuntime.Operations)
     {
         operation.ParameterInspectors.Add(new ConsumerInspector());
     }
 }
開發者ID:jpsfs,項目名稱:feup-tdin-wcf_silverlight,代碼行數:7,代碼來源:ConsumerEndpointBehavior.cs

示例8: ApplyClientBehavior

		/// <summary>
		/// Injects the user agent into the service request.
		/// </summary>
		/// <param name="endpoint">The enpoint of the service for which to set the user-agent.</param>
		/// <param name="clientRuntime">The client runtime.</param>
		public override void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
		{
			base.ApplyClientBehavior(endpoint, clientRuntime);
			HttpUserAgentMessageInspector amiInspector = new HttpUserAgentMessageInspector(this.m_userAgent);
			clientRuntime.MessageInspectors.Add(amiInspector);

		}
開發者ID:NexusMods,項目名稱:NexusModManager-4.5,代碼行數:12,代碼來源:HttpUserAgentEndpointBehaviour.cs

示例9: ArgumentNullException

        void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
        {
            if (behavior == null)
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("behavior"));

            behavior.ValidateMustUnderstand = this.ValidateMustUnderstand;
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:7,代碼來源:MustUnderstandBehavior.cs

示例10: ApplyClientBehavior

 /// <summary>
 /// 
 /// </summary>
 /// <param name="contractDescription"></param>
 /// <param name="endpoint"></param>
 /// <param name="clientRuntime"></param>
 public void ApplyClientBehavior(
     ContractDescription contractDescription,
     ServiceEndpoint endpoint,
     ClientRuntime clientRuntime)
 {
     // empty
 }
開發者ID:enzo3m,項目名稱:DistributedComputing-WCF,代碼行數:13,代碼來源:ProcessingInstanceProvider.cs

示例11: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     foreach (var op in endpoint.Contract.Operations) {
         if (op.Behaviors.Find<JsonRpcOperationBehavior>() == null)
             op.Behaviors.Add(new JsonRpcOperationBehavior(endpoint));
     }
 }
開發者ID:yonglehou,項目名稱:JsonRpc.ServiceModel,代碼行數:7,代碼來源:JsonRpcBehavior.cs

示例12: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     if (clientRuntime != null)
     {
         clientRuntime.MessageInspectors.Add(this);
     }
 }
開發者ID:arri-cc,項目名稱:azure-sdk-tools,代碼行數:7,代碼來源:ClientOutputMessageInspector.cs

示例13: ApplyClientBehavior

 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     var inspector=new ClientHeaderInspector();
     clientRuntime.ClientMessageInspectors.Add(inspector);
     foreach (var op in clientRuntime.Operations)
         op.ParameterInspectors.Add(inspector);
 }
開發者ID:JonasSyrstad,項目名稱:Stardust,代碼行數:7,代碼來源:InspectorInserter.cs

示例14: ApplyClientBehavior

		public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
		{
			foreach (var errorHandler in errorHandlers)
			{
				clientRuntime.CallbackDispatchRuntime.ChannelDispatcher.ErrorHandlers.Add(errorHandler);
			}
		}
開發者ID:dohansen,項目名稱:Windsor,代碼行數:7,代碼來源:WcfErrorBehavior.cs

示例15: ArgumentNullException

		void IEndpointBehavior.ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime clientRuntime)
		{
			if (endpoint == null)
				throw new ArgumentNullException ("endpoint");
			if (clientRuntime == null)
				throw new ArgumentNullException ("clientRuntime");
		}
開發者ID:nickchal,項目名稱:pash,代碼行數:7,代碼來源:DiscoveryEndpointPublisherBehavior.cs


注:本文中的System.ServiceModel.Dispatcher.ClientRuntime類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。