Esempio n. 1
0
        int _deserializationDepth;         // recursion tracker for special types of schema-changes (can be removed eventually when we implemented a better solution)


        public SchemaDynamicFormatter(CerasSerializer ceras, Schema schema)
        {
            _ceras         = ceras;
            _currentSchema = schema;

            var type = typeof(T);

            BannedTypes.ThrowIfNonspecific(type);

            ActivateSchema(_currentSchema);

            RegisterForSchemaChanges();
        }
Esempio n. 2
0
        int _deserializationDepth;         // recursion tracker for special types of schema-changes (can be removed eventually when we implemented a better solution)


        public SchemaDynamicFormatter(CerasSerializer ceras, Schema schema)
        {
            _ceras         = ceras;
            _currentSchema = schema;

            var type = typeof(T);

            BannedTypes.ThrowIfNonspecific(type);

            var typeConfig = _ceras.Config.GetTypeConfig(type);

            typeConfig.VerifyConstructionMethod();

            ActivateSchema(_currentSchema);

            RegisterForSchemaChanges();
        }