Пример #1
0
 /// <summary>
 /// Finds out if this set is a subset of the given set.
 /// </summary>
 /// <returns><c>true</c> if all elements in this set are also present in the other set, <c>false</c>otherwise.</returns>
 /// <param name="otherSet">The other set.</param>
 public bool IsSubsetOfSet(NSSet otherSet)
 {
     lock (set)
     {
         foreach (NSObject o in set)
         {
             if (!otherSet.ContainsObject(o))
             {
                 return(false);
             }
         }
         return(true);
     }
 }
Пример #2
0
 /// <summary>
 /// Finds out whether at least one object is present in both sets.
 /// </summary>
 /// <returns><c>true</c> if the intersection of both sets is empty, <c>false</c> otherwise.</returns>
 /// <param name="otherSet">The other set.</param>
 public bool IntersectsSet(NSSet otherSet)
 {
     lock (set)
     {
         foreach (NSObject o in set)
         {
             if (otherSet.ContainsObject(o))
             {
                 return(true);
             }
         }
         return(false);
     }
 }
Пример #3
0
 /// <summary>
 /// Finds out if this set is a subset of the given set.
 /// </summary>
 /// <returns><c>true</c> if all elements in this set are also present in the other set, <c>false</c>otherwise.</returns>
 /// <param name="otherSet">The other set.</param>
 public bool IsSubsetOfSet(NSSet otherSet)
 {
     lock (set)
     {
         foreach (NSObject o in set)
         {
             if (!otherSet.ContainsObject(o))
                 return false;
         }
         return true;
     }
 }
Пример #4
0
 /// <summary>
 /// Finds out whether at least one object is present in both sets.
 /// </summary>
 /// <returns><c>true</c> if the intersection of both sets is empty, <c>false</c> otherwise.</returns>
 /// <param name="otherSet">The other set.</param>
 public bool IntersectsSet(NSSet otherSet)
 {
     lock (set)
     {
         foreach (NSObject o in set)
         {
             if (otherSet.ContainsObject(o))
                 return true;
         }
         return false;
     }
 }