Ejemplo n.º 1
0
 public void SetChangeEvent(RES_FUNCEFT_TYPE key, ValueChangeDelegate func)
 {
     if (this.mActorValue[key] != null)
     {
         this.mActorValue[key].ChangeEvent += func;
         func();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Virtex.Lib.Vrtc.vxVar"/> class.
        /// </summary>
        /// <param name="name">Name.</param>
        /// <param name="value">Value.</param>
        /// <param name="description">Description.</param>
        /// <param name="function">Function delegate to fire when the value is changed.</param>
        public vxVar(object name, object value, string description, ValueChangeDelegate function)
        {
            this._name = name;

            this._value = value;
            this._type  = _value.GetType();

            this._description = description;

            ChangeFunction = function;
        }
Ejemplo n.º 3
0
 public GenericObserver(ValueChangeDelegate handler)
 {
     this.handler = handler;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Caller can register a callback function for a given key if its value or list of values changes in
 /// the database.
 /// </summary>
 public void RegisterConfigChangeHandler(string configKeyName, ValueChangeDelegate fn)
 {
     _handlers.Add(configKeyName, fn);
     MakeSureConfigChangeWatcherIsRunning();
 }