Exemple #1
0
        internal static Calendar ReadOnly(Calendar calendar)
        {
            if (calendar == null) { throw new ArgumentNullException("calendar"); }
            Contract.EndContractBlock();
            if (calendar.IsReadOnly) { return (calendar); }

            Calendar clonedCalendar = (Calendar)(calendar.MemberwiseClone());
            clonedCalendar.SetReadOnlyState(true);

            return (clonedCalendar);
        }
Exemple #2
0
        public static Calendar ReadOnly(Calendar calendar)
        {
            ArgumentNullException.ThrowIfNull(calendar);

            if (calendar.IsReadOnly)
            {
                return(calendar);
            }

            Calendar clonedCalendar = (Calendar)(calendar.MemberwiseClone());

            clonedCalendar.SetReadOnlyState(true);
            return(clonedCalendar);
        }
Exemple #3
0
        public static Calendar ReadOnly(Calendar calendar)
        {
            if (calendar == null)
            {
                throw new ArgumentNullException("calendar");
            }
            if (calendar.IsReadOnly)
            {
                return(calendar);
            }
            Calendar calendar2 = (Calendar)calendar.MemberwiseClone();

            calendar2.SetReadOnlyState(true);
            return(calendar2);
        }
Exemple #4
0
        public static Calendar ReadOnly(Calendar calendar)
        {
            if (calendar == null)
            {
                throw new ArgumentNullException(nameof(calendar));
            }
            if (calendar.IsReadOnly)
            {
                return(calendar);
            }

            Calendar clonedCalendar = (Calendar)(calendar.MemberwiseClone());

            clonedCalendar.SetReadOnlyState(true);
            return(clonedCalendar);
        }
Exemple #5
0
        public static Calendar ReadOnly(Calendar calendar)
        {
            if (calendar == null)
            {
                throw new ArgumentNullException("calendar");
            }
            if (calendar.IsReadOnly)
            {
                return(calendar);
            }
            Calendar calendar1 = (Calendar)calendar.MemberwiseClone();
            int      num       = 1;

            calendar1.SetReadOnlyState(num != 0);
            return(calendar1);
        }
Exemple #6
0
        public static Calendar ReadOnly(Calendar calendar)
        {
            if (calendar == null) { throw new ArgumentNullException(nameof(calendar)); }
            Contract.EndContractBlock();
            if (calendar.IsReadOnly) { return (calendar); }

            Calendar clonedCalendar = (Calendar)(calendar.MemberwiseClone());
            clonedCalendar.SetReadOnlyState(true);

            return (clonedCalendar);
        }
Exemple #7
0
 public static Calendar ReadOnly(Calendar calendar)
 {
     if (calendar == null)
     {
         throw new ArgumentNullException("calendar");
     }
     if (calendar.IsReadOnly)
     {
         return calendar;
     }
     Calendar calendar2 = (Calendar) calendar.MemberwiseClone();
     calendar2.SetReadOnlyState(true);
     return calendar2;
 }