public HalResponseBuilder() { _linkObjects = new JObject(); _embeddedObjects = new JArray(); halLinkBuilder = new HalLinksBuilder(_linkObjects); halEmbeddedBuilder = new HalEmbeddedBuilder(_embeddedObjects); }
public HalEmbeddedBuilder AddObject(JObject jObj, Action <HalLinksBuilder> callback) { if (callback == null) { throw new ArgumentNullException(nameof(callback)); } var result = AddObject(jObj); var linksObj = new JObject(); var builder = new HalLinksBuilder(linksObj); callback(builder); jObj.Add(Constants.DtoNames.HalResponse.Links, linksObj); return(this); }