Exemple #1
0
        public virtual string Format(FormatContext context, BareANY value, int indentLevel)
        {
            if (value == null)
            {
                return(string.Empty);
            }
            object bareValue = value.BareValue;
            Interval <PlatformDate> innerDateInterval   = null;
            Interval <MbDate>       innerMbDateInterval = null;

            if (bareValue != null && bareValue is DateInterval)
            {
                DateInterval dateInterval = (DateInterval)bareValue;
                HandleConstraints(context, context.GetModelToXmlResult(), context.GetPropertyPath(), dateInterval);
                innerDateInterval   = dateInterval.Interval;
                innerMbDateInterval = IntervalFactory.CreateMbDateInterval(innerDateInterval);
            }
            BareANY newValue = new IVLImpl <TS, Interval <MbDate> >(typeof(Interval <object>), innerMbDateInterval, value.NullFlavor, value
                                                                    .DataType);

            return(actualFormatter.Format(context, newValue, indentLevel));
        }