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

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

            _jsonSerializerSettings = new JsonSerializerSettings
            {
                ContractResolver = new NameSwitcherContractResolver(namingConventionSwitcher),
                //Converters = { new RestItemDataJsonConverter(namingConventionSwitcher) }
            };
        }
예제 #3
0
 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);
        }
예제 #5
0
 public AggregatorNextPath(string dir, INamingConventionSwitcher namingConventionSwitcher)
 {
     _namingConventionSwitcher = namingConventionSwitcher;
     Raw = dir;
 }
예제 #6
0
 public ResponseWriter(IHttpRequestResponder responder, Response response, INamingConventionSwitcher nameSwitcher)
 {
     _responder    = responder;
     _response     = response;
     _nameSwitcher = nameSwitcher;
 }
 public NameSwitcherQueryCreator(IQueryCreator underlyingCreator, INamingConventionSwitcher nameSwitcher)
 {
     _underlyingCreator = underlyingCreator;
     _nameSwitcher      = nameSwitcher;
 }
예제 #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);
 }
예제 #10
0
 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();
 }
예제 #12
0
 public ResourceBodyJsonConverter(INamingConventionSwitcher switcher)
 {
     _resourceBodyReader = new ResourceBodyReader(switcher);
 }
 public NameSwitcherContractResolver(INamingConventionSwitcher namingConventionSwitcher)
 {
     _namingConventionSwitcher = namingConventionSwitcher;
 }
예제 #14
0
 public ContentParser(IContentReader reader, INamingConventionSwitcher switcher)
 {
     _reader   = reader;
     _switcher = switcher;
 }