コード例 #1
0
        public static JsonSerializerSettings ConfigureSerializer(
            JsonSerializerSettings settings,
            ILogger <IIdentifierValueDtoJsonConverter> logger = null)
        {
            settings.TypeNameHandling = TypeNameHandling.Auto;
            settings.AddSwashbuckleNamesBinderFor <IDefinitionType>()
            .AddSwashbuckleNamesBinderFor <MatchSpecification>();
            settings.Converters.Add(
                new IIdentifierValueDtoJsonConverter(logger ?? NullLogger <IIdentifierValueDtoJsonConverter> .Instance));


            return(settings);
        }