Пример #1
0
 /// <summary>
 /// Loads the state of this resource from a given Atom object.
 /// </summary>
 /// <param name="value">The Atom object to load.</param>
 /// <returns>The resource.</returns>
 public Resource Load(AtomObject value)
 {
     if (value == null)
     {
         this.title = "title";
     }
     else
     {
         this.actions = value.Links;
         this.title   = value.Title;
     }
     this.MaybeValid = true;
     return(this);
 }
Пример #2
0
        /// <summary>
        /// Loads the <see cref="Entity"/> with the <see cref="AtomObject"/>
        /// data.
        /// </summary>
        /// <param name="value">The <see cref="AtomObject"/>.</param>
        /// <returns>The filled <see cref="Entity"/>.</returns>
        public new Entity Load(AtomObject value)
        {
            base.Load(value);
            AtomEntry entry = (AtomEntry)value;

            if (entry == null)
            {
                this.content = new Record();
            }
            else
            {
                this.content = entry.Content;
            }
            return(this);
        }
Пример #3
0
 /// <summary>
 /// Loads the <see cref="Entity"/> with the <see cref="AtomObject"/> 
 /// data.
 /// </summary>
 /// <param name="value">The <see cref="AtomObject"/>.</param>
 /// <returns>The filled <see cref="Entity"/>.</returns>
 public new Entity Load(AtomObject value)
 {
     base.Load(value);
     AtomEntry entry = (AtomEntry)value;
     if (entry == null)
     {
         this.content = new Record();
     }
     else
     {
         this.content = entry.Content;
     }
     return this;
 }
Пример #4
0
 /// <summary>
 /// Loads the state of this resource from a given Atom object.
 /// </summary>
 /// <param name="value">The Atom object to load.</param>
 /// <returns>The resource.</returns>
 public Resource Load(AtomObject value)
 {
     if (value == null)
     {
         this.title = "title";
     }
     else
     {
         this.actions = value.Links;
         this.title = value.Title;
     }
     this.MaybeValid = true;
     return this;
 }