Beispiel #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);
Beispiel #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);
Beispiel #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);
Beispiel #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);
Beispiel #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);
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }