Ejemplo n.º 1
0
        /// <summary>
        /// Property keys are often reused. For example, in y-prosemirror the key 'bold'
        /// might occur very often. For a 3D application, the key 'position' might occur often.
        /// <br/>
        /// We can these keys in a map and refer to them via a unique number.
        /// </summary>
        public void WriteKey(string key)
        {
            _keyClockEncoder.Write(_keyClock++);

            if (!_keyMap.ContainsKey(key))
            {
                _stringEncoder.Write(key);
            }
        }
Ejemplo n.º 2
0
 public void WriteRightId(ID id)
 {
     _clientEncoder.Write((uint)id.Client);
     _rightClockEncoder.Write(id.Clock);
 }
Ejemplo n.º 3
0
 public void WriteLeftId(ID id)
 {
     _clientEncoder.Write((uint)id.Client);
     _leftClockEncoder.Write(id.Clock);
 }