예제 #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;
     }
 }