public ContractDescription GetDiscoveryContract(ServiceDiscoveryMode discoveryMode) { if (discoveryMode == ServiceDiscoveryMode.Adhoc) { if (this.adhocDiscoveryContract == null) { lock (this.contractLock) { if (this.adhocDiscoveryContract == null) { this.adhocDiscoveryContract = DiscoveryUtility.GetContract(typeof(IDiscoveryContractAdhocApril2005)); } } } return(this.adhocDiscoveryContract); } else if (discoveryMode == ServiceDiscoveryMode.Managed) { if (this.managedDiscoveryContract == null) { lock (this.contractLock) { if (this.managedDiscoveryContract == null) { this.managedDiscoveryContract = DiscoveryUtility.GetContract(typeof(IDiscoveryContractManagedApril2005)); } } } return(this.managedDiscoveryContract); } else { throw FxTrace.Exception.AsError(new ArgumentException(SR.DiscoveryIncorrectMode(discoveryMode))); } }
public DiscoveryEndpoint (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress) : base (null, binding, endpointAddress) { if (discoveryVersion == null) throw new ArgumentNullException ("discoveryVersion"); DiscoveryVersion = discoveryVersion; DiscoveryMode = discoveryMode; }
public DiscoveryEndpoint(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress) : base(GetContract(discoveryVersion, discoveryMode), binding, endpointAddress) { DiscoveryVersion = discoveryVersion; DiscoveryMode = discoveryMode; IsSystemEndpoint = true; }
public DiscoveryEndpoint (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress) : base (GetContract (discoveryVersion, discoveryMode), binding, endpointAddress) { DiscoveryVersion = discoveryVersion; DiscoveryMode = discoveryMode; IsSystemEndpoint = true; }
internal DiscoveryOperationContextExtension(TimeSpan maxResponseDelay, ServiceDiscoveryMode discoveryMode, DiscoveryVersion discoveryVersion) { TimeoutHelper.ThrowIfNegativeArgument(maxResponseDelay, "maxResponseDelay"); Fx.Assert(discoveryVersion != null, "discoveryVersion can't be null"); this.maxResponseDelay = maxResponseDelay; this.discoveryMode = discoveryMode; this.discoveryVersion = discoveryVersion; }
static ContractDescription GetDiscoveryContract(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode) { if (discoveryVersion == null) { throw FxTrace.Exception.ArgumentNull("discoveryVersion"); } return discoveryVersion.Implementation.GetDiscoveryContract(discoveryMode); }
static ContractDescription GetContract (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode mode) { if (discoveryVersion == null) throw new ArgumentNullException ("discoveryVersion"); // Provide different contract type for Adhoc mode and Managed mode, respectively. if (mode == ServiceDiscoveryMode.Managed) return ContractDescription.GetContract (discoveryVersion.DiscoveryProxyContractType); else return ContractDescription.GetContract (discoveryVersion.DiscoveryTargetContractType); }
public DiscoveryEndpoint(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress) : base(GetDiscoveryContract(discoveryVersion, discoveryMode)) { base.IsSystemEndpoint = true; this.discoveryOperationContextExtension = new DiscoveryOperationContextExtension(TimeSpan.Zero, discoveryMode, discoveryVersion); base.Behaviors.Add(new DiscoveryOperationContextExtensionInitializer(this.discoveryOperationContextExtension)); base.Behaviors.Add(new DiscoveryEndpointValidator()); base.Address = endpointAddress; base.Binding = binding; }
public DiscoveryEndpoint(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode, Binding binding, EndpointAddress endpointAddress) : base(GetDiscoveryContract(discoveryVersion, discoveryMode)) { base.IsSystemEndpoint = true; this.discoveryOperationContextExtension = new DiscoveryOperationContextExtension(TimeSpan.Zero, discoveryMode, discoveryVersion); base.Behaviors.Add(new DiscoveryOperationContextExtensionInitializer(this.discoveryOperationContextExtension)); base.Behaviors.Add(new DiscoveryEndpointValidator()); base.Address = endpointAddress; base.Binding = binding; }
static ContractDescription GetContract(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode mode) { if (discoveryVersion == null) { throw new ArgumentNullException("discoveryVersion"); } // Provide different contract type for Adhoc mode and Managed mode, respectively. if (mode == ServiceDiscoveryMode.Managed) { return(ContractDescription.GetContract(discoveryVersion.DiscoveryProxyContractType)); } else { return(ContractDescription.GetContract(discoveryVersion.DiscoveryTargetContractType)); } }
public DiscoveryEndpoint (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode) : this (discoveryVersion, discoveryMode, null, null) { }
public DiscoveryEndpoint(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode) : this(discoveryVersion, discoveryMode, null, null) { }
public ContractDescription GetDiscoveryContract(ServiceDiscoveryMode discoveryMode) { if (discoveryMode == ServiceDiscoveryMode.Adhoc) { if (this.adhocDiscoveryContract == null) { lock (this.contractLock) { if (this.adhocDiscoveryContract == null) { this.adhocDiscoveryContract = DiscoveryUtility.GetContract(typeof(IDiscoveryContractAdhoc11)); } } } return this.adhocDiscoveryContract; } else if (discoveryMode == ServiceDiscoveryMode.Managed) { if (this.managedDiscoveryContract == null) { lock (this.contractLock) { if (this.managedDiscoveryContract == null) { this.managedDiscoveryContract = DiscoveryUtility.GetContract(typeof(IDiscoveryContractManaged11)); } } } return this.managedDiscoveryContract; } else { throw FxTrace.Exception.AsError(new ArgumentException(SR.DiscoveryIncorrectMode(discoveryMode))); } }
static ContractDescription GetDiscoveryContract(DiscoveryVersion discoveryVersion, ServiceDiscoveryMode discoveryMode) { if (discoveryVersion == null) { throw FxTrace.Exception.ArgumentNull("discoveryVersion"); } return(discoveryVersion.Implementation.GetDiscoveryContract(discoveryMode)); }
// FIXME: provide different contract type for Adhoc mode. Current one should be only for Managed mode. static ContractDescription GetContract (DiscoveryVersion discoveryVersion, ServiceDiscoveryMode mode) { if (discoveryVersion == null) throw new ArgumentNullException ("discoveryVersion"); return ContractDescription.GetContract (discoveryVersion.DiscoveryProxyContractType); }