Class BaseEntity
Abstract base class for all entities in the Kepware API.
public abstract class BaseEntity : IEquatable<BaseEntity>
- Inheritance
-
BaseEntity
- Implements
- Derived
- Inherited Members
Fields
- IncludesNestedDynamicProperties
Flag indicating if the entity includes nested dynamic properties that require normalization.
Properties
- Description
The description of the entity.
- DynamicProperties
Dynamic properties associated with the entity.
- Hash
Unique hash representing the current state of the entity.
- ProjectId
The project ID the entity belongs to.
- TypeName
The type name of the entity.
Methods
- AppendHashSources(HashSourceBuilder)
Appends additional hash sources for derived classes.
- CalculateHash()
Calculates the hash for the entity.
- Cleanup(IKepwareDefaultValueProvider, bool, CancellationToken)
Cleans up the entity by removing unnecessary properties and standardizing its state.
- ConditionalNonSerialized()
Retrieves the conditional non-serialized properties for the entity.
- EnsureDynamicPropertiesNormalized()
Ensures that dynamic properties are normalized. This method uses the Template Method pattern, calling NormalizeNestedProperties() to allow derived classes to customize normalization behavior.
- Equals(BaseEntity?)
Compares the current entity with another for equality.
- GetDynamicProperty<T>(string)
Retrieves a dynamic property by key.
- NormalizeNestedProperties()
Normalizes nested properties specific to this entity type. Override this method to implement custom normalization logic (e.g., flattening nested arrays into dynamic properties).
- SetDynamicProperty<T>(string, T)
Sets a dynamic property for the entity.
- TryGetDynamicProperty<T>(string, out T?)
Attempts to retrieve a dynamic property by key.