Exemplo n.º 1
0
 /// <summary>
 ///     Sets the value.
 /// </summary>
 /// <typeparam name="T"> </typeparam>
 /// <param name="container"> The container. </param>
 /// <param name="property"> The property. </param>
 /// <param name="value"> The value. </param>
 public static void SetValue <T> (this IStateMetaContainer container, IStateMetaProperty property, T value)
 {
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     if (property == null)
     {
         throw new ArgumentNullException("property");
     }
     container.SetValue(property, value);
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Gets the value.
 /// </summary>
 /// <typeparam name="T"> </typeparam>
 /// <param name="container"> The container. </param>
 /// <param name="property"> The property. </param>
 /// <returns> </returns>
 public static T GetValue <T> (this IStateMetaContainer container, IStateMetaProperty property)
 {
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     if (property == null)
     {
         throw new ArgumentNullException("property");
     }
     return(( T )container.GetValue(property));
 }