Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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;
 }