Search Results for

    Show / Hide Table of Contents

    Class ReferenceObjectComparer

    A object comparer that compares two objects and sees if they are based on the same reference.

    Inheritance
    System.Object
    System.Collections.Generic.List<IReferenceObjectComparer>
    ReferenceObjectComparer
    Implements
    System.Collections.Generic.IList<IReferenceObjectComparer>
    System.Collections.Generic.ICollection<IReferenceObjectComparer>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyList<IReferenceObjectComparer>
    System.Collections.Generic.IReadOnlyCollection<IReferenceObjectComparer>
    System.Collections.Generic.IEnumerable<IReferenceObjectComparer>
    System.Collections.IEnumerable
    IReferenceObjectComparer
    Inherited Members
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.get_Item(System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Add(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.Add(System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.AddRange(System.Collections.Generic.IEnumerable<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.AsReadOnly()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.BinarySearch(System.Int32, System.Int32, ImageVault.Common.Lib.IReferenceObjectComparer, System.Collections.Generic.IComparer<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.BinarySearch(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.BinarySearch(ImageVault.Common.Lib.IReferenceObjectComparer, System.Collections.Generic.IComparer<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Clear()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Contains(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.Contains(System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.ConvertAll<TOutput>(System.Converter<ImageVault.Common.Lib.IReferenceObjectComparer, TOutput>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.CopyTo(ImageVault.Common.Lib.IReferenceObjectComparer[])
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.CopyTo(System.Int32, ImageVault.Common.Lib.IReferenceObjectComparer[], System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.CopyTo(ImageVault.Common.Lib.IReferenceObjectComparer[], System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Exists(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Find(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindAll(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindIndex(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindIndex(System.Int32, System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindIndex(System.Int32, System.Int32, System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindLast(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindLastIndex(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindLastIndex(System.Int32, System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.FindLastIndex(System.Int32, System.Int32, System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.ForEach(System.Action<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.GetEnumerator()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.Generic.IEnumerable<ImageVault.Common.Lib.IReferenceObjectComparer>.GetEnumerator()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IEnumerable.GetEnumerator()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.GetRange(System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.IndexOf(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.IndexOf(System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.IndexOf(ImageVault.Common.Lib.IReferenceObjectComparer, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.IndexOf(ImageVault.Common.Lib.IReferenceObjectComparer, System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Insert(System.Int32, ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.LastIndexOf(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.LastIndexOf(ImageVault.Common.Lib.IReferenceObjectComparer, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.LastIndexOf(ImageVault.Common.Lib.IReferenceObjectComparer, System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Remove(ImageVault.Common.Lib.IReferenceObjectComparer)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.Remove(System.Object)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.RemoveAll(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.RemoveAt(System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.RemoveRange(System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Reverse()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Reverse(System.Int32, System.Int32)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Sort()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Sort(System.Collections.Generic.IComparer<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Sort(System.Comparison<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.ToArray()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.TrimExcess()
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.TrueForAll(System.Predicate<ImageVault.Common.Lib.IReferenceObjectComparer>)
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Capacity
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Count
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.IsFixedSize
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.Generic.ICollection<ImageVault.Common.Lib.IReferenceObjectComparer>.IsReadOnly
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.IsReadOnly
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.ICollection.IsSynchronized
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.ICollection.SyncRoot
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.Item[System.Int32]
    System.Collections.Generic.List<ImageVault.Common.Lib.IReferenceObjectComparer>.System.Collections.IList.Item[System.Int32]
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib
    Assembly: ImageVault.Common.dll
    Syntax
    public class ReferenceObjectComparer : List<IReferenceObjectComparer>, IList<IReferenceObjectComparer>, ICollection<IReferenceObjectComparer>, IList, ICollection, IReadOnlyList<IReferenceObjectComparer>, IReadOnlyCollection<IReferenceObjectComparer>, IEnumerable<IReferenceObjectComparer>, IEnumerable, IReferenceObjectComparer
    Remarks

    This is useful for classes that wraps other classes and we want to compare the original instance with the wrapped instance. 2010-09-28 dan: Created

    Constructors

    ReferenceObjectComparer()

    Declaration
    public ReferenceObjectComparer()

    Methods

    AreSameReferenceObject(Object, Object)

    Compares two objects and compares if they are based on the same reference object.

    Declaration
    public bool AreSameReferenceObject(object a, object b)
    Parameters
    Type Name Description
    System.Object a

    The first object to compare

    System.Object b

    The second object to compare

    Returns
    Type Description
    System.Boolean

    True if they originates from the same instance, false otherwize.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IReferenceObjectComparer

    Extension Methods

    ListExtensions.Batch<T>(IEnumerable<T>, Int32)
    EnumExtensions.GetNames<TEnum>(TEnum)
    EnumerableExtensions.Distinct<T>(IEnumerable<T>, Func<T, Int32>)
    RandomUtil.Random<T>(IList<T>, Int32)
    RandomUtil.Random<TItem, TReturn>(IList<TItem>, Func<TItem, TReturn>)
    RandomUtil.Random<T>(IList<T>)
    RandomUtil.Random<TItem, TReturn>(IList<TItem>, Int32, Func<TItem, TReturn>)
    EnumerableExtensions.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    In This Article
    Back to top (c) Meriworks 2002-2022