System.ServiceModel.Dispatcher.EndpointDispatcher.InitializeServiceEndpoint C# (CSharp) Method

InitializeServiceEndpoint() private method

private InitializeServiceEndpoint ( bool isCallback, Type serviceType, ServiceEndpoint se ) : void
isCallback bool
serviceType System.Type
se System.ServiceModel.Description.ServiceEndpoint
return void
		internal void InitializeServiceEndpoint (bool isCallback, Type serviceType, ServiceEndpoint se)
		{
#if NET_4_0
			IsSystemEndpoint = se.IsSystemEndpoint;
#endif

			this.ContractFilter = GetContractFilter (se.Contract);

			this.DispatchRuntime.Type = serviceType;
			
			//Build the dispatch operations
			DispatchRuntime db = this.DispatchRuntime;
			if (!isCallback && se.Contract.CallbackContractType != null) {
				var ccd = se.Contract;
				db.CallbackClientRuntime.CallbackClientType = se.Contract.CallbackContractType;
				db.CallbackClientRuntime.ContractClientType = se.Contract.ContractType;
				ccd.FillClientOperations (db.CallbackClientRuntime, true);
			}
			foreach (OperationDescription od in se.Contract.Operations)
				if (!db.Operations.Contains (od.Name))
					PopulateDispatchOperation (db, od);
		}

Usage Example

		public DuplexClientRuntimeChannel (ServiceEndpoint endpoint,
			ChannelFactory factory, EndpointAddress remoteAddress, Uri via)
			: base (endpoint, factory, remoteAddress, via)
		{
			var ed = new EndpointDispatcher (remoteAddress, endpoint.Contract.Name, endpoint.Contract.Namespace);
			ed.InitializeServiceEndpoint (true, null, endpoint);
			Runtime.CallbackDispatchRuntime = ed.DispatchRuntime;
		}
All Usage Examples Of System.ServiceModel.Dispatcher.EndpointDispatcher::InitializeServiceEndpoint