/// <summary>
 /// Returns true if this StylusPointDescription is a subset
 /// of the StylusPointDescription passed in
 /// </summary>
 /// <param name="stylusPointDescriptionSuperset">stylusPointDescriptionSuperset</param>
 /// <returns></returns>
 public bool IsSubsetOf(StylusPointDescription stylusPointDescriptionSuperset)
 {
     if (null == stylusPointDescriptionSuperset)
     {
         throw new ArgumentNullException("stylusPointDescriptionSuperset");
     }
     if (stylusPointDescriptionSuperset._stylusPointPropertyInfos.Length < _stylusPointPropertyInfos.Length)
     {
         return(false);
     }
     //
     // iterate through our local properties and make sure that the
     // superset contains them
     //
     for (int x = 0; x < _stylusPointPropertyInfos.Length; x++)
     {
         Guid id = _stylusPointPropertyInfos[x].Id;
         if (-1 == stylusPointDescriptionSuperset.IndexOf(id))
         {
             return(false);
         }
     }
     return(true);
 }
Esempio n. 2
0
 /// <summary>
 /// Returns true if this StylusPointDescription is a subset 
 /// of the StylusPointDescription passed in
 /// </summary>
 /// <param name="stylusPointDescriptionSuperset">stylusPointDescriptionSuperset</param>
 /// <returns></returns>
 public bool IsSubsetOf(StylusPointDescription stylusPointDescriptionSuperset)
 {
     if (null == stylusPointDescriptionSuperset)
     {
         throw new ArgumentNullException("stylusPointDescriptionSuperset");
     }
     if (stylusPointDescriptionSuperset._stylusPointPropertyInfos.Length < _stylusPointPropertyInfos.Length)
     {
         return false;
     }
     //
     // iterate through our local properties and make sure that the 
     // superset contains them
     //
     for (int x = 0; x < _stylusPointPropertyInfos.Length; x++)
     {
         Guid id = _stylusPointPropertyInfos[x].Id;
         if (-1 == stylusPointDescriptionSuperset.IndexOf(id))
         {
             return false;
         }
     }
     return true;
 }