public void PushOutput(IControlToken token)
        {
            if (token == null)
            {
                // Attempt to get from call context
                token = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("TOKEN") as IControlToken;

                if (token is GroupControlToken groupToken)
                {
                    if (!groupToken.LockAndGetDataFromDevice(this))
                    {
                        token = null;
                    }
                }
            }

            IData data;

            if (token == null)
            {
                data = GetOwnerlessData();
            }
            else
            {
                data = token.GetDataForDevice(this);
            }

            if (data != null)
            {
                this.outputData.OnNext(data, token);
            }
        }
        public IPushDataController GetDataObserver(IControlToken token)
        {
            if (token == null)
            {
                throw new ArgumentNullException("token");
            }

            return(new ControlledObserverData(token, this.outputData, token.GetDataForDevice(this)));
        }
        public IData GetFrameBuffer(IControlToken token, IReceivesData device)
        {
            if (token == null)
            {
                // Attempt to get from call context
                token = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("TOKEN") as IControlToken;

                if (token is GroupControlToken groupToken)
                {
                    if (!groupToken.LockAndGetDataFromDevice(this))
                    {
                        token = null;
                    }
                }
            }

            if (token == null)
            {
                return(GetOwnerlessData());
            }

            return(token.GetDataForDevice(device));
        }
Esempio n. 4
0
        public void PushOutput(IControlToken token)
        {
            if (token == null)
            {
                // Attempt to get from call context
                token = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("TOKEN") as IControlToken;

                var groupToken = token as GroupControlToken;
                if (groupToken != null)
                {
                    if (!groupToken.LockAndGetDataFromDevice(this))
                        token = null;
                }
            }

            IData data;

            if (token == null)
                data = GetOwnerlessData();
            else
                data = token.GetDataForDevice(this);

            if (data != null)
                this.outputData.OnNext(data, token);
        }
Esempio n. 5
0
        public IData GetFrameBuffer(IControlToken token, IReceivesData device)
        {
            if (token == null)
            {
                // Attempt to get from call context
                token = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("TOKEN") as IControlToken;

                var groupToken = token as GroupControlToken;
                if (groupToken != null)
                {
                    if (!groupToken.LockAndGetDataFromDevice(this))
                        token = null;
                }
            }

            if (token == null)
                return GetOwnerlessData();

            return token.GetDataForDevice(device);
        }
Esempio n. 6
0
        public IPushDataController GetDataObserver(IControlToken token)
        {
            if (token == null)
                throw new ArgumentNullException("token");

            return new ControlledObserverData(token, this.outputData, token.GetDataForDevice(this));
        }