Class Code
Associates a value with a Category.
Inherited Members
Namespace: Algenta.Colectica.Model.Ddi
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class Code : IdentifiableBase, INotifyPropertyChanged, IIdentifiable, IHasCustomFields
Constructors
Code()
Initializes a new instance of the Code class.
Declaration
public Code()
Properties
Category
Gets or sets the category associated with the code.
Declaration
public Category Category { get; set; }
Property Value
| Type | Description |
|---|---|
| Category |
ChildCodes
Gets any child codes.
Declaration
public ObservableCollection<Code> ChildCodes { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<Code> |
ParentCode
Gets or sets the parent code, if the Code is in a hierarchical code list and is not at the top level.
Declaration
[DoNotNotify]
[JsonIgnore]
public Code ParentCode { get; set; }
Property Value
| Type | Description |
|---|---|
| Code |
Value
Gets or sets the value of the code.
Declaration
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Accept(IVersionableVisitor)
Accepts the specified visitor.
Declaration
public void Accept(IVersionableVisitor visitor)
Parameters
| Type | Name | Description |
|---|---|---|
| IVersionableVisitor | visitor | The visitor. |
GetChildren()
Gets the children.
Declaration
public override ChildItemCollection GetChildren()
Returns
| Type | Description |
|---|---|
| ChildItemCollection |
Overrides
GetFlattenedCodes(Collection<Code>)
Gets all codes in the code hierarchy as a flat collection.
Declaration
public void GetFlattenedCodes(Collection<Code> codes)
Parameters
| Type | Name | Description |
|---|---|---|
| Collection<Code> | codes | The collection to which all codes will be added. |
RemoveChild(IdentifierTriple)
Removes the child.
Declaration
public override int RemoveChild(IdentifierTriple child)
Parameters
| Type | Name | Description |
|---|---|---|
| IdentifierTriple | child | The child. |
Returns
| Type | Description |
|---|---|
| int |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | child |
ReplaceChild(IdentifierTriple, IVersionable)
Replaces the child.
Declaration
public override int ReplaceChild(IdentifierTriple toReplace, IVersionable child)
Parameters
| Type | Name | Description |
|---|---|---|
| IdentifierTriple | toReplace | To replace. |
| IVersionable | child | The child. |
Returns
| Type | Description |
|---|---|
| int |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | child |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents this instance. |
Overrides
WatchProperties()
Watch for property changed events
Declaration
protected override void WatchProperties()