Add CanBeNull attribute.

pull/6325/head
maliming 5 years ago
parent f39b81a6cc
commit fd94b39936

@ -1,10 +1,11 @@
using System;
using JetBrains.Annotations;
namespace Volo.Abp.Json
{
public interface IJsonSerializerProvider
{
bool CanHandle(Type type);
bool CanHandle([CanBeNull]Type type);
string Serialize(object obj, bool camelCase = true, bool indented = false);

@ -1,4 +1,5 @@
using System;
using JetBrains.Annotations;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
@ -13,7 +14,7 @@ namespace Volo.Abp.Json.SystemTextJson
Options = options.Value;
}
public virtual bool Match(Type type)
public virtual bool Match([CanBeNull]Type type)
{
return Options.UnsupportedTypes.Contains(type);
}

Loading…
Cancel
Save