Exemple #1
0
        /// <summary>
        /// The Constructor
        /// </summary>
        /// <param name="direction">set the direction that this type of name handling should be applied to, for requests or response?</param>
        public ArhSnakeCaseWrapper(OverrideDirection direction = OverrideDirection.Both) : base()
        {
            _direction = direction;

            _serializerSettings = new JsonSerializerSettings
            {
                ContractResolver = new DefaultContractResolver {
                    NamingStrategy = new SnakeCaseNamingStrategy()
                }
            };
        }
Exemple #2
0
        /// <summary>
        /// The Constructor
        /// </summary>
        /// <param name="baseUrl"></param>
        /// <param name="options"></param>
        /// <param name="direction">set the direction that this type of name handling should be applied to, for requests or response?</param>
        public ArhSnakeCaseWrapper(string baseUrl, RestHandlerInitializerOptions options,
                                   OverrideDirection direction = OverrideDirection.Both) : base(baseUrl, options)
        {
            _direction = direction;

            _serializerSettings = new JsonSerializerSettings
            {
                ContractResolver = new DefaultContractResolver {
                    NamingStrategy = new CamelCaseNamingStrategy()
                }
            };
        }
Exemple #3
0
        /// <summary>
        /// The Constructor
        /// </summary>
        /// <param name="baseUrl"></param>
        /// <param name="fixEndOfUrl">In some web framework, existence or not existence of slash '/' can cause to invoke an incorrect url;
        /// This feature can be turned of, but requires a manually handling of URL's slash, at the end of base url or begin of partial urls</param>
        /// <param name="direction">set the direction that this type of name handling should be applied to, for requests or response?</param>
        public ArhSnakeCaseWrapper(string baseUrl, bool fixEndOfUrl = true,
                                   OverrideDirection direction      = OverrideDirection.Both) : base(baseUrl, fixEndOfUrl)
        {
            _direction = direction;

            _serializerSettings = new JsonSerializerSettings
            {
                ContractResolver = new DefaultContractResolver {
                    NamingStrategy = new SnakeCaseNamingStrategy()
                }
            };
        }