예제 #1
0
        public BinaryData(string key, T value, Action <T> OnValueChanged = null)
        {
            _key             = key;
            _intializedValue = value;
            if (OnValueChanged != null)
            {
                OnValueChangedEvent += OnValueChanged;
            }

            if (!_listOfKeys.Contains(key))
            {
                BinaryFormatedData.RegisterInBinaryData(this);
            }
            else
            {
                if (AssigningDataType(value))
                {
                    BinaryFormatedData.RegisterInBinaryData(this);
                }
            }
        }
예제 #2
0
 public T GetData()
 {
     return(BinaryFormatedData.GetData <T>(ref _indexOnBinaryDataWrapper));
 }
예제 #3
0
 public void SetData(T value)
 {
     BinaryFormatedData.SetData(_indexOnBinaryDataWrapper, value);
     InvokeOnValueChangedEvent(GetData());
 }