コード例 #1
0
ファイル: Property.cs プロジェクト: nenaaki/oslc4net
 public void SetOccurs(Uri occurs)
 {
     if (occurs != null)
     {
         _occurs = OccursExtension.FromString(occurs.ToString());
     }
     else
     {
         _occurs = Occurs.Unknown;
     }
 }
コード例 #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);
        }