Exemplo n.º 1
0
        public static OffSetDateSerializer RegisterSerializer()
        {
            OffSetDateSerializer serializer = new OffSetDateSerializer();

            BsonSerializer.RegisterSerializer(typeof(OffsetDate), serializer);
            return(serializer);
        }
        public static void RegisterAll(IDateTimeZoneProvider provider)
        {
            ZonedDateTimeSerializer.RegisterSerializer(provider);

            LocalDateTimeSerializer.RegisterSerializer();
            LocalDateSerializer.RegisterSerializer();
            LocalTimeSerializer.RegisterSerializer();

            OffSetDatetimeSerializer.RegisterSerializer();
            OffSetTimeSerializer.RegisterSerializer();
            OffSetDateSerializer.RegisterSerializer();

            PeriodSerializer.RegisterSerializer();
            DurationSerializer.RegisterSerializer();
        }