internal static bool ComputeProperty(InvocationTest init, PsMaxLengths vis, out DateTime res) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 InfoComposer property = default(InfoComposer); if (!property.ConnectProperty(init._0001(), init._0001(), init._0002())) { res = default(DateTime); return(false); } DateTime dateTime = SetProperty(property); switch (property.m_DatabaseComposer) { case (ExceptionDicCandidate)1: dateTime = new DateTime(dateTime.Ticks, DateTimeKind.Utc); break; case (ExceptionDicCandidate)2: { TimeSpan timeSpan2 = new TimeSpan(property._ExceptionComposer, property.attributeComposer, 0); long num = dateTime.Ticks + timeSpan2.Ticks; if (num <= DateTime.MaxValue.Ticks) { dateTime = new DateTime(num, DateTimeKind.Utc).ToLocalTime(); break; } num += dateTime.AwakeProperty().Ticks; if (num > DateTime.MaxValue.Ticks) { num = DateTime.MaxValue.Ticks; } dateTime = new DateTime(num, DateTimeKind.Local); break; } case (ExceptionDicCandidate)3: { TimeSpan timeSpan = new TimeSpan(property._ExceptionComposer, property.attributeComposer, 0); long num = dateTime.Ticks - timeSpan.Ticks; if (num >= DateTime.MinValue.Ticks) { dateTime = new DateTime(num, DateTimeKind.Utc).ToLocalTime(); break; } num += dateTime.AwakeProperty().Ticks; if (num < DateTime.MinValue.Ticks) { num = DateTime.MinValue.Ticks; } dateTime = new DateTime(num, DateTimeKind.Local); break; } } res = ReadProperty(dateTime, vis); return(true); }
internal static bool DestroyProperty(InvocationTest info, out DateTimeOffset attr) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 InfoComposer property = default(InfoComposer); if (!property.ConnectProperty(info._0001(), info._0001(), info._0002())) { attr = default(DateTimeOffset); return(false); } DateTime dateTime = SetProperty(property); TimeSpan offset; switch (property.m_DatabaseComposer) { case (ExceptionDicCandidate)1: offset = new TimeSpan(0L); break; case (ExceptionDicCandidate)2: offset = new TimeSpan(-property._ExceptionComposer, -property.attributeComposer, 0); break; case (ExceptionDicCandidate)3: offset = new TimeSpan(property._ExceptionComposer, property.attributeComposer, 0); break; default: offset = TimeZoneInfo.Local.GetUtcOffset(dateTime); break; } long num = dateTime.Ticks - offset.Ticks; if (num < 0 || num > 3155378975999999999L) { attr = default(DateTimeOffset); return(false); } attr = new DateTimeOffset(dateTime, offset); return(true); }