コード例 #1
0
        public string Upload(byte[] fileContent)
        {
            string result = null;

            using (FileStreamingClient client = new FileStreamingClient())
            {
                ConfigureClient(client);
                try
                {
                    client.Open();
                    result = client.Upload(fileContent);
                    client.Close();
                }
                catch (Exception ex)
                {
                    client.Abort();
                    throw ex;
                }
            }
            return(result);
        }
コード例 #2
0
        public bool CheckConnection()
        {
            bool result = false;

            using (FileStreamingClient client = new FileStreamingClient())
            {
                ConfigureClient(client);
                try
                {
                    client.Open();
                    result = client.CheckConnection();
                    client.Close();
                }
                catch (Exception ex)
                {
                    client.Abort();
                    throw ex;
                }
            }
            return(result);
        }