Class ObjectBase
Last update: 16.07.2025Namespace: VM.Managed
Assembly: VMAppCore.dll
This class is to represent the objectbase.
public abstract class ObjectBase : LinkableBase, IObservableObject, IDisposableObject, ILinkable, IObjectBase, IObject, ILinkContainer, IOwned, IHasID, IEventProvider, IHasKeyObject, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable
Inheritance
object ← ObservableObject ← LinkableBase ← ObjectBase
Derived
Implements
IObservableObject, IDisposableObject, ILinkable, IObjectBase, IObject, ILinkContainer, IOwned, IHasID, IEventProvider, IHasKeyObject, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable
Inherited Members
LinkableBase.OnDeserialization(object), ObservableObject.Dispose(), ObservableObject.RaisePropertyChanged(string), ObservableObject.RaisePropertyChanged(string, object, object), ObservableObject.Dispose(bool), ObservableObject.DisposeManagedResources(), ObservableObject.DisposeUnmanagedResources(), ObservableObject.IsDisposed, ObservableObject.TryDisposing, ObservableObject.Disposed, ObservableObject.Disposing, ObservableObject.PropertyChanged
Extension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkedObjects
Constructors
ObjectBase()
Initializes a new instance of the
public ObjectBase()
ObjectBase(SerializationInfo, StreamingContext)
Initializes a new instance of the
protected ObjectBase(SerializationInfo info, StreamingContext __unnamed001)
Parameters
info SerializationInfo
The info.
__unnamed001 StreamingContext
Properties
ClearChildInfoBeforeDeserialize
Gets a value indicating whether [clear child info before deserialize].
virtual bool ClearChildInfoBeforeDeserialize { get; }
Property Value
Container
Gets the container.
public IOwned Container { get; }
Property Value
IOwned
Document
Gets the document.
public Document Document { get; }
Property Value
ID
Get the object id
virtual Identifier ID { get; }
Property Value
Identifier
IsChildExternable
Gets a value indicating whether this instance's child is Externable.
virtual bool IsChildExternable { get; }
Property Value
IsExternable
Gets a value indicating whether this instance is Externable.
virtual bool IsExternable { get; }
Property Value
KernelKey
Gets the kernelkey.
public ObjectBase.ConvertKey KernelKey { get; }
Property Value
Key
Gets or sets the convertkey.
public virtual ObjectBase.ConvertKey Key { get; set; }
Property Value
KeyImpl
UIntPtr KeyImpl { get; }
Property Value
ObjectState
Gets the object state.
public ObjectStateType ObjectState { get; }
Property Value
ObjectStateForCircularError
Gets the object state for circular error.
public ObjectStateType ObjectStateForCircularError { get; }
Property Value
Owner
Gets the owner.
public ObjectBase Owner { get; }
Property Value
SkipModified
Gets or sets a value indicating whether [skip modified flag].
protected bool SkipModified { get; set; }
Property Value
TopologyEntityTypeName
Get the object type name
public virtual string TopologyEntityTypeName { get; }
Property Value
UntypedEventCore
Gets the untypedeventcore.
public abstract ObjectEventCore UntypedEventCore { get; }
Property Value
Methods
AddPostDeserialize(StreamingContext)
Add thi object to Post deserialize object list.
protected void AddPostDeserialize(StreamingContext context)
Parameters
context StreamingContext
The
CheckAndUpdateLink(HashSet)
protected virtual void CheckAndUpdateLink(HashSet<objectbase> lstObj)
Parameters
lstObj HashSetObjectBase>
ConnectProxy()
protected virtual void ConnectProxy()
CreateEntityWhenUpdateContents(Action)
protected void CreateEntityWhenUpdateContents(Action action)
Parameters
action Action
CustomGetObjectData(SerializationInfo, StreamingContext)
Customize the GetObjectData function.
protected virtual void CustomGetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info SerializationInfo
The info.
context StreamingContext
The context.
DestroyObject(object, LinkEventArgs)
Destroy object.
public void DestroyObject(object objNotifier, LinkEventArgs arg)
Parameters
objNotifier object
The event notifier.
arg LinkEventArgs
The event argument.
DestroyObject(DestroyEventArgs)
Destroy object.
public void DestroyObject(DestroyEventArgs arg)
Parameters
arg DestroyEventArgs
The event argument.
DestroyObject()
Destroy object.
public void DestroyObject()
Dispose(bool)
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)
Parameters
A_0 bool
DisposeManagedResources()
Dispose managed resources
protected override void DisposeManagedResources()
DoWorkAfterUpdateContents()
After update contents, do work.
public virtual void DoWorkAfterUpdateContents()
FindObjectOnXmlDeserialize(string)
Get object by fullname.
public static ObjectBase FindObjectOnXmlDeserialize(string strFullName)
Parameters
strFullName string
The fullname.
Returns
The Object.
FixUp(ObjectBase)
Before destroy the old object, perform a work.
public virtual bool FixUp(ObjectBase ob)
Parameters
ob ObjectBase
The old object.
Returns
true if success; otherwise, false.
GetArgumentList(LinkedList)
public virtual void GetArgumentList(LinkedList<objectbase> lstObj)
Parameters
lstObj LinkedListObjectBase>
GetDestroyEventExtraData()
protected virtual object GetDestroyEventExtraData()
Returns
GetObjectByKey(UIntPtr)
Get object by key.
public static ObjectBase GetObjectByKey(UIntPtr key)
Parameters
key UIntPtr
The key.
Returns
The Object.
GetTargetListForUpdate()
Gets a updated objects.
virtual List<ieventprovider> GetTargetListForUpdate()
Returns
Initialize(ConvertFactor)
Initializes member through unit convert factor.
public virtual void Initialize(Unit.ConvertFactor factor)
Parameters
factor Unit.ConvertFactor
The unit convert factor.
IsEqualArray(T[], T[])
Equal two array
public static bool IsEqualArray<t>(T[] arA, T[] arB)
Parameters
arA T[]
The array A.
arB T[]
The array B.
Returns
Type Parameters
T
IsEqualList(List, List)
public static bool IsEqualList(List<double> lstA, List<double> lstB)
Parameters
Returns
IsSerializableEvent(Delegate)
Determines whether is [serializable event] [the specified delegate].
protected virtual bool IsSerializableEvent(Delegate del)
Parameters
del Delegate
The delegate.
Returns
true if is [serializable event] [the specified delegate]; otherwise, false.
LinkAddedToDocument(object, AddToDocEventArgs)
Add linked object to a document.
protected virtual void LinkAddedToDocument(object objNotifier, AddToDocEventArgs arg)
Parameters
objNotifier object
The linked object.
The
LinkAddedToDocumentCore(IOwned, bool)
protected virtual void LinkAddedToDocumentCore(IOwned owner, bool bBackup)
Parameters
owner IOwned
bBackup bool
LinkRemovedFromDocument(object, RemoveFromDocEventArgs)
Remove linked object to a document.
protected virtual void LinkRemovedFromDocument(object objNotifier, RemoveFromDocEventArgs arg)
Parameters
objNotifier object
The linked object.
The
LinkRequestDestroy(object, LinkEventArgs)
Request for destroy the linked object.
protected virtual void LinkRequestDestroy(object objNotifier, LinkEventArgs arg)
Parameters
objNotifier object
The linked object.
arg LinkEventArgs
The
LinkRequestDestroying(object, LinkEventArgs)
Request for destroying the linked object.
protected virtual void LinkRequestDestroying(object objNotifier, LinkEventArgs arg)
Parameters
objNotifier object
The linked object.
arg LinkEventArgs
The
LinkRequestUpdate(object, LinkEventArgs)
Request for update the linked object.
protected virtual void LinkRequestUpdate(object objNotifier, LinkEventArgs arg)
Parameters
objNotifier object
The linked object.
arg LinkEventArgs
The
LinkRequestUpdating(object, LinkEventArgs)
Request for updating the linked object.
protected virtual void LinkRequestUpdating(object objNotifier, LinkEventArgs arg)
Parameters
objNotifier object
The linked object.
arg LinkEventArgs
The
OnDeserialization(object)
Called when [deserialization].
protected override void OnDeserialization(object sender)
Parameters
sender object
The sender.
OnLinkReserved(ILink, object, EventArgs)
protected virtual void OnLinkReserved(ILink A_0, object A_1, EventArgs A_2)
Parameters
A_0 ILink
A_1 object
A_2 EventArgs
PostAddToDocument()
public virtual void PostAddToDocument()
PostRemoveFromDocument(Document)
public virtual void PostRemoveFromDocument(Document document)
Parameters
document Document
RemoveFromCreatedList()
[Obsolete]
public virtual void RemoveFromCreatedList()
ReplaceEventCore(ObjectEventCore)
Replace event core.
protected void ReplaceEventCore(ObjectEventCore coreNew)
Parameters
coreNew ObjectEventCore
The object EventCore.
ResetInvalidEntity()
public virtual void ResetInvalidEntity()
RollbackEvent()
virtual void RollbackEvent()
SetContainer(IOwned, bool)
public virtual void SetContainer(IOwned obOwner, bool bBackup)
Parameters
obOwner IOwned
bBackup bool
SetFlagWhenXMLFile(string, bool)
Set flag when property file open
public static void SetFlagWhenXMLFile(string strFilePath, bool bValue)
Parameters
strFilePath string
The file path.
bValue bool
The flag.
SetIconColor(Canvas)
Set color for icon.
public virtual void SetIconColor(Canvas canvas)
Parameters
canvas Canvas
The canvas.
SetModified(ModifiedType)
Called when object modified.
protected virtual void SetModified(ModifiedResult.ModifiedType type)
Parameters
type ModifiedResult.ModifiedType
The modifed type.
SetModified()
Called when object modified.
protected virtual void SetModified()
SetModified(ModifiedType, IDocument)
public void SetModified(ModifiedResult.ModifiedType type, IDocument doc)
Parameters
type ModifiedResult.ModifiedType
doc IDocument
SetModifiedCore(ModifiedType)
Called when object modified.
protected void SetModifiedCore(ModifiedResult.ModifiedType type)
Parameters
type ModifiedResult.ModifiedType
The modified type
SetOldNameWithNewEntity(ObjectBase, ObjectBase)
Change for the new name.
public virtual void SetOldNameWithNewEntity(ObjectBase obNew, ObjectBase obOld)
Parameters
obNew ObjectBase
The new object.
obOld ObjectBase
The old object.
SkipUpdateObjectImpl()
Skip the object that updated.
virtual bool SkipUpdateObjectImpl()
Returns
UpdateContents(XmlReader, ObjectBase, string)
Update object.
public static ObjectBase UpdateContents(XmlReader reader, ObjectBase obOld, string strRootElement)
Parameters
reader XmlReader
The reader for object information.
obOld ObjectBase
The old object.
strRootElement string
The root element name.
Returns
The Object.
UpdateContents(XmlReader, ObjectBase)
Update object.
public static ObjectBase UpdateContents(XmlReader reader, ObjectBase obOld)
Parameters
reader XmlReader
The reader for object information.
obOld ObjectBase
The old object.
Returns
The Object.
UpdateContents(string, string)
Update object.
public static ObjectBase UpdateContents(string strXml, string strRootElement)
Parameters
strXml string
The xml for object information.
strRootElement string
The root element name.
Returns
The Object.
UpdateContents(string)
Update object.
public static ObjectBase UpdateContents(string strXml)
Parameters
strXml string
The xml for object information.
Returns
The Object.
Verify(VerifiedResult)
Verify.
protected virtual void Verify(VerifiedResult vr)
Parameters
The Verified result.
raise_Destroying(object, Identifier)
public void raise_Destroying(object sender, Identifier args)
Parameters
sender object
args Identifier
raise_OnAdded(object, AddToDocEventArgs)
public void raise_OnAdded(object objNotifier, AddToDocEventArgs args)
Parameters
objNotifier object
args AddToDocEventArgs
raise_OnContentsUpdated(object, EventArgs)
protected void raise_OnContentsUpdated(object value0, EventArgs value1)
Parameters
value0 object
value1 EventArgs
raise_OnDestroy(object, LinkEventArgs)
public void raise_OnDestroy(object objNotifier, LinkEventArgs args)
Parameters
objNotifier object
args LinkEventArgs
raise_OnDestroying(object, LinkEventArgs)
public void raise_OnDestroying(object objNotifier, LinkEventArgs args)
Parameters
objNotifier object
args LinkEventArgs
raise_OnRemoved(object, RemoveFromDocEventArgs)
public void raise_OnRemoved(object obj, RemoveFromDocEventArgs args)
Parameters
obj object
raise_OnUpdate(object, LinkEventArgs)
public void raise_OnUpdate(object objNotifier, LinkEventArgs args)
Parameters
objNotifier object
args LinkEventArgs
raise_OnUpdating(object, LinkEventArgs)
public void raise_OnUpdating(object objNotifier, LinkEventArgs args)
Parameters
objNotifier object
args LinkEventArgs
Destroying
Occurs when [on destroying].
public event EventHandler<identifier> Destroying
Event Type
OnAdded
Occurs when [on add].
public event EventHandler<addtodoceventargs> OnAdded
Event Type
EventHandlerAddToDocEventArgs>
OnContentsUpdated
public event EventHandler OnContentsUpdated
Event Type
OnDestroy
Occurs when [on destroy].
public event EventHandler<linkeventargs> OnDestroy
Event Type
OnDestroying
Occurs when [on destroying].
public event EventHandler<linkeventargs> OnDestroying
Event Type
OnRemoved
Occurs when [on remove].
public event EventHandler<removefromdoceventargs> OnRemoved
Event Type
EventHandlerRemoveFromDocEventArgs>
OnUpdate
Occurs when [on update].
public event EventHandler<linkeventargs> OnUpdate
Event Type
OnUpdating
Occurs when [on updating].
public event EventHandler<linkeventargs> OnUpdating
Event Type
Operators
implicit operator ObjectBase(UIntPtr)
Cast operator.
public static implicit operator ObjectBase(UIntPtr key)
Parameters
key UIntPtr
The key.
Returns
implicit operator UIntPtr(ObjectBase)
Cast operator.
public static implicit operator UIntPtr(ObjectBase ob)
Parameters
ob ObjectBase
The object.