Class Contract
Represents a service contract (service description port type).
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public class Contract : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<Contract>
Constructors
Contract()
Initializes a new instance of the Contract object.
Declaration
public Contract()
Properties
Description
Gets or sets contract description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsEnabled
Gets or sets flag indication that contract is enabled (contract operations are known by the runtime). Property is applied to virtual services only.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPublished
Gets or sets flag indication that contract is listed in service metadata. Property is applied to virtual services only.
Declaration
public bool IsPublished { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSecured
Gets flag indicating that contract requires secured binding.
Declaration
public bool IsSecured { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Gets or sets contract name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Namespace
Gets or sets contract namespace.
Declaration
public string Namespace { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
Property Value
Type | Description |
---|---|
EntityType |
Overrides
ProtectionLevel
Gets or sets contract protection level.
Declaration
public ProtectionLevel? ProtectionLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Net.Security.ProtectionLevel> |
QName
Gets contract XML qualified name.
Declaration
public XmlQualifiedName QName { get; }
Property Value
Type | Description |
---|---|
System.Xml.XmlQualifiedName |
ServiceVersionId
Gets or sets service version identifier this contract belongs to.
Declaration
public int ServiceVersionId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SessionMode
Gets or sets contract session requirement.
Declaration
public SessionMode SessionMode { get; set; }
Property Value
Type | Description |
---|---|
System.ServiceModel.SessionMode |
Methods
Equals(Contract)
Determines whether the specified contract is equal to the current contract.
Declaration
public bool Equals(Contract other)
Parameters
Type | Name | Description |
---|---|---|
Contract | other | The contract to compare with the current contract. |
Returns
Type | Description |
---|---|
System.Boolean | True, if contracts are equal. False, if contracts are not equal. |
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | True, if objects are equal. False, if objects are not equal. |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code of the current instance. |
Overrides
IsMatch(Contract, Contract)
Returns flag indicating that provided instances represent the same entity, i.e. the object's natural keys are the same. This method assumes that both instances are assigned to the same parent object.
Declaration
public static bool IsMatch(Contract contract1, Contract contract2)
Parameters
Type | Name | Description |
---|---|---|
Contract | contract1 | First instance to be compared. |
Contract | contract2 | Second instance to be compared. |
Returns
Type | Description |
---|---|
System.Boolean | True, if provided instances represent the same entity. False, otherwise. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
System.Boolean | True if state is valid; otherwise, false. |