Show / Hide Table of Contents

    Class ServiceModelConfigurator

    Provides helper methods for creating configured Service Model entities from their corresponding configuration elements.

    Inheritance
    Object
    ServiceModelConfigurator
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Nevatech.Vsb.Repository.Configuration
    Assembly: Nevatech.Vsb.Repository.dll
    Syntax
    public sealed class ServiceModelConfigurator

    Constructors

    ServiceModelConfigurator(Configuration)

    Initializes new instance with provided application configuration.

    Declaration
    public ServiceModelConfigurator(Configuration configuration)
    Parameters
    Type Name Description
    Configuration configuration

    Application configuration containing Service Model configuration elements.

    Methods

    FindChannelEndpointElement(String)

    Returns ChannelEndpointElement corresponding to provided client endpoint name.

    Declaration
    public ChannelEndpointElement FindChannelEndpointElement(string endpointName)
    Parameters
    Type Name Description
    String endpointName

    Name of the client endpoint in configuration file.

    Returns
    Type Description
    ChannelEndpointElement

    Configured ChannelEndpointElement instance, if endpoint is found, or null, if not found.

    GetBinding(String, String)

    Creates and configures specified binding and applies provided binding configuration to it.

    Declaration
    public Binding GetBinding(string bindingName, string bindingConfigurationName)
    Parameters
    Type Name Description
    String bindingName

    Binding type name that needs to be created (like 'wsHttpBinding').

    String bindingConfigurationName

    Binding configuration name that needs to be applied to created binding.

    Returns
    Type Description
    Binding

    Configured binding.

    GetClientEndpoint(String, Type)

    Creates and configures client endpoint from configuration element with the specified name.

    Declaration
    public ServiceEndpoint GetClientEndpoint(string endpointName, Type contractType)
    Parameters
    Type Name Description
    String endpointName

    Name of the client endpoint in configuration file.

    Type contractType

    Contract type of the client endpoint. If not provided, type will be instantiated using endpoint configuration.

    Returns
    Type Description
    ServiceEndpoint

    Initialized endpoint.

    GetEndpointBehaviors(String)

    Returns collection of configured endpoint behaviors listed under the specified configuration name.

    Declaration
    public KeyedByTypeCollection<IEndpointBehavior> GetEndpointBehaviors(string behaviorConfigurationName)
    Parameters
    Type Name Description
    String behaviorConfigurationName

    Endpoint behavior configuration name.

    Returns
    Type Description
    KeyedByTypeCollection<IEndpointBehavior>

    Collection of configured endpoint behaviors listed under the specified configuration name.

    GetServiceBehaviors(String)

    Returns collection of configured service behaviors listed under the specified configuration name.

    Declaration
    public KeyedByTypeCollection<IServiceBehavior> GetServiceBehaviors(string behaviorConfigurationName)
    Parameters
    Type Name Description
    String behaviorConfigurationName

    Service behavior configuration name.

    Returns
    Type Description
    KeyedByTypeCollection<IServiceBehavior>

    Collection of configured service behaviors listed under the specified configuration name.

    GetServiceEndpoint(String, String, Type)

    Creates and configures service endpoint belonging to the specified service and having the specified name.

    Declaration
    public ServiceEndpoint GetServiceEndpoint(string serviceName, string endpointName, Type contractType)
    Parameters
    Type Name Description
    String serviceName

    Name of the service in configuration file.

    String endpointName

    Name of the service endpoint in configuration file.

    Type contractType

    Contract type of the service endpoint. If not provided, type will be instantiated using endpoint configuration.

    Returns
    Type Description
    ServiceEndpoint

    Initialized endpoint.

    GetServiceEndpoints(String, Type)

    Creates and configures all endpoints belonging to the specified service.

    Declaration
    public Collection<ServiceEndpoint> GetServiceEndpoints(string serviceName, Type contractType)
    Parameters
    Type Name Description
    String serviceName

    Name of the service in configuration file.

    Type contractType

    Contract type that all endpoints should have. If not provided, type will be instantiated using endpoint configuration.

    Returns
    Type Description
    Collection<ServiceEndpoint>

    Collection of initialized service endpoints.

    Back to top Nevatech Sentinet 6.5 Online Documentation