ReflectionAttributeProvider
                
                
                
using Newtonsoft.
Json.
Utilities;
using System;
using System.
Collections.
Generic;
using System.
Runtime.
CompilerServices;
namespace Newtonsoft.
Json.
Serialization
{
    [
System.
Runtime.
CompilerServices.
NullableContext(
1)]
    [
System.
Runtime.
CompilerServices.
Nullable(
0)]
    
public class ReflectionAttributeProvider : 
IAttributeProvider
    {
        
private readonly object _attributeProvider;
        
public ReflectionAttributeProvider(
object attributeProvider)
        {
            
ValidationUtils.
ArgumentNotNull(
attributeProvider, 
"attributeProvider");
            
_attributeProvider = 
attributeProvider;
        }
        
public IList<
Attribute> 
GetAttributes(
bool inherit)
        {
            
return ReflectionUtils.
GetAttributes(
_attributeProvider, 
null, 
inherit);
        }
        
public IList<
Attribute> 
GetAttributes(
Type attributeType, 
bool inherit)
        {
            
return ReflectionUtils.
GetAttributes(
_attributeProvider, 
attributeType, 
inherit);
        }
    }
}