- ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
- private IStateConcrete(System.IntPtr raw)
- {
- handle = raw;
- RegisterEventProxies();
- }
- ///<summary>Destructor.</summary>
- ~IStateConcrete()
- {
- Dispose(false);
- }
- ///<summary>Releases the underlying native instance.</summary>
- void Dispose(bool disposing)
- {
- if (handle != System.IntPtr.Zero) {
- Efl.Eo.Globals.efl_unref(handle);
- handle = System.IntPtr.Zero;
- }
- }
- ///<summary>Releases the underlying native instance.</summary>
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
- ///<summary>Verifies if the given object is equal to this one.</summary>
- public override bool Equals(object obj)
- {
- var other = obj as Efl.Object;
- if (other == null)
- return false;
- return this.NativeHandle == other.NativeHandle;
- }
- ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
- public override int GetHashCode()
- {
- return this.NativeHandle.ToInt32();
- }
- ///<summary>Turns the native pointer into a string representation.</summary>
- public override String ToString()
- {
- return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
- }
- ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
- void RegisterEventProxies()
+ /// <summary>Initializes a new instance of the <see cref="IState"/> class.
+ /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
+ /// <param name="wh">The native pointer to be wrapped.</param>
+ private IStateConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)