예제 #1
0
 // Token: 0x06000AE4 RID: 2788 RVA: 0x0003F3E8 File Offset: 0x0003D5E8
 internal DateTime?lmethod_1898()
 {
     this.field_4 = Class_408.ReadAsDateTime;
     while (this.tmethod_1892())
     {
         if (this.prop_9 != Class_508.Comment)
         {
             if (this.prop_9 == Class_508.Date)
             {
                 return(new DateTime?((DateTime)this.prop_10));
             }
             if (this.prop_9 == Class_508.Null)
             {
                 return(null);
             }
             if (this.prop_9 == Class_508.String)
             {
                 string text = (string)this.prop_10;
                 if (string.IsNullOrEmpty(text))
                 {
                     this.xmethod_1901(Class_508.Null);
                     return(null);
                 }
                 object   obj;
                 DateTime dateTime;
                 if (Class_502.TryParseDateTime(text, Class_320.DateTime, this.prop_4, this.field_12, this.prop_14, out obj))
                 {
                     dateTime = (DateTime)obj;
                     dateTime = Class_502.EnsureDateTime(dateTime, this.prop_4);
                     this.gmethod_1903(Class_508.Date, dateTime, false);
                     return(new DateTime?(dateTime));
                 }
                 if (DateTime.TryParse(text, this.prop_14, DateTimeStyles.RoundtripKind, out dateTime))
                 {
                     dateTime = Class_502.EnsureDateTime(dateTime, this.prop_4);
                     this.gmethod_1903(Class_508.Date, dateTime, false);
                     return(new DateTime?(dateTime));
                 }
                 throw Class_414.lmethod_3098(this, "Could not convert string to DateTime: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_10));
             }
             else
             {
                 if (this.prop_9 == Class_508.EndArray)
                 {
                     return(null);
                 }
                 throw Class_414.lmethod_3098(this, "Error reading date. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_9));
             }
         }
     }
     this.xmethod_1901(Class_508.None);
     return(null);
 }
예제 #2
0
        // Token: 0x060010EC RID: 4332 RVA: 0x00055218 File Offset: 0x00053418
        public static string ToString(DateTime value, Class_319 format, Class_321 timeZoneHandling)
        {
            DateTime value2 = Class_502.EnsureDateTime(value, timeZoneHandling);
            string   result;

            using (StringWriter stringWriter = Class_515.CreateStringWriter(64))
            {
                stringWriter.Write('"');
                Class_502.WriteDateTimeString(stringWriter, value2, format, null, CultureInfo.InvariantCulture);
                stringWriter.Write('"');
                result = stringWriter.ToString();
            }
            return(result);
        }
예제 #3
0
 // Token: 0x060010C6 RID: 4294 RVA: 0x00054CAC File Offset: 0x00052EAC
 public virtual void kmethod_3077(DateTime arg_0)
 {
     base.dmethod_2086(Class_508.Date);
     arg_0 = Class_502.EnsureDateTime(arg_0, base.prop_7);
     if (string.IsNullOrEmpty(base.prop_10))
     {
         this.vmethod_3085();
         int num = 0;
         this.field_7[num++] = this.field_4;
         num = Class_502.WriteDateTimeString(this.field_7, num, arg_0, null, arg_0.Kind, base.prop_6);
         this.field_7[num++] = this.field_4;
         this.field_0.Write(this.field_7, 0, num);
         return;
     }
     this.field_0.Write(this.field_4);
     this.field_0.Write(arg_0.ToString(base.prop_10, base.prop_11));
     this.field_0.Write(this.field_4);
 }
예제 #4
0
 // Token: 0x060012E6 RID: 4838 RVA: 0x0005A792 File Offset: 0x00058992
 public virtual void cmethod_3424(DateTime arg_0)
 {
     base.xmethod_2051(arg_0);
     arg_0 = Class_502.EnsureDateTime(arg_0, base.prop_7);
     this.gmethod_3403(arg_0, Class_508.Date);
 }
예제 #5
0
 // Token: 0x06000BD6 RID: 3030 RVA: 0x00042448 File Offset: 0x00040648
 public virtual void tmethod_2122(DateTime arg_0)
 {
     base.xmethod_2051(arg_0);
     arg_0 = Class_502.EnsureDateTime(arg_0, base.prop_7);
     this.gmethod_2103(arg_0, Class_295.Date);
 }