Esempio n. 1
0
        /// <summary>
        /// TODO make this thread safe
        /// </summary>
        public string[] ListServers()
        {
            // Only show Projects/Servers if Projects are shared.
            if (!RemotingServer.SharedProjectsGetter())
            {
                return(Enumerable.Empty <string>().ToArray());
            }

            if (m_allServers == null)
            {
                PopulateServerList();
                Debug.Assert(m_allServers != null);
            }

            return(m_allServers.ToArray());
        }
Esempio n. 2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Gets a value indicating whether projects are shared. (Should only be called on local
 /// machine.)
 /// </summary>
 /// <returns>
 /// true if project are being shared from this machine.
 /// </returns>
 /// <exception cref="SecurityException">If called from a remote machine.</exception>
 /// ------------------------------------------------------------------------------------
 public bool AreProjectShared()
 {
     EnsureClientIsLocalHost();
     return(RemotingServer.SharedProjectsGetter());
 }