protected ObservableScriptableObject()
 {
     _bindingMessage = new ObservableMessage {
         Sender = this
     };
     _binder = new ModelBinder(this);
 }
Exemple #2
0
 void _bindableInstance_OnBindingUpdate(ObservableMessage obj)
 {
     if (_onBindingEvent != null)
     {
         _onBindingEvent(obj);
     }
 }
 /// <summary>
 /// Virtual, Initializes Binder
 /// </summary>
 protected virtual void Awake()
 {
     if (_bindingMessage == null)
     {
         _bindingMessage = new ObservableMessage {
             Sender = this
         }
     }
     ;
     if (_binder == null)
     {
         _binder = new ModelBinder(this);
     }
 }
Exemple #4
0
        public void Dispose()
        {
            _bindingMessage.Dispose();

            if (_bindableInstance != null)
            {
                _bindableInstance.OnBindingUpdate -= _bindableInstance_OnBindingUpdate;
            }

            _myType           = null;
            _instance         = null;
            _insanceBehaviour = null;
            _bindableInstance = null;
            _bindingMessage   = null;
        }
        public virtual void Dispose()
        {
            if (_binder != null)
            {
                _binder.Dispose();
            }

            if (_bindingMessage != null)
            {
                _bindingMessage.Dispose();
            }

            _bindingMessage = null;
            _binder         = null;
        }
        public void Dispose()
        {
            _bindingMessage.Dispose();

            if (_bindableInstance != null)
            {
                _bindableInstance.OnBindingUpdate -= _bindableInstance_OnBindingUpdate;
            }
            if (_notifyInstance != null)
            {
                _notifyInstance.PropertyChanged -= _notifyInstance_PropertyChanged;
            }
            _myType           = null;
            _instance         = null;
            _insanceBehaviour = null;
            _bindableInstance = null;
            _bindingMessage   = null;
            _notifyInstance   = null;
        }
        public void RaiseBindingUpdate(string memberName, object paramater)
        {
            if (_bindingMessage == null)
            {
                _bindingMessage = new ObservableMessage {
                    Sender = this
                }
            }
            ;

            Binder.RaiseBindingUpdate(memberName, paramater);

            if (_onBindingEvent != null)
            {
                _bindingMessage.Name  = memberName;
                _bindingMessage.Value = paramater;
                _onBindingEvent(_bindingMessage);
            }
        }