Example #1
0
 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)));
        }
Example #3
0
 public override bool Equals(ISafeComWrapper <VB.LinkedWindows> other)
 {
     return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target)));
 }
Example #4
0
 public override bool Equals(ISafeComWrapper <VB.Forms.Control> other)
 {
     return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target)));
 }
Example #5
0
 public override bool Equals(ISafeComWrapper <VB.Application> other)
 {
     return(IsEqualIfNull(other) || (other != null && other.Target.Version == Version));
 }
Example #6
0
 public override bool Equals(ISafeComWrapper <object> other)
 {
     return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target, Target)));
 }
Example #7
0
 public override bool Equals(ISafeComWrapper <VB.Addins> other)
 {
     return(IsEqualIfNull(other) || (other != null && ReferenceEquals(other.Target.Parent, Parent)));
 }
Example #8
0
 public abstract bool Equals(ISafeComWrapper <T> other);
Example #9
0
 /// <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);
 }
Example #10
0
 public abstract bool TryRemove(ISafeComWrapper comWrapper);
Example #11
0
 public abstract void Add(ISafeComWrapper comWrapper);
Example #12
0
 //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));
 }