Example #1
0
        public IValueSerializer BuildValueSerializer()
        {
            IEnumerable <IYamlTypeConverter> enumerable = BuildTypeConverters();
            ITypeInspector arg = BuildTypeInspector();
            IObjectGraphTraversalStrategy traversalStrategy = objectGraphTraversalStrategyFactory(arg, typeResolver, enumerable);
            IEventEmitter eventEmitter = eventEmitterFactories.BuildComponentChain(new WriterEventEmitter());

            return(new ValueSerializer(traversalStrategy, eventEmitter, enumerable, preProcessingPhaseObjectGraphVisitorFactories.Clone(), emissionPhaseObjectGraphVisitorFactories.Clone()));
        }
 /// <summary>
 /// Creates a new <see cref="IValueDeserializer" /> that implements the current configuration.
 /// This method is available for advanced scenarios. The preferred way to customize the bahavior of the
 /// deserializer is to use the <see cref="Build" /> method.
 /// </summary>
 public IValueSerializer BuildValueSerializer()
 {
     return(new ValueSerializer(
                CreateTraversalStrategy(),
                CreateEventEmitter(),
                BuildTypeConverters(),
                preProcessingPhaseObjectGraphVisitorFactories.Clone(),
                emissionPhaseObjectGraphVisitorFactories.Clone()
                ));
 }