Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mock"/> class.
 /// </summary>
 internal Mock(SystemGenerics.IEnumerable <T> collection)
     : base(collection) => this.Setup();
Exemple #2
0
 public static SystemGenerics.List <T> Create(SystemGenerics.IEnumerable <T> collection) =>
 new Mock(collection);
Exemple #3
0
 /// <summary>
 /// Inserts the elements of a collection into the list
 /// at the specified index.
 /// </summary>
 public static void InsertRange(SystemGenerics.List <T> list, int index,
                                SystemGenerics.IEnumerable <T> collection)
 {
     (list as Mock)?.CheckDataRace(true);
     list.InsertRange(index, collection);
 }
Exemple #4
0
 public static SystemGenerics.HashSet <T> Create(SystemGenerics.IEnumerable <T> collection,
                                                 SystemGenerics.IEqualityComparer <T> comparer) =>
 new Mock(collection, comparer);
Exemple #5
0
 /// <summary>
 /// Adds the elements of the specified collection to the end of the list.
 /// </summary>
 public static void AddRange(SystemGenerics.List <T> list, SystemGenerics.IEnumerable <T> collection)
 {
     (list as Mock)?.CheckDataRace(true);
     list.AddRange(collection);
 }
Exemple #6
0
 internal Mock(SystemGenerics.IEnumerable <T> collection, SystemGenerics.IEqualityComparer <T> comparer)
     : base(collection, comparer) => this.Setup();
Exemple #7
0
 /// <summary>
 /// Modifies the current hash set object to contain all elements that are
 /// present in itself, the specified collection, or both.
 /// </summary>
 public static void UnionWith(SystemGenerics.HashSet <T> hashSet, SystemGenerics.IEnumerable <T> other)
 {
     (hashSet as Mock)?.CheckDataRace(true);
     hashSet.UnionWith(other);
 }
Exemple #8
0
 /// <summary>
 /// Modifies the current hash set object to contain only elements that are present either in
 /// that object or in the specified collection, but not both.
 /// </summary>
 public static void SymmetricExceptWith(SystemGenerics.HashSet <T> hashSet, SystemGenerics.IEnumerable <T> other)
 {
     (hashSet as Mock)?.CheckDataRace(true);
     hashSet.SymmetricExceptWith(other);
 }
Exemple #9
0
 /// <summary>
 /// Determines whether a hash set object and the specified collection contain the same elements.
 /// </summary>
 public static bool SetEquals(SystemGenerics.HashSet <T> hashSet, SystemGenerics.IEnumerable <T> other)
 {
     (hashSet as Mock)?.CheckDataRace(false);
     return(hashSet.SetEquals(other));
 }
Exemple #10
0
 /// <summary>
 /// Determines whether a hash set object is a superset of the specified collection.
 /// </summary>
 public static bool IsSupersetOf(SystemGenerics.HashSet <T> hashSet, SystemGenerics.IEnumerable <T> other)
 {
     (hashSet as Mock)?.CheckDataRace(false);
     return(hashSet.IsSupersetOf(other));
 }