private static void ProcessDateFormat(DateFieldFormat dff, Utf8JsonWriter jsonw) { jsonw.WritePropertyName("DateFieldFormat"); jsonw.WriteStartObject(); jsonw.WriteString("CalendarType", dff.CalendarType.ToStringSafe()); jsonw.WriteString("DateFirstSeparator", dff.DateFirstSeparator.ToStringSafe()); jsonw.WriteString("DateOrder", dff.DateOrder.ToStringSafe()); jsonw.WriteString("DatePrefixSeparator", dff.DatePrefixSeparator.ToStringSafe()); jsonw.WriteString("DateSecondSeparator", dff.DateSecondSeparator.ToStringSafe()); jsonw.WriteString("DateSuffixSeparator", dff.DateSuffixSeparator.ToStringSafe()); jsonw.WriteString("DayFormat", dff.DayFormat.ToStringSafe()); jsonw.WriteString("DayOfWeekPosition", dff.DayOfWeekPosition.ToStringSafe()); jsonw.WriteString("DayOfWeekSeparator", dff.DayOfWeekSeparator.ToStringSafe()); jsonw.WriteString("DayOfWeekType", dff.DayOfWeekType.ToStringSafe()); jsonw.WriteString("EraType", dff.EraType.ToStringSafe()); jsonw.WriteString("MonthFormat", dff.MonthFormat.ToStringSafe()); jsonw.WriteString("SystemDefaultType", dff.SystemDefaultType.ToStringSafe()); jsonw.WriteString("YearFormat", dff.YearFormat.ToStringSafe()); jsonw.WriteString("CalendarTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeCalendarType].Text); jsonw.WriteString("DateFirstSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateFirstSeparator].Text); jsonw.WriteString("DateOrderFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateOrder].Text); jsonw.WriteString("DatePrefixSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDatePrefixSeparator].Text); jsonw.WriteString("DateSecondSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateSecondSeparator].Text); jsonw.WriteString("DateSuffixSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateSuffixSeparator].Text); jsonw.WriteString("DayFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayFormat].Text); jsonw.WriteString("DayOfWeekPositionFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekPosition].Text); jsonw.WriteString("DayOfWeekSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekSeparator].Text); jsonw.WriteString("DayOfWeekTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekType].Text); jsonw.WriteString("EraTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeEraType].Text); jsonw.WriteString("MonthFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeMonthFormat].Text); jsonw.WriteString("SystemDefaultTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeSystemDefaultType].Text); jsonw.WriteString("YearFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeYearFormat].Text); jsonw.WriteEndObject(); }
private static void ProcessDateFormat(DateFieldFormat dff, XmlWriter xmlw) { xmlw.WriteStartElement("DateFieldFormat"); xmlw.WriteAttributeString("CalendarType", dff.CalendarType.ToStringSafe()); xmlw.WriteAttributeString("DateFirstSeparator", dff.DateFirstSeparator.ToStringSafe()); xmlw.WriteAttributeString("DateOrder", dff.DateOrder.ToStringSafe()); xmlw.WriteAttributeString("DatePrefixSeparator", dff.DatePrefixSeparator.ToStringSafe()); xmlw.WriteAttributeString("DateSecondSeparator", dff.DateSecondSeparator.ToStringSafe()); xmlw.WriteAttributeString("DateSuffixSeparator", dff.DateSuffixSeparator.ToStringSafe()); xmlw.WriteAttributeString("DayFormat", dff.DayFormat.ToStringSafe()); xmlw.WriteAttributeString("DayOfWeekPosition", dff.DayOfWeekPosition.ToStringSafe()); xmlw.WriteAttributeString("DayOfWeekSeparator", dff.DayOfWeekSeparator.ToStringSafe()); xmlw.WriteAttributeString("DayOfWeekType", dff.DayOfWeekType.ToStringSafe()); xmlw.WriteAttributeString("EraType", dff.EraType.ToStringSafe()); xmlw.WriteAttributeString("MonthFormat", dff.MonthFormat.ToStringSafe()); xmlw.WriteAttributeString("SystemDefaultType", dff.SystemDefaultType.ToStringSafe()); xmlw.WriteAttributeString("YearFormat", dff.YearFormat.ToStringSafe()); xmlw.WriteAttributeString("CalendarTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeCalendarType].Text); xmlw.WriteAttributeString("DateFirstSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateFirstSeparator].Text); xmlw.WriteAttributeString("DateOrderFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateOrder].Text); xmlw.WriteAttributeString("DatePrefixSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDatePrefixSeparator].Text); xmlw.WriteAttributeString("DateSecondSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateSecondSeparator].Text); xmlw.WriteAttributeString("DateSuffixSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDateSuffixSeparator].Text); xmlw.WriteAttributeString("DayFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayFormat].Text); xmlw.WriteAttributeString("DayOfWeekPositionFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekPosition].Text); xmlw.WriteAttributeString("DayOfWeekSeparatorFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekSeparator].Text); xmlw.WriteAttributeString("DayOfWeekTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeDayOfWeekType].Text); xmlw.WriteAttributeString("EraTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeEraType].Text); xmlw.WriteAttributeString("MonthFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeMonthFormat].Text); xmlw.WriteAttributeString("SystemDefaultTypeFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeSystemDefaultType].Text); xmlw.WriteAttributeString("YearFormatFormula", dff.ConditionFormulas[CrDateFieldFormatConditionFormulaTypeEnum.crDateFieldFormatConditionFormulaTypeYearFormat].Text); xmlw.WriteEndElement(); }
private static void ProcessDateFormat(DateFieldFormat dff, XmlWriter xmlw) { xmlw.WriteStartElement("DateFieldFormat"); xmlw.WriteAttributeString("DayFormat", dff.DayFormat.ToStringSafe()); xmlw.WriteAttributeString("MonthFormat", dff.MonthFormat.ToStringSafe()); xmlw.WriteAttributeString("YearFormat", dff.YearFormat.ToStringSafe()); xmlw.WriteEndElement(); }