示例#1
0
        public void VerifyCRootExists_ClientApi_LocalInstance()
        {
            var client = new FileSystemQuery();

            var result = client.DoesDirectoryExist(@"c:");

            Xunit.Assert.True(result);
        }
示例#2
0
        public void VerifyBogusPathNotExist_ClientApi_LocalInstance()
        {
            var client = new FileSystemQuery();

            var result = client.DoesDirectoryExist("slkdjfslkdflsdfjlsdkjf");

            Xunit.Assert.False(result);
        }
示例#3
0
        public void VerifyCRootExists_ClientApi_SignalrRelay()
        {
            var client = new FileSystemQuery(typeof(SignalrRelayProxy <FileSystemQueryRequest, FileSystemQueryResponse>));

            var result = client.DoesDirectoryExist(@"c:");

            Xunit.Assert.True(result);
        }
示例#4
0
        public void VerifyBogusPathNotExist_ClientApi_SignalrRelay()
        {
            var client = new FileSystemQuery(typeof(SignalrRelayProxy <FileSystemQueryRequest, FileSystemQueryResponse>));

            var result = client.DoesDirectoryExist("slkdjfslkdflsdfjlsdkjf");

            Xunit.Assert.False(result);
        }
示例#5
0
        private async void PressMeButton_Clicked(object sender, EventArgs e)
        {
            var button = (Button)sender;

            button.Text = "Init";
            //Task.Run(() =>
            //{
            HubConnection _hub = null;

            //try
            //{
            //    //button.Text = "Building...";
            //    //Task.Delay(1500).Wait();
            //    _hub = new HubConnectionBuilder()
            //        .WithUrl("http://*****:*****@"c:\";
                var fsq        = new FileSystemQuery(typeof(SignalrRelayProxy <FileSystemQueryRequest, FileSystemQueryResponse>));
                //var fsq = new FileSystemQuery(typeof(NamedPipeRelayProxy<FileSystemQueryRequest, FileSystemQueryResponse>));
                var result = fsq.DoesDirectoryExist(folderPath);
                button.Text = $"Does folder [{folderPath}] exist? [{result}].";
            }
            catch (Exception ex)
            {
                var txt = ex.Message;
                if (ex.InnerException != null)
                {
                    txt += Environment.NewLine + ex.InnerException.Message;
                }
                button.Text = txt;
            }
            finally
            {
            }

            //}).Wait();
        }