Example #1
0
 /// <summary>
 /// Clears all key/value pairs from this Quickboard that correspond to the type
 /// argument.
 /// </summary>
 public static void Clear <T>(this Quickboard.IQuickboardContext context)
 {
     context.QB().ForType <T>().Instance_Clear();
 }
Example #2
0
 /// <summary>
 /// Clears all keys for object reference values from this Quickboard.
 /// </summary>
 public static void ClearObjs(this Quickboard.IQuickboardContext context)
 {
     context.QB().Instance_ClearObjs();
 }
Example #3
0
 /// <summary>
 /// Returns whether this Quickboard context has a string value at the specified key.
 ///
 /// If there is no value at the specified key, Get methods return the default value.
 /// </summary>
 public static bool HasStr(this Quickboard.IQuickboardContext context,
                           string key)
 {
     return(context.QB().Instance_HasStr(key));
 }
Example #4
0
 /// <summary>
 /// Removes the object reference value at the specified key from this Quickboard.
 ///
 /// Returns false if there was no value at the specified key.
 /// </summary>
 public static bool RemoveObj(this Quickboard.IQuickboardContext context,
                              string key)
 {
     return(context.QB().Instance_RemoveObj(key));
 }
Example #5
0
 /// <summary>
 /// Gets the last object reference value that was Set using the specified key.
 ///
 /// If no key has been set, the value will be the default value. Use "Has" methods to
 /// check if a key has ever been added to a Quickboard.
 /// </summary>
 public static object GetObj(this Quickboard.IQuickboardContext context,
                             string key)
 {
     return(context.QB().Instance_GetObj(key));
 }
Example #6
0
 /// <summary>
 /// Returns whether this Quickboard context has a value at the specified key and the
 /// provided type argument.
 ///
 /// If there is no value at the specified key/type combination, Get methods return
 /// the default value for the type argument.
 /// </summary>
 public static bool Has <T>(this Quickboard.IQuickboardContext context,
                            string key)
 {
     return(context.QB().ForType <T>().Instance_Has(key));
 }
Example #7
0
 /// <summary>
 /// Gets the last float value that was Set using the specified key.
 ///
 /// If no key has been set, the value will be the default value. Use "Has" methods to
 /// check if a key has ever been added to a Quickboard.
 /// </summary>
 public static float GetFloat(this Quickboard.IQuickboardContext context,
                              string key)
 {
     return(context.QB().Instance_GetFloat(key));
 }
Example #8
0
 /// <summary>
 /// Gets the last value that was Set using the specified key. The value must have
 /// been Set with the same type argument used for this Get.
 ///
 /// If no key has been set, the value will be the default value. Use "Has" methods to
 /// check if a key has ever been added to a Quickboard.
 /// </summary>
 public static T Get <T>(this Quickboard.IQuickboardContext context,
                         string key)
 {
     return(context.QB().ForType <T>().Instance_Get(key));
 }
Example #9
0
 /// <summary>
 /// Sets a named object reference value on this Quickboard context.
 /// </summary>
 public static void Set(this Quickboard.IQuickboardContext context,
                        string key, object value)
 {
     context.QB().Instance_SetObj(key, value);
 }
Example #10
0
 /// <summary>
 /// Sets a named float value on this Quickboard context.
 /// </summary>
 public static void Set(this Quickboard.IQuickboardContext context,
                        string key, float value)
 {
     context.QB().Instance_SetFloat(key, value);
 }
Example #11
0
 /// <summary>
 /// Sets a named value on this Quickboard context. The same name can be used with
 /// different type arguments without any name collision.
 /// </summary>
 public static void Set <T>(this Quickboard.IQuickboardContext context,
                            string key, T value)
 {
     context.QB().ForType <T>().Instance_Set(key, value);
 }