当前位置: 首页>>代码示例>>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;未经允许,请勿转载。