Class TreeRedbObject<TProps>
ARCHITECTURAL FIX: Typed version of REDB tree object
NEW INHERITANCE: RedbObject<TProps> instead of TreeRedbObject
ADVANTAGES: Direct type casting, Props duplication elimination, no conversion
POLYMORPHISM: Implements ITreeRedbObject for untyped operations support
public class TreeRedbObject<TProps> : RedbObject<TProps>, ITreeRedbObject<TProps>, ITreeRedbObject, IRedbObject<TProps>, IRedbObject where TProps : class, new()
Inheritance
Implements
Inherited Members
RedbObject.ComputeHash(),RedbObject.date_begin,RedbObject.date_complete,RedbObject.date_create,RedbObject.date_modify,RedbObject.DateBegin,RedbObject.DateComplete,RedbObject.DateCreate,RedbObject.DateModify,RedbObject.GetSchemeAsync(),RedbObject.GetSchemeSyncProvider(),RedbObject.GetStructureByNameAsync(string),RedbObject.GetStructuresAsync(),RedbObject.Hash,RedbObject.hash,RedbObject.HasParent,RedbObject.id,RedbObject.Id,RedbObject.InvalidateSchemeCache(),RedbObject.IsProviderAvailable,RedbObject.IsRoot,RedbObject.Key,RedbObject.key,RedbObject.name,RedbObject.Name,RedbObject.Note,RedbObject.note,RedbObject.owner_id,RedbObject.OwnerId,RedbObject.parent_id,RedbObject.ParentId,RedbObject.RecomputeHash(),RedbObject.ResetId(bool),RedbObject.ResetId(long),RedbObject.ResetIds(bool),RedbObject.scheme_id,RedbObject.SchemeId,RedbObject.SetSchemeSyncProvider(ISchemeSyncProvider),RedbObject.value_bool,RedbObject.value_bytes,RedbObject.value_datetime,RedbObject.value_double,RedbObject.value_guid,RedbObject.value_long,RedbObject.value_numeric,RedbObject.value_string,RedbObject.ValueBool,RedbObject.ValueBytes,RedbObject.ValueDatetime,RedbObject.ValueDouble,RedbObject.ValueGuid,RedbObject.ValueLong,RedbObject.ValueNumeric,RedbObject.ValueString,RedbObject.who_change_id,RedbObject.WhoChangeId
Properties
Ancestors
Gets all node ancestors (from parent to root)
public IEnumerable<ITreeRedbObject> Ancestors { get; }
Children
Collection of child objects (untyped to support polymorphic trees)
public ICollection<ITreeRedbObject> Children { get; set; }
Descendants
Gets all node descendants recursively
public IEnumerable<ITreeRedbObject> Descendants { get; }
Methods
GetBreadcrumbs(string, bool)
Gets breadcrumbs for navigation
public string GetBreadcrumbs(string separator = " > ", bool includeIds = false)
GetPathIds()
NAVIGATION METHODS (moved from base TreeRedbObject)
public IEnumerable<long> GetPathIds()
GetSubtree()
Gets all subtree nodes (including current) in depth-first order
public IEnumerable<ITreeRedbObject> GetSubtree()
IsAncestorOf(ITreeRedbObject)
Checks if current node is ancestor of specified node
public bool IsAncestorOf(ITreeRedbObject descendant)
IsDescendantOf(ITreeRedbObject)
Checks if current node is descendant of specified node
public bool IsDescendantOf(ITreeRedbObject ancestor)