Class BaseObject
Base class with properties and methods common to all Alternet.UI objects.
public class BaseObject : IBaseObject
- Inheritance
-
BaseObject
- Implements
- Derived
- Extension Methods
Fields
- StaticOptions
Gets or sets static options which are common to all descendants of BaseObject.
Properties
- DisposingOrDisposed
Gets whether this object is disposing or disposed. Default implementation returns False. Inherit from DisposableObject or override this property in order to have valid result.
- Immutable
Gets whether object is immutable (properties can not be changed).
- InvokeRequired
Gets a value indicating whether the caller must call an invoke method when making method calls to the UI objects because the caller is not on the UI thread.
- RuntimeKey
Returns a hash code that uniquely identifies the specified object instance during the application's lifetime. This value is guaranteed to be unique only for the lifetime of the object within the current application domain. When object is disposed, the same hash code may be returned for another object instance. This method is useful for scenarios where a stable identifier for an object instance is needed, such as in caching or tracking mechanisms, without relying on the object's own implementation of GetHashCode.
- RuntimeKeyAndType
Gets a string that combines the runtime type name and the runtime key. Result is guaranteed to be unique only for the lifetime of the object within the current application domain. When object is disposed, the same hash code may be returned for another object instance.
- UseNamesInToString
Gets or sets whether ToString() should not include property names in result.
Methods
- BeginInvoke(Delegate?, object?[]?)
Executes a delegate asynchronously on the UI thread.
- CheckSTARequirement()
Checks current thread on STA.
- EndInvoke(IAsyncResult)
Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed.
- InsideTryCatch(Action?)
Calls the specified action inside try catch block.
- InsideTryCatch<T>(Func<T>)
Calls the specified function inside try catch block.
- Invoke(Action?)
Executes the specified action, on the UI thread.
- Invoke(Delegate?, object?[]?)
Executes the specified delegate, on the UI thread, with the specified list of arguments.
- IsDisposingOrDisposed(object?)
Gets whether the specified object is disposing or disposed.
- Log(object?)
Same as Log(object?, LogItemKind).
- Nop()
Does nothing.
- Nop(Exception?)
Does nothing.
- NotImplemented()
Throws NotImplementedException exception.
- NotImplemented<T>()
Throws NotImplementedException exception.
- Post(Action?)
Adds specified action to the message queue and executes it on the UI thread.
- PostAndBusyCursor(Action?)
Executes the specified action while displaying a busy cursor.
- Required()
Marks object as required.
- SafeDisposeObject<T>(ref T?)
Safely disposes specified object which supports IDisposableObject interface.
- SafeDisposeSuppressException<T>(ref T?)
Safely disposes of the specified disposable object, suppressing any exceptions that occur during disposal.
- SafeDispose<T>(ref T?)
Safely disposes specified object which supports IDisposable interface.
- TryAttachEventHandler(object?, string, string)
Attempts to attach a specified method as an event handler for a given event on a target object. Only instance and public events are considered. The method to be attached can be either public or non-public.
- TryCatchSilent(Action?)
Calls the specified action inside try catch block silently.
- WrapException(Exception)
Wraps exception for the debug purposes.