Пример #1
0
        static ABSaveSettings()
        {
            SettingsConverterProcessor.Split(BuiltInConverters.Infos, out IReadOnlyDictionary <Type, ConverterInfo>?exactConverters, out IReadOnlyList <ConverterInfo>?nonExactConverters);

            ForSpeed = new ABSaveSettings(true, true, true, BuiltInConverters.Infos.Length, exactConverters, nonExactConverters);
            ForSize  = new ABSaveSettings(false, true, true, BuiltInConverters.Infos.Length, exactConverters, nonExactConverters);
        }
Пример #2
0
        internal ABSaveSettings CreateSettings(ABSaveSettings template)
        {
            // Handle basic settings
            bool lazyWriteCompressed = _lazyWriteCompressed ?? template.LazyCompressedWriting;
            bool useUTF8             = _useUTF8 ?? template.UseUTF8;
            bool useLittleEndian     = _useLittleEndian ?? template.UseLittleEndian;

            // Process converters
            EnsureConvertersListInitialized();
            SettingsConverterProcessor.Split(_converters !, out IReadOnlyDictionary <Type, ConverterInfo>?exactConverters, out IReadOnlyList <ConverterInfo>?nonExactConverter);

            // Create the new settings.
            return(new ABSaveSettings(lazyWriteCompressed, useUTF8, useLittleEndian,
                                      _converters !.Count, exactConverters, nonExactConverter));
        }