Class Behavior
Represents pre-configured endpoint or service behavior.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class Behavior : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<Behavior>, IFolderEntity
Constructors
Behavior()
Instantiates an empty Behavior object.
Declaration
public Behavior()
Properties
Configuration
Gets or sets behavior's private configuration.
Declaration
public string Configuration { get; set; }
Property Value
Type | Description |
---|---|
String |
Description
Gets or sets behavior description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
FolderId
Gets or sets identifier of folder that behavior belongs to.
Declaration
public int? FolderId { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
FriendlyName
Gets or sets display name of the behavior.
Declaration
public string FriendlyName { get; set; }
Property Value
Type | Description |
---|---|
String |
IsMajorObject
Gets the flag indicating that current object is a major entity.
Declaration
public override bool IsMajorObject { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
IsPrivate
Gets or sets flag telling that behavior is not shared and has local visibility only. This property cannot be changed in an existing behavior.
Declaration
public bool IsPrivate { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Kind
Gets or sets the behavior's kind: endpoint behavior or service behavior.
Declaration
public BehaviorKind Kind { get; set; }
Property Value
Type | Description |
---|---|
BehaviorKind |
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
Property Value
Type | Description |
---|---|
EntityType |
Overrides
Methods
ClearConfiguration()
Clears configuration and other sensitive information, so only behavior's name is available.
Declaration
public void ClearConfiguration()
Clone(Boolean)
Creates and returns an exact copy of this object.
Declaration
public Behavior Clone(bool exactCopy)
Parameters
Type | Name | Description |
---|---|---|
Boolean | exactCopy | Flag indicating that all properties including keys, identifiers, and time stamps must be cloned. |
Returns
Type | Description |
---|---|
Behavior | Exact copy of this object. |
Compress()
Clears unnecessary to runtime data to reduce message payload.
Declaration
public void Compress()
Equals(Behavior)
Determines whether the specified behavior is equal to the current behavior.
Declaration
public bool Equals(Behavior other)
Parameters
Type | Name | Description |
---|---|---|
Behavior | other | The behavior to compare with the current behavior. |
Returns
Type | Description |
---|---|
Boolean | True, if behaviors are equal. False, if behaviors 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 |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Overrides
GetEndpointBehaviors()
Returns collection of endpoint behaviors constructed from the stored configuration. This method throws an exception if configuration is empty or invalid or corresponds to service behavior.
Declaration
public KeyedByTypeCollection<IEndpointBehavior> GetEndpointBehaviors()
Returns
Type | Description |
---|---|
KeyedByTypeCollection<IEndpointBehavior> | Collection of endpoint behaviors constructed from the stored configuration. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code of the current instance. |
Overrides
GetServiceBehaviors()
Returns collection of service behaviors constructed from the stored configuration. This method throws an exception if configuration is empty or invalid or corresponds to endpoint behavior.
Declaration
public KeyedByTypeCollection<IServiceBehavior> GetServiceBehaviors()
Returns
Type | Description |
---|---|
KeyedByTypeCollection<IServiceBehavior> | Collection of service behaviors constructed from the stored configuration. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |