/// <summary> /// Adds top-level objects that are only added to a document in the case of server-side serialization. /// </summary> private void AddTopLevelObjects(Document document) { if (_options.IncludeJsonApiVersion) { document.JsonApi = new JsonApiObject { Version = "1.1" }; } document.Links = _linkBuilder.GetTopLevelLinks(); document.Meta = _metaBuilder.Build(); document.Included = _includedBuilder.Build(); }
/// <summary> /// Adds top-level objects that are only added to a document in the case /// of server-side serialization. /// </summary> private void AddTopLevelObjects(Document document) { document.Links = _linkBuilder.GetTopLevelLinks(); document.Meta = _metaBuilder.GetMeta(); document.Included = _includedBuilder.Build(); }
/// <summary> /// Adds top-level objects that are only added to a document in the case /// of server-side serialization. /// </summary> private void AddTopLevelObjects(Document document) { document.Links = _linkBuilder.GetTopLevelLinks(_provider.GetResourceContext <TResource>()); document.Meta = _metaBuilder.GetMeta(); document.Included = _includedBuilder.Build(); }