Exemple #1
0
 public void SetOccurs(Uri occurs)
 {
     if (occurs != null)
     {
         _occurs = OccursExtension.FromString(occurs.ToString());
     }
     else
     {
         _occurs = Occurs.Unknown;
     }
 }
Exemple #2
0
        public Uri GetOccurs()
        {
            if (occurs != Occurs.Unknown)
            {
                try {
                    return(new Uri(OccursExtension.ToString(occurs)));
                } catch (UriFormatException exception) {
                    // This should never happen since we control the possible values of the Occurs enum.
                    throw new SystemException(exception.Message, exception);
                }
            }

            return(null);
        }