C# Class Halcyon.HAL.HALResponse

显示文件 Open project: visualeyes/halcyon Class Usage Examples

Public Methods

Method Description
AddEmbeddedCollection ( string name, IEnumerable objects ) : HALResponse
AddEmbeddedResource ( string name, HALResponse resource ) : HALResponse
AddLinks ( IEnumerable links ) : HALResponse
HALResponse ( IHALModelConfig config ) : System
HALResponse ( object model, IHALModelConfig config = null ) : System
HasLink ( string rel ) : bool
ToJObject ( JsonSerializer serializer ) : Newtonsoft.Json.Linq.JObject
ToPlainResponse ( JsonSerializer serializer, bool attachEmbedded = true ) : Newtonsoft.Json.Linq.JObject

Private Methods

Method Description
EmbeddedToJObject ( JObject>.Func converter ) : Newtonsoft.Json.Linq.JObject
GetBaseJObject ( JsonSerializer serializer ) : Newtonsoft.Json.Linq.JObject
GetResolvedLinks ( IEnumerable links, object>.IDictionary properties, string linkBase ) : object>.Dictionary

Method Details

AddEmbeddedCollection() public method

public AddEmbeddedCollection ( string name, IEnumerable objects ) : HALResponse
name string
objects IEnumerable
return HALResponse

AddEmbeddedResource() public method

public AddEmbeddedResource ( string name, HALResponse resource ) : HALResponse
name string
resource HALResponse
return HALResponse

AddLinks() public method

public AddLinks ( IEnumerable links ) : HALResponse
links IEnumerable
return HALResponse

HALResponse() public method

public HALResponse ( IHALModelConfig config ) : System
config IHALModelConfig
return System

HALResponse() public method

public HALResponse ( object model, IHALModelConfig config = null ) : System
model object
config IHALModelConfig
return System

HasLink() public method

public HasLink ( string rel ) : bool
rel string
return bool

ToJObject() public method

public ToJObject ( JsonSerializer serializer ) : Newtonsoft.Json.Linq.JObject
serializer Newtonsoft.Json.JsonSerializer
return Newtonsoft.Json.Linq.JObject

ToPlainResponse() public method

public ToPlainResponse ( JsonSerializer serializer, bool attachEmbedded = true ) : Newtonsoft.Json.Linq.JObject
serializer Newtonsoft.Json.JsonSerializer
attachEmbedded bool
return Newtonsoft.Json.Linq.JObject