internal NameSwitcherQuery([NotNull] IRestCollectionQuery underlyingQuery, [NotNull] INamingConventionSwitcher switcher)
        {
            Debug.Assert(underlyingQuery != null);
            Debug.Assert(switcher != null);

            _underlyingQuery = underlyingQuery;
            _switcher        = switcher;
        }
        public ContentNegotiator(IContentAccepts accepts, IContentWriter writer, INamingConventionSwitcher namingConventionSwitcher)
        {
            _accepts = accepts;
            _writer  = writer;

            _jsonSerializerSettings = new JsonSerializerSettings
            {
                ContractResolver = new NameSwitcherContractResolver(namingConventionSwitcher),
                //Converters = { new RestItemDataJsonConverter(namingConventionSwitcher) }
            };
        }
 public ResourceBodyReader(INamingConventionSwitcher switcher)
 {
     _restItemDataTranslator = new JObjectToDictionaryTranslator <RestItemData>(switcher);
 }
        public static IRestCollectionQuery TryWrapQuery([NotNull] IRestCollectionQuery underlyingQuery, [CanBeNull] INamingConventionSwitcher nameSwitcher)
        {
            if (underlyingQuery == null)
            {
                throw new ArgumentNullException(nameof(underlyingQuery));
            }

            if (nameSwitcher != null)
            {
                return(new NameSwitcherQuery(underlyingQuery, nameSwitcher));
            }

            return(underlyingQuery);
        }
 public AggregatorNextPath(string dir, INamingConventionSwitcher namingConventionSwitcher)
 {
     _namingConventionSwitcher = namingConventionSwitcher;
     Raw = dir;
 }
 public ResponseWriter(IHttpRequestResponder responder, Response response, INamingConventionSwitcher nameSwitcher)
 {
     _responder    = responder;
     _response     = response;
     _nameSwitcher = nameSwitcher;
 }
 public NameSwitcherQueryCreator(IQueryCreator underlyingCreator, INamingConventionSwitcher nameSwitcher)
 {
     _underlyingCreator = underlyingCreator;
     _nameSwitcher      = nameSwitcher;
 }
Exemple #8
0
 public NextAggregator([NotNull] IRestEndpoint startEndpoint, [NotNull] INamingConventionSwitcher namingConventionSwitcher)
 {
     _startEndpoint            = startEndpoint ?? throw new ArgumentNullException(nameof(startEndpoint));
     _namingConventionSwitcher = namingConventionSwitcher ?? throw new ArgumentNullException(nameof(namingConventionSwitcher));
 }
 public RestItemDataJsonConverter(INamingConventionSwitcher switcher)
 {
     _restItemDataTranslator = new JObjectToDictionaryTranslator <RestItemData>(switcher);
 }
 public RequestReader(IHttpRequestReader httpReader, INamingConventionSwitcher nameSwitcher, IQueryCreator queryCreator)
 {
     _httpReader   = httpReader;
     _nameSwitcher = nameSwitcher;
     _queryCreator = new NameSwitcherQueryCreator(queryCreator, nameSwitcher);
 }
 public JObjectToDictionaryTranslator([CanBeNull] INamingConventionSwitcher switcher)
 {
     _switcher = switcher ?? new VoidNamingConventionSwitcher();
 }
Exemple #12
0
 public ResourceBodyJsonConverter(INamingConventionSwitcher switcher)
 {
     _resourceBodyReader = new ResourceBodyReader(switcher);
 }
 public NameSwitcherContractResolver(INamingConventionSwitcher namingConventionSwitcher)
 {
     _namingConventionSwitcher = namingConventionSwitcher;
 }
Exemple #14
0
 public ContentParser(IContentReader reader, INamingConventionSwitcher switcher)
 {
     _reader   = reader;
     _switcher = switcher;
 }