Class ContractDefinition
Represents a service contract definition. This class is a part of service definition structure used for creating or updating service version within a single service call.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Services
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class ContractDefinition : Contract, IValidator, IExtensibleDataObject, IEquatable<Contract>
Constructors
ContractDefinition()
Instantiates an empty service contract definition.
Declaration
public ContractDefinition()
ContractDefinition(Contract)
Initializes new instance from provided contract.
Declaration
public ContractDefinition(Contract contract)
Parameters
Type | Name | Description |
---|---|---|
Contract | contract | Contract to be initialized from. |
ContractDefinition(ContractDescription)
Initializes new instance from provided contract description.
Declaration
public ContractDefinition(ContractDescription contract)
Parameters
Type | Name | Description |
---|---|---|
System.ServiceModel.Description.ContractDescription | contract | Contract description to be used to populate new instance. |
Properties
Endpoints
Gets collection of the inbound endpoints.
Declaration
public Collection<EndpointDefinition> Endpoints { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<EndpointDefinition> |
IsPopulated
Gets or sets a flag indicating that contract properties are populated.
Declaration
public bool IsPopulated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
For "create" operations this property must be True. For "update" and "delete" operations only entity identifier is required. If entity is not populated then "update" operation on the entity properties is not performed, but children entities are processed as usual.
Operations
Gets collection of the service operations.
Declaration
public Collection<OperationDefinition> Operations { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<OperationDefinition> |
Methods
CopyFrom(Contract)
Populates current instance from provided contract.
Declaration
public void CopyFrom(Contract contract)
Parameters
Type | Name | Description |
---|---|---|
Contract | contract | Contract to be populated from. |
IsDuplexRequired()
Calculates and returns flag indicating that contract requires a binding with duplex channels that supports callback operations.
Declaration
public bool IsDuplexRequired()
Returns
Type | Description |
---|---|
System.Boolean | True, if binding supporting callback operations is required. False, otherwise. |
IsSecurityRequired()
Calculates and returns flag indicating that contract, or its operations, messages, or headers require binding that provides encryption or/and digital signature.
Declaration
public bool IsSecurityRequired()
Returns
Type | Description |
---|---|
System.Boolean | True, if secured binding is required. False, otherwise. |
IsTransactionRequired()
Calculates and returns flag indicating that contract requires a binding that supports transaction flow.
Declaration
public bool IsTransactionRequired()
Returns
Type | Description |
---|---|
System.Boolean | True, if binding supporting transaction flow is required. False, otherwise. |