C# Class UtilJsonApiSerializer.Serialization.TransformationHelper

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

Méthodes publiques

Méthode Description
AppendIncludedRepresentationRecursive ( object resource, IResourceMapping resourceMapping, List includedList, HashSet alreadyVisitedObjects, Context context ) : void
AssureAllMappingsRegistered ( Type type, Configuration config ) : void
ChooseProperResourceRepresentation ( object resource, IEnumerable representationList ) : IResourceRepresentation
CreateIncludedRepresentations ( List primaryResourceList, IResourceMapping resourceMapping, Context context ) : List
CreateRelationships ( object objectGraph, string parentId, IResourceMapping resourceMapping, Context context, string parentresourcetype ) : IRelationship>.Dictionary
CreateResourceRepresentation ( object objectGraph, IResourceMapping resourceMapping, Context context, bool isIncludedResource = false, Type ownerType = null ) : SingleResource
GetCollection ( JToken value, IRelationshipMapping mapping ) : object
GetMetadata ( object objectGraph ) : object>.Dictionary
GetObjectType ( object objectGraph ) : Type
GetValue ( JToken value, Type returnType ) : object
HandleException ( Exception exception ) : CompoundDocument
HandleHttpError ( HttpError error ) : CompoundDocument
UnifyObjectsToList ( object nestedObject ) : List
UnwrapResourceObject ( object objectGraph ) : object
VerifyTypeSupport ( Type innerObjectType ) : void

Private Methods

Méthode Description
CreateLinks ( IResourceMapping resourceMapping, UrlBuilder urlBuilder, SingleResource result, string parentId = null ) : ILink>.Dictionary
GetUrlFromTemplate ( string urlTemplate, string routePrefix, string parentId, string relatedId = null, string parenttype = null, string relationshipName = null ) : ILink

Method Details

AppendIncludedRepresentationRecursive() public méthode

public AppendIncludedRepresentationRecursive ( object resource, IResourceMapping resourceMapping, List includedList, HashSet alreadyVisitedObjects, Context context ) : void
resource object
resourceMapping IResourceMapping
includedList List
alreadyVisitedObjects HashSet
context Context
Résultat void

AssureAllMappingsRegistered() public méthode

public AssureAllMappingsRegistered ( Type type, Configuration config ) : void
type System.Type
config Configuration
Résultat void

ChooseProperResourceRepresentation() public méthode

public ChooseProperResourceRepresentation ( object resource, IEnumerable representationList ) : IResourceRepresentation
resource object
representationList IEnumerable
Résultat IResourceRepresentation

CreateIncludedRepresentations() public méthode

public CreateIncludedRepresentations ( List primaryResourceList, IResourceMapping resourceMapping, Context context ) : List
primaryResourceList List
resourceMapping IResourceMapping
context Context
Résultat List

CreateRelationships() public méthode

public CreateRelationships ( object objectGraph, string parentId, IResourceMapping resourceMapping, Context context, string parentresourcetype ) : IRelationship>.Dictionary
objectGraph object
parentId string
resourceMapping IResourceMapping
context Context
parentresourcetype string
Résultat IRelationship>.Dictionary

CreateResourceRepresentation() public méthode

public CreateResourceRepresentation ( object objectGraph, IResourceMapping resourceMapping, Context context, bool isIncludedResource = false, Type ownerType = null ) : SingleResource
objectGraph object
resourceMapping IResourceMapping
context Context
isIncludedResource bool
ownerType System.Type
Résultat UtilJsonApiSerializer.Serialization.Representations.Resources.SingleResource

GetCollection() public méthode

public GetCollection ( JToken value, IRelationshipMapping mapping ) : object
value JToken
mapping IRelationshipMapping
Résultat object

GetMetadata() public méthode

public GetMetadata ( object objectGraph ) : object>.Dictionary
objectGraph object
Résultat object>.Dictionary

GetObjectType() public méthode

public GetObjectType ( object objectGraph ) : Type
objectGraph object
Résultat System.Type

GetValue() public méthode

public GetValue ( JToken value, Type returnType ) : object
value JToken
returnType System.Type
Résultat object

HandleException() public méthode

public HandleException ( Exception exception ) : CompoundDocument
exception System.Exception
Résultat UtilJsonApiSerializer.Serialization.Documents.CompoundDocument

HandleHttpError() public méthode

public HandleHttpError ( HttpError error ) : CompoundDocument
error HttpError
Résultat UtilJsonApiSerializer.Serialization.Documents.CompoundDocument

UnifyObjectsToList() public méthode

public UnifyObjectsToList ( object nestedObject ) : List
nestedObject object
Résultat List

UnwrapResourceObject() public méthode

public UnwrapResourceObject ( object objectGraph ) : object
objectGraph object
Résultat object

VerifyTypeSupport() public méthode

public VerifyTypeSupport ( Type innerObjectType ) : void
innerObjectType System.Type
Résultat void