Пример #1
0
 public virtual void Store <T>(string fieldName, T value)
 {
     InfosetHelper.Store(this, fieldName, value);
 }
Пример #2
0
 /// <summary>
 /// Sets an attribute value. This is chainable.
 /// </summary>
 /// <typeparam name="T">The type of the value.</typeparam>
 /// <param name="el">The element.</param>
 /// <param name="name">The attribute name.</param>
 /// <param name="value">The value to set.</param>
 /// <returns>Itself</returns>
 public static XElement Attr <T>(this XElement el, string name, T value)
 {
     el.SetAttributeValue(name, InfosetHelper.ThrowIfContainsInvalidXmlCharacter(ToString(value)));
     return(el);
 }
Пример #3
0
 public T Retrieve <T>(string fieldName)
 {
     return(InfosetHelper.Retrieve <T>(this, fieldName));
 }
Пример #4
0
 /// <summary>
 /// Sets the value of an element.
 /// </summary>
 /// <typeparam name="TValue">The type of the value to set.</typeparam>
 /// <param name="el">The element.</param>
 /// <param name="value">The value.</param>
 /// <returns>The element.</returns>
 public static XElement Val <TValue>(this XElement el, TValue value)
 {
     el.SetValue(InfosetHelper.ThrowIfContainsInvalidXmlCharacter(ToString(value)));
     return(el);
 }