Ejemplo n.º 1
0
 /// <summary>
 /// Gets a property.
 /// </summary>
 /// <typeparam name="T">The type of the property.
 /// </typeparam>
 /// <param name="api">An API.</param>
 /// <param name="name">The name of a property. </param>
 /// <returns>
 /// The value of the property.
 /// </returns>
 public static T GetProperty <T>(this ApiBase api, string name) => api.GetPropertyBag().GetProperty <T>(name);
Ejemplo n.º 2
0
 /// <summary>
 /// Removes a property.
 /// </summary>
 /// <param name="api">An API. </param>
 /// <param name="name">The name of a property.</param>
 public static void RemoveProperty(this ApiBase api, string name) => api.GetPropertyBag().RemoveProperty(name);
Ejemplo n.º 3
0
 /// <summary>
 /// Indicates if this object has a property.
 /// </summary>
 /// <param name="api">An API.</param>
 /// <param name="name"> The name of a property.</param>
 /// <returns>
 /// <c>true</c> if this object has the property; otherwise, <c>false</c>.
 /// </returns>
 public static bool HasProperty(this ApiBase api, string name) => api.GetPropertyBag().HasProperty(name);
Ejemplo n.º 4
0
 /// <summary>
 /// Sets a property.
 /// </summary>
 /// <param name="api">An API.</param>
 /// <param name="name">The name of a property.</param>
 /// <param name="value">A value for the property.</param>
 public static void SetProperty(this ApiBase api, string name, object value) => api.GetPropertyBag().SetProperty(name, value);
Ejemplo n.º 5
0
 /// <summary>
 /// Gets a property.
 /// </summary>
 /// <param name="api">An API.</param>
 /// <param name="name">The name of a property.</param>
 /// <returns>
 /// The value of the property.
 /// </returns>
 public static object GetProperty(this ApiBase api, string name) => api.GetPropertyBag().GetProperty(name);
Ejemplo n.º 6
0
 /// <summary>
 /// Indicates if this object has a property.
 /// </summary>
 /// <param name="api">
 /// An API.
 /// </param>
 /// <param name="name">
 /// The name of a property.
 /// </param>
 /// <returns>
 /// <c>true</c> if this object has the
 /// property; otherwise, <c>false</c>.
 /// </returns>
 public static bool HasProperty(this ApiBase api, string name)
 {
     return(api.GetPropertyBag().HasProperty(name));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets a property.
 /// </summary>
 /// <param name="api">
 /// An API.
 /// </param>
 /// <param name="name">
 /// The name of a property.
 /// </param>
 /// <returns>
 /// The value of the property.
 /// </returns>
 public static object GetProperty(this ApiBase api, string name)
 {
     return(api.GetPropertyBag().GetProperty(name));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Gets a property.
 /// </summary>
 /// <typeparam name="T">
 /// The type of the property.
 /// </typeparam>
 /// <param name="api">
 /// An API.
 /// </param>
 /// <param name="name">
 /// The name of a property.
 /// </param>
 /// <returns>
 /// The value of the property.
 /// </returns>
 public static T GetProperty <T>(this ApiBase api, string name)
 {
     return(api.GetPropertyBag().GetProperty <T>(name));
 }