示例#1
0
        protected HandlerSettings(
            [NotNull] IEnumerable<IHandlerResolver> handlerModules,
            [NotNull] IContentTypeMapper contentTypeMapper,
            IExceptionToModelConverter exceptionToModelConverter = null,
            ISerializer serializer = null)
        {
            Guard.EnsureNotNull(handlerModules, "handlerResolver");
            Guard.EnsureNotNull(contentTypeMapper, "contentTypeMapper");

            _handlerModules = handlerModules;
            _contentTypeMapper = contentTypeMapper;
            _exceptionToModelConverter = exceptionToModelConverter ?? new ExceptionToModelConverter();
            _serializer = serializer ?? new DefaultJsonSerializer();
        }
 public PageTypeElementParser(IContentTypeMapper mapper, IContentTypeWriter contentTypeWriter, IPackageReaderContext readerContext)
 {
     _mapper = mapper;
     _contentTypeWriter = contentTypeWriter;
     _readerContext = readerContext ?? NullPackageReaderContext.Instance;
 }
 public PageTypeElementParser(IContentTypeMapper mapper, IContentTypeWriter contentTypeWriter, IPackageReaderContext readerContext)
 {
     _mapper            = mapper;
     _contentTypeWriter = contentTypeWriter;
     _readerContext     = readerContext ?? NullPackageReaderContext.Instance;
 }