Exemple #1
0
 /// <summary>
 /// Unregister a string variable value getter function.
 /// </summary>
 /// <param name="getter">the function to be unregistered</param>
 /// <returns>the function is successfully unregistered or not</returns>
 public bool UnregisterStringGetter(StringGetterDelegate getter)
 {
     if (getter == null)
     {
         return(false);
     }
     return(mVariableStringGetters.Remove(getter));
 }
Exemple #2
0
 /// <summary>
 /// Register string variable value getter function that is used to retrieve string values in string content.
 /// </summary>
 /// <param name="getter">the function to retrieve string values</param>
 /// <returns>the function is successfully registered or not</returns>
 public bool RegisterVariableGetter(StringGetterDelegate getter)
 {
     if (getter == null)
     {
         return(false);
     }
     if (mVariableStringGetters.Contains(getter))
     {
         return(false);
     }
     mVariableStringGetters.Add(getter);
     return(true);
 }