C# Class UtilJsonApiSerializer.Serialization.TransformationHelper

Mostrar archivo Open project: FrontlineEducation/Util-JsonApiSerializer Class Usage Examples

Public Methods

Method 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

Method 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 method

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

AssureAllMappingsRegistered() public method

public AssureAllMappingsRegistered ( Type type, Configuration config ) : void
type System.Type
config Configuration
return void

ChooseProperResourceRepresentation() public method

public ChooseProperResourceRepresentation ( object resource, IEnumerable representationList ) : IResourceRepresentation
resource object
representationList IEnumerable
return IResourceRepresentation

CreateIncludedRepresentations() public method

public CreateIncludedRepresentations ( List primaryResourceList, IResourceMapping resourceMapping, Context context ) : List
primaryResourceList List
resourceMapping IResourceMapping
context Context
return List

CreateRelationships() public method

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

CreateResourceRepresentation() public method

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
return UtilJsonApiSerializer.Serialization.Representations.Resources.SingleResource

GetCollection() public method

public GetCollection ( JToken value, IRelationshipMapping mapping ) : object
value JToken
mapping IRelationshipMapping
return object

GetMetadata() public method

public GetMetadata ( object objectGraph ) : object>.Dictionary
objectGraph object
return object>.Dictionary

GetObjectType() public method

public GetObjectType ( object objectGraph ) : Type
objectGraph object
return System.Type

GetValue() public method

public GetValue ( JToken value, Type returnType ) : object
value JToken
returnType System.Type
return object

HandleException() public method

public HandleException ( Exception exception ) : CompoundDocument
exception System.Exception
return UtilJsonApiSerializer.Serialization.Documents.CompoundDocument

HandleHttpError() public method

public HandleHttpError ( HttpError error ) : CompoundDocument
error HttpError
return UtilJsonApiSerializer.Serialization.Documents.CompoundDocument

UnifyObjectsToList() public method

public UnifyObjectsToList ( object nestedObject ) : List
nestedObject object
return List

UnwrapResourceObject() public method

public UnwrapResourceObject ( object objectGraph ) : object
objectGraph object
return object

VerifyTypeSupport() public method

public VerifyTypeSupport ( Type innerObjectType ) : void
innerObjectType System.Type
return void