public override bool Equals(ISafeComWrapper <Microsoft.Vbe.Interop.Forms.UserForm> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target))); }
//public override void Release(bool final = false) //{ // if (!IsWrappingNullReference) // { // for (var i = 1; i <= Count; i++) // { // this[i].Release(); // } // base.Release(final); // } //} public override bool Equals(ISafeComWrapper <MSO.CommandBarControls> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target))); }
public override bool Equals(ISafeComWrapper <VB.LinkedWindows> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target))); }
public override bool Equals(ISafeComWrapper <VB.Forms.Control> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target))); }
public override bool Equals(ISafeComWrapper <VB.Application> other) { return(IsEqualIfNull(other) || (other != null && other.Target.Version == Version)); }
public override bool Equals(ISafeComWrapper <object> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target))); }
public override bool Equals(ISafeComWrapper <VB.Addins> other) { return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target.Parent, Parent))); }
public abstract bool Equals(ISafeComWrapper <T> other);
/// <summary> /// <c>true</c> when wrapping a <c>null</c> reference and <see cref="other"/> is either <c>null</c> or wrapping a <c>null</c> reference. /// </summary> protected bool IsEqualIfNull(ISafeComWrapper <T> other) { return((other == null || other.IsWrappingNullReference) && IsWrappingNullReference); }
public abstract bool TryRemove(ISafeComWrapper comWrapper);
public abstract void Add(ISafeComWrapper comWrapper);
//We do not use GetHashCode because subclasses of SafeComWrapper<T> overwrite this method //and we need to distinguish between individual instances. protected int GetComWrapperObjectHashCode(ISafeComWrapper comWrapper) { return(RuntimeHelpers.GetHashCode(comWrapper)); }