Ejemplo n.º 1
0
        public void Init(DeviceStateActor context, string deviceId, DeviceModel deviceModel)
        {
            this.instance.InitOnce();

            this.deviceId         = deviceId;
            this.deviceModel      = deviceModel;
            this.deviceStateActor = context;

            this.instance.InitComplete();
        }
Ejemplo n.º 2
0
        public void Setup(DeviceStateActor context, string deviceId, DeviceModel deviceModel)
        {
            if (this.setupDone)
            {
                this.log.Error("SetupAsync has already been invoked, are you sharing this instance with multiple devices?",
                               () => new { this.deviceId });
                throw new DeviceActorAlreadyInitializedException();
            }

            this.setupDone   = true;
            this.deviceId    = deviceId;
            this.deviceModel = deviceModel;
            this.context     = context;
        }