Animatroller.Framework.LogicalDevice.SingleOwnerDevice.GetFrameBuffer C# (CSharp) Method

GetFrameBuffer() public method

public GetFrameBuffer ( IControlToken token, IReceivesData device ) : IData
token IControlToken
device IReceivesData
return IData
        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);
        }