コード例 #1
0
        /// <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();
        }
コード例 #2
0
 /// <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();
 }
コード例 #3
0
 /// <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();
 }