Esempio n. 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);
        }
Esempio n. 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);
        }