本文整理汇总了C#中System.ServiceModel.Configuration.ServiceEndpointElement类的典型用法代码示例。如果您正苦于以下问题:C# ServiceEndpointElement类的具体用法?C# ServiceEndpointElement怎么用?C# ServiceEndpointElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceEndpointElement类属于System.ServiceModel.Configuration命名空间,在下文中一共展示了ServiceEndpointElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInitializeAndValidate
protected override void OnInitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
if (serviceEndpointElement.Address == null)
{
serviceEndpointElement.Address = this.Address;
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:WorkflowControlEndpointElement.cs
示例2: InitializeAndValidate
public void InitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
if (serviceEndpointElement == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceEndpointElement");
}
this.OnInitializeAndValidate(serviceEndpointElement);
}
示例3: OnInitializeAndValidate
protected override void OnInitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
if (String.IsNullOrEmpty(serviceEndpointElement.Binding))
{
serviceEndpointElement.Binding = ConfigurationStrings.MexHttpBindingCollectionElementName;
}
serviceEndpointElement.Contract = ServiceMetadataBehavior.MexContractName;
serviceEndpointElement.IsSystemEndpoint = true;
}
示例4: OnInitializeAndValidate
protected override void OnInitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
if (string.IsNullOrEmpty(serviceEndpointElement.Binding))
{
serviceEndpointElement.Binding = "mexHttpBinding";
}
serviceEndpointElement.Contract = "IMetadataExchange";
serviceEndpointElement.IsSystemEndpoint = true;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:ServiceMetadataEndpointElement.cs
示例5: InitializeAndValidate
public void InitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
if (null == serviceEndpointElement)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceEndpointElement");
}
// The properties serviceEndpointElement.Name and this.Name are actually two different things:
// - serviceEndpointElement.Name corresponds to the service endpoint name
// - this.Name is a token used as a key in the endpoint collection to identify
// a specific bucket of configuration settings.
// Thus, the Name property is skipped here.
this.OnInitializeAndValidate(serviceEndpointElement);
}
示例6: ApplyConfiguration
public void ApplyConfiguration(ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
if (endpoint == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
}
if (serviceEndpointElement == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceEndpointElement");
}
if (endpoint.GetType() != this.EndpointType)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(System.ServiceModel.SR.GetString("ConfigInvalidTypeForEndpoint", new object[] { (this.EndpointType == null) ? string.Empty : this.EndpointType.AssemblyQualifiedName, endpoint.GetType().AssemblyQualifiedName }));
}
this.OnApplyConfiguration(endpoint, serviceEndpointElement);
}
示例7: CreateServiceEndpoint
static ServiceEndpoint CreateServiceEndpoint(Type serviceType, ServiceEndpointElement endpointElement)
{
//创建ServiceEndpoint
EndpointAddress address = new EndpointAddress(endpointElement.Address);
Binding binding = ConfigLoader.CreateBinding(endpointElement.Binding);
ContractDescription contract = CreateContractDescription(serviceType, endpointElement.Contract);
ServiceEndpoint endpoint = new ServiceEndpoint(contract, binding, address);
//添加终结点行为
if (!string.IsNullOrEmpty(endpointElement.BehaviorConfiguration))
{
EndpointBehaviorElement behaviorElement = ConfigLoader.GetEndpointBehaviorElement(endpointElement.BehaviorConfiguration);
foreach (BehaviorExtensionElement extensionElement in behaviorElement)
{
IEndpointBehavior endpointBehavior = (IEndpointBehavior)extensionElement.CreateBehavior();
endpoint.Behaviors.Add(endpointBehavior);
}
}
return endpoint;
}
示例8: GenerateServiceEndpoint
public ServiceEndpoint GenerateServiceEndpoint(ServiceHostBase serviceHost, Uri baseAddress)
{
Fx.Assert(serviceHost != null, "The 'serviceHost' parameter should not be null.");
Fx.Assert(baseAddress != null, "The 'baseAddress' parameter should not be null.");
AuthenticationSchemes supportedSchemes = GetAuthenticationSchemes(baseAddress);
Type contractType = this.GetSingleImplementedContract();
ConfigLoader configLoader = new ConfigLoader(serviceHost.GetContractResolver(this.implementedContracts));
ServiceEndpointElement serviceEndpointElement = new ServiceEndpointElement();
serviceEndpointElement.Contract = contractType.FullName;
this.SetBindingConfiguration(baseAddress.Scheme, serviceEndpointElement);
serviceEndpointElement.Kind = this.standardEndpointKind;
ServiceEndpoint serviceEndpoint = configLoader.LookupEndpoint(serviceEndpointElement, null, serviceHost, serviceHost.Description, true);
this.ConfigureBinding(serviceEndpoint.Binding, baseAddress.Scheme, supportedSchemes, AspNetEnvironment.Enabled);
// Setting the Endpoint address and listenUri now that we've set the binding security
ConfigLoader.ConfigureEndpointAddress(serviceEndpointElement, serviceHost, serviceEndpoint);
ConfigLoader.ConfigureEndpointListenUri(serviceEndpointElement, serviceHost, serviceEndpoint);
return serviceEndpoint;
}
示例9: OnApplyConfiguration
protected override void OnApplyConfiguration(ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
base.OnApplyConfiguration(endpoint, serviceEndpointElement);
ApplyConfiguration(endpoint);
}
示例10: ContractInfo
public ContractInfo(Guid iid,
ServiceEndpointElement endpoint,
ComCatalogObject interfaceObject,
ComCatalogObject application)
{
this.name = endpoint.Contract;
this.iid = iid;
// Interface Roles
//
ComCatalogCollection roles;
roles = interfaceObject.GetCollection("RolesForInterface");
this.interfaceRoleMembers = CatalogUtil.GetRoleMembers(application,
roles);
// Operations
//
this.operations = new List<OperationInfo>();
ComCatalogCollection methods;
methods = interfaceObject.GetCollection("MethodsForInterface");
foreach (ComCatalogObject method in methods)
{
this.operations.Add(new OperationInfo(method,
application));
}
}
示例11: OnInitializeAndValidate
protected override void OnInitializeAndValidate(ServiceEndpointElement serviceEndpointElement)
{
base.OnInitializeAndValidate(serviceEndpointElement);
ConfigurationUtility.InitializeAndValidateUdpServiceEndpointElement(serviceEndpointElement);
}
示例12: ConfigureStandardEndpoint
public static System.ServiceModel.Description.ServiceEndpoint ConfigureStandardEndpoint (System.ServiceModel.Description.ContractDescription cd, ServiceEndpointElement element)
{
string kind = element.Kind;
string endpointConfiguration = element.EndpointConfiguration;
EndpointCollectionElement section = ConfigUtil.StandardEndpointsSection [kind];
if (section == null)
throw new ArgumentException (String.Format ("standard endpoint section for '{0}' was not found.", kind));
StandardEndpointElement e = section.GetDefaultStandardEndpointElement ();
System.ServiceModel.Description.ServiceEndpoint inst = e.CreateServiceEndpoint (cd);
foreach (StandardEndpointElement el in section.ConfiguredEndpoints) {
if (el.Name == endpointConfiguration) {
el.InitializeAndValidate (element);
el.ApplyConfiguration (inst, element);
break;
}
}
return inst;
}
示例13: OnApplyConfiguration
protected override void OnApplyConfiguration(ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
//no additional configuration is required for MEX.
}
示例14: OnInitializeAndValidate
protected abstract void OnInitializeAndValidate(ServiceEndpointElement serviceEndpointElement);
示例15: OnApplyConfiguration
protected override void OnApplyConfiguration(System.ServiceModel.Description.ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
{
}
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:3,代码来源:System.ServiceModel.Configuration.ServiceMetadataEndpointElement.cs