Class Property
Represents a property with name and value (optional) or/and an attached file (optional) that can be assign to a repository entity (like service, node, operation, etc).
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class Property : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<Property>
Constructors
Property()
Declaration
public Property()
Properties
EntityId
Gets or sets the database identifier of an entity that property belongs to.
Declaration
public int EntityId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This property is not serializable as the object is always used in the context of parent entity.
EntityType
Gets or sets the type of entity (like Service, Node, Operation, etc) that property belongs to.
Declaration
public EntityType EntityType { get; set; }
Property Value
Type | Description |
---|---|
EntityType |
Remarks
This property is not serializable as the object is always used in the context of parent entity.
FileId
Gets or sets the database identifier of the attached binary file.
Declaration
public int? FileId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
FileKey
Gets the unique identifier of the attached binary file.
Declaration
public Guid? FileKey { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Name
Gets or sets the property name.
Declaration
public string Name { 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
PropertyType
Gets or sets the property content type.
Declaration
public PropertyType PropertyType { get; set; }
Property Value
Type | Description |
---|---|
PropertyType |
Value
Gets or sets the text value of the property (up to 2048 characters) (optional).
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Equals(Property)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(Property other)
Parameters
Type | Name | Description |
---|---|---|
Property | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | True, if objects are equal. False, if objects 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(Property, Property)
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(Property property1, Property property2)
Parameters
Type | Name | Description |
---|---|---|
Property | property1 | First instance to be compared. |
Property | property2 | 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. |