Exemplo n.º 1
0
        public FakeBandClient(IBandInfo bandInfo)
        {
            this.bandInfo           = bandInfo;
            _bandVersion            = ((FakeBandInfo)bandInfo).Version;
            _container              = new Lazy <FakeTileContainer>(() => new FakeTileContainer());
            _sensorManager          = new Lazy <IBandSensorManager>(() => new FakeBandSensorManager(BandTypeConstants));
            _notificationManager    = new Lazy <IBandNotificationManager>(() => new FakeBandNotificationManager(this, Container));
            _personalizationManager = new Lazy <IBandPersonalizationManager>(() => new FakeBandPersonalizationManager());
            _tileManager            = new Lazy <IBandTileManager>(() =>
            {
                IBandConstants consts = null;
                if (_bandVersion == BandVersion.BandOne)
                {
                    consts = new FakeBandOneConstants();
                }
                else
                {
                    consts = new FakeBandTwoConstants();
                }

                return(new FakeBandTileManager(consts, this, Container));
            });
        }
Exemplo n.º 2
0
        public FakeBandClient(IBandInfo bandInfo)
        {
            this.bandInfo = bandInfo;
            _bandVersion = ((FakeBandInfo)bandInfo).Version;
            _container = new Lazy<FakeTileContainer>(() => new FakeTileContainer());
            _sensorManager = new Lazy<IBandSensorManager>(() => new FakeBandSensorManager(BandTypeConstants));
            _notificationManager = new Lazy<IBandNotificationManager>(() => new FakeBandNotificationManager(this, Container));
            _personalizationManager = new Lazy<IBandPersonalizationManager>(() => new FakeBandPersonalizationManager());
            _tileManager = new Lazy<IBandTileManager>(() =>
            {
                IBandConstants consts = null;
                if (_bandVersion == BandVersion.BandOne)
                {
                    consts = new FakeBandOneConstants();
                }
                else
                {
                    consts = new FakeBandTwoConstants();
                }

                return new FakeBandTileManager(consts, this, Container);
            });
        }