/// <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);
/// <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);
/// <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);
/// <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);
/// <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);
/// <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)); }
/// <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)); }
/// <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)); }