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); } } }
public T GetData() { return(BinaryFormatedData.GetData <T>(ref _indexOnBinaryDataWrapper)); }
public void SetData(T value) { BinaryFormatedData.SetData(_indexOnBinaryDataWrapper, value); InvokeOnValueChangedEvent(GetData()); }