Class MetricViewObjectBase
- Inheritance
-
MetricViewObjectBase
- Implements
- Derived
- Inherited Members
- Assembly
- SemanticBridge.dll
Internal abstract base class for all MetricView domain objects. Implements both the public marker interface and the internal visitable interface.
public abstract class MetricViewObjectBase : IMetricViewObject
- Extension Methods
Constructors
MetricViewObjectBase()
protected MetricViewObjectBase()
Properties
IsDeleted
Indicates whether this object has been deleted from its parent collection. Deleted objects become "zombies" - they retain their data but are detached from the model.
[Browsable(false)]
public bool IsDeleted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Path
public abstract string Path { get; }
Property Value
| Type | Description |
|---|---|
| string |
View
Reference to the root View object. For View itself, this points to itself. Used for version validation in property setters.
public View View { get; }
Property Value
| Type | Description |
|---|---|
| View |
Methods
Delete()
Deletes this object from its parent collection. After deletion, the object becomes a zombie (IsDeleted=true, View=null).
public virtual void Delete()
Exceptions
- InvalidOperationException
Thrown if the object is not attached to a View or is already deleted.
MarkDeleted()
Marks this object as deleted. Called by subclasses after removing from collection.
protected void MarkDeleted()
ValidateVersion(string?)
Validates that the current model version supports the property being set. Call this in property setters for version-gated properties.
protected void ValidateVersion(string? propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Auto-populated by compiler via CallerMemberName |
Exceptions
- InvalidOperationException
Thrown if the property requires a higher version than the current model