Beispiel #1
0
        public RemoteFileAccessToken(Guid tokenId, ISServerSocket host)
        {
            TokenId    = tokenId;
            HostClient = host;

            host.ConnectionError += (object o, string e) => { TokenClosed?.Invoke(this, tokenId); };
        }
        public void CloseAllStreams()
        {
            foreach (var stream in openFileStreams)
            {
                stream.Value.Dispose();
            }

            openFileStreams.Clear();
            readTimeoutTimer?.Dispose();
            timeoutStopwatch?.Stop();
            TokenClosed?.Invoke(this, TokenId);
        }