/// <summary>
        /// Creates an instance of <see cref="HalEmbeddedResource"/>.
        /// </summary>
        /// <param name="embeddedResourceBuilder">An object that builds embedded resources.</param>
        public HalEmbeddedResource(IHalEmbeddedResourceBuilder embeddedResourceBuilder) {
            if (embeddedResourceBuilder == null) {
                throw new ArgumentNullException("embeddedResourceBuilder");
            }
            _document = embeddedResourceBuilder.Build();

        }
Beispiel #2
0
 /// <summary>
 /// Creates an instance of <see cref="HalEmbeddedResource"/>.
 /// </summary>
 /// <param name="embeddedResourceBuilder">An object that builds embedded resources.</param>
 public HalEmbeddedResource(IHalEmbeddedResourceBuilder embeddedResourceBuilder)
 {
     if (embeddedResourceBuilder == null)
     {
         throw new ArgumentNullException("embeddedResourceBuilder");
     }
     _document = embeddedResourceBuilder.Build();
 }
Beispiel #3
0
        /// <summary>
        /// Builds a <see cref="HalDocument"/> based on the operations executed on this builder.
        /// </summary>
        /// <returns>A <see cref="HalDocument"/>.</returns>
        public HalDocument Build()
        {
            HalDocument result;

            if (_embeddedResourceCollection.Count > 0)
            {
                result = new HalDocument(_resource, _linkCollection, _embeddedResourceCollection);
            }
            else
            {
                result = new HalDocument(_resource, _linkCollection);
            }
            return(result);
        }
 /// <summary>
 /// Builds a <see cref="HalDocument"/> based on the operations executed on this builder.
 /// </summary>
 /// <returns>A <see cref="HalDocument"/>.</returns>
 public HalDocument Build()
 {
     HalDocument result;
     if (_embeddedResourceCollection.Count > 0)
     {
         result = new HalDocument(_resource, _linkCollection, _embeddedResourceCollection);
     }
     else
     {
         result = new HalDocument(_resource, _linkCollection);
     }
     return result;
 }
Beispiel #5
0
        /// <summary>
        /// Builds a <see cref="HalDocument"/> based on the operations executed on this builder.
        /// </summary>
        /// <returns>A <see cref="HalDocument"/>.</returns>
        public HalDocument Build()
        {
            var result = new HalDocument(_resource, _linkCollection);

            return(result);
        }
 /// <summary>
 /// Builds a <see cref="HalDocument"/> based on the operations executed on this builder.
 /// </summary>
 /// <returns>A <see cref="HalDocument"/>.</returns>
 public HalDocument Build() {
     var result = new HalDocument(_resource, _linkCollection);
     
     return result;
 }