コード例 #1
0
        /// <summary>
        /// Convenience function: Add a HypermediaObject to the Links Dictionary.
        /// If a related entity with the same relations is present it is replaced.
        /// </summary>
        /// <param name="relations">The relations to use</param>
        /// <param name="reference">To be added.</param>
        public void Add(IReadOnlyCollection <string> relations, HypermediaObject reference)
        {
            var relatedEntity = new RelatedEntity(relations, new HypermediaObjectReference(reference));

            Add(relatedEntity);
        }
コード例 #2
0
        /// <summary>
        /// Convenience function: Add a HypermediaObject to the Links Dictionary.
        /// If a related entity with the same relation is present it is replaced.
        /// </summary>
        /// <param name="relation">The relations to use</param>
        /// <param name="reference">To be added.</param>
        public void Add(string relation, HypermediaObject reference)
        {
            var relatedEntity = new RelatedEntity(relation, new HypermediaObjectReference(reference));

            Add(relatedEntity);
        }