Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }