Пример #1
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();

        }
Пример #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();
 }
Пример #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);
        }
Пример #4
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;
 }
Пример #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;
 }