/// <summary> /// Invoke PositionStatusChanged event on StatusBit changed. /// </summary> /// <param name="statusBit"></param> private void OnStatusBitChanged(PositionStatusBit statusBit) { PositionData.Status = (PositionData.Status & ~(1 << statusBit.StatusBitInfo.BitNumber)) | (Convert.ToInt64(statusBit.Value) << statusBit.StatusBitInfo.BitNumber); PositionStatusChanged?.Invoke(this, statusBit); }
/// <summary> /// Invoke PositionStatusChanged event on child StatusBit changed. /// </summary> /// <param name="node"></param> /// <param name="statusBit"></param> private void OnChildPositionStatusChanged(PositionNode node, PositionStatusBit statusBit) { PositionStatusChanged?.Invoke(node, statusBit); }