Пример #1
0
 public DeviceStatusViewModel(BatteryViewModel battery, ThreeAxisViewModel gyroAngle, ThreeAxisViewModel gyroRate, ThreeAxisViewModel accelerometer, OrientationViewModel orientation, PortStorage portStorage)
 {
     this.battery       = battery;
     this.gyroAngle     = gyroAngle;
     this.gyroRate      = gyroRate;
     this.accelerometer = accelerometer;
     this.orientation   = orientation;
     this.portStorage   = portStorage;
 }
Пример #2
0
        public void PortStorage_ReadWriteComponentType_HasReadWriteFlag([Values(typeof(Scalar), typeof(SystemScalar), typeof(Buffer), typeof(SystemBuffer))] Type ecsType)
        {
            var component = new ComponentType(ecsType);
            var storage   = new PortStorage(component);
            var restoredReadOnlyComponent = storage.ReadWriteComponentType;

            Assert.AreEqual(restoredReadOnlyComponent.AccessModeType, ComponentType.AccessMode.ReadWrite);
            Assert.AreEqual(restoredReadOnlyComponent.TypeIndex, component.TypeIndex);
        }