예제 #1
0
        public bool SetUserFilesLocalFolderLocation(string path)
        {
            bool bOk = false;

            try
            {
                m_mutexHostControllerEndpoints.WaitOne();
                foreach (EndpointAddress ep in m_hostControllerEndpoints)
                {
                    BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
                    JBCHostControllerServiceClient serviceClient = new JBCHostControllerServiceClient(binding, ep);

                    serviceClient.Open();
                    bOk = serviceClient.SetUserFilesLocalFolderLocation(path);
                    serviceClient.Close();
                }
            }
            catch (Exception ex)
            {
                LoggerModule.logger.Error(System.Reflection.MethodInfo.GetCurrentMethod().Name + ". Error: " + ex.Message);
            }
            finally
            {
                m_mutexHostControllerEndpoints.ReleaseMutex();
            }

            return(bOk);
        }