C# Class UtilJsonApiSerializer.Conventions.Impl.DefaultPropertyScanningConvention

Inheritance: IPropertyScanningConvention
Afficher le fichier Open project: FrontlineEducation/Util-JsonApiSerializer Class Usage Examples

Méthodes publiques

Méthode Description
DefaultPropertyScanningConvention ( ) : System
GetPropertyName ( PropertyInfo pi ) : string

Gets the name of the property as it gets serialized in JSON.

IsLinkedResource ( PropertyInfo pi ) : bool

Used to distinguish simple properties (serialized in-line) from linked resources (side-loaded in "linked" section).

IsPrimaryId ( PropertyInfo propertyInfo ) : bool

Determines if the given PropertyInfo is the primary ID of the currently scanned resource.

ShouldIgnore ( PropertyInfo pi ) : bool

Determines if the property should be ignored during scanning.

Private Methods

Méthode Description
IsMarkedSerializeAsPrimitive ( PropertyInfo pi ) : bool

Looks for "SerializeAsPrimitive" using reflection, with the idea being that such an attribute may be re-defined in projects that don't reference this one

Method Details

DefaultPropertyScanningConvention() public méthode

public DefaultPropertyScanningConvention ( ) : System
Résultat System

GetPropertyName() public méthode

Gets the name of the property as it gets serialized in JSON.
public GetPropertyName ( PropertyInfo pi ) : string
pi System.Reflection.PropertyInfo
Résultat string

IsLinkedResource() public méthode

Used to distinguish simple properties (serialized in-line) from linked resources (side-loaded in "linked" section).
public IsLinkedResource ( PropertyInfo pi ) : bool
pi System.Reflection.PropertyInfo
Résultat bool

IsPrimaryId() public méthode

Determines if the given PropertyInfo is the primary ID of the currently scanned resource.
public IsPrimaryId ( PropertyInfo propertyInfo ) : bool
propertyInfo System.Reflection.PropertyInfo
Résultat bool

ShouldIgnore() public méthode

Determines if the property should be ignored during scanning.
public ShouldIgnore ( PropertyInfo pi ) : bool
pi System.Reflection.PropertyInfo
Résultat bool