Exemplo n.º 1
0
        /// <summary>
        /// Modifies default JsonSerializerOptions for Endpoints
        /// </summary>
        /// <param name="jsonSerializerOptionsModification">Action that modifies JsonSerializerOptions</param>
        /// <returns>Updated instance of the option builder</returns>
        public EasyEndpointBuilder WithJsonSerializer(Action <JsonSerializerOptions> jsonSerializerOptionsModification)
        {
            var option = DefaultJsonSerializer.GetDefaultSettings();

            jsonSerializerOptionsModification(option);
            endpointOptions.JsonSerializer = new DefaultJsonSerializer(option);
            return(this);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates new instance of EndpointOptions with default values
 /// </summary>
 public EndpointOptions()
 {
     JsonSerializer = new DefaultJsonSerializer();
 }