public GetConfig ( object model ) : IHALModelConfig | ||
model | object | |
리턴 | IHALModelConfig |
public HALResponse Convert(object model) { if (!this.CanConvert(model?.GetType())) { throw new InvalidOperationException(); } var resolver = new HALAttributeResolver(); var halConfig = resolver.GetConfig(model); var response = new HALResponse(model, halConfig); resolver.AddEmbeddedResources(response, model, halConfig); return(response); }
public HALResponse Convert(object model) { if(!this.CanConvert(model?.GetType())) { throw new InvalidOperationException(); } var resolver = new HALAttributeResolver(); var halConfig = resolver.GetConfig(model); var response = new HALResponse(model, halConfig); response.AddLinks(resolver.GetLinks(model)); response.AddEmbeddedCollections(resolver.GetEmbeddedCollections(model, halConfig)); return response; }