Beispiel #1
0
        public static SC.Interfaces.IRoot GetRoot(string Host, string Username, string Password)
        {
            string channelname = Host + ":" + Username;

            if (System.Runtime.Remoting.Channels.ChannelServices.GetChannel(channelname) == null)
            {
                System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider soapFormatter = new System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider();
                SC.Remoting.ClientEncryptionSinkProvider     encrProvider = new SC.Remoting.ClientEncryptionSinkProvider();
                SC.Remoting.ClientAuthenticationSinkProvider authProvider = new SC.Remoting.ClientAuthenticationSinkProvider(Username, Password);

                soapFormatter.Next = authProvider;
                authProvider.Next  = encrProvider;

                Dictionary <string, string> props = new Dictionary <string, string>();
                props["name"]     = channelname;
                props["priority"] = System.Threading.Interlocked.Increment(ref priority).ToString();

                System.Runtime.Remoting.Channels.Http.HttpClientChannel channel = new System.Runtime.Remoting.Channels.Http.HttpClientChannel(props, soapFormatter);
                System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel, false);
            }
            SC.Interfaces.IRoot root = System.Runtime.Remoting.RemotingServices.Connect(typeof(SC.Interfaces.IRoot), "http://" + Username + "@" + Host + "/ServerChecker4Root") as SC.Interfaces.IRoot;

            //SC.Interfaces.IRoot root = Activator.GetObject(typeof(SC.Interfaces.IRoot), "http://" + Host + "/ServerChecker4Root") as SC.Interfaces.IRoot;
            return(root);
        }
        public void SetProvider(SC.Interfaces.IStandaloneProvider provider)
        {
            if (secProvider != null || settProvider != null)
            {
                throw new InvalidOperationException("Cannot assign providers twice.");
            }

            this.secProvider  = provider.GetSecurityProvider();
            this.settProvider = provider.GetSettingsProvider();
            this.root         = provider.GetRoot();
        }
Beispiel #3
0
 public RootClickedEventArgs(SC.Interfaces.IRoot root) : base(root)
 {
 }
Beispiel #4
0
 public SecurityManagerClickedEventArgs(SC.Interfaces.IRoot root) : base(root)
 {
 }
Beispiel #5
0
 public StandalonePluginClickedEventArgs(SC.Interfaces.IRoot root, string pluginName) : base(root)
 {
     this.pluginName = pluginName;
 }
Beispiel #6
0
 public ServerPluginClickedEventArgs(SC.Interfaces.IRoot root, string serverName, string pluginName) : base(root)
 {
     this.serverName = serverName;
     this.pluginName = pluginName;
 }
Beispiel #7
0
 public ServerClickedEventArgs(SC.Interfaces.IRoot root, string serverName) : base(root)
 {
     this.serverName = serverName;
 }
 public StandaloneProvider(string name, SC.Interfaces.IRoot root)
     : base(name)
 {
     this.root = root;
 }
Beispiel #9
0
 public SCTreeNode(SC.Interfaces.IRoot root)
 {
     this.root = root;
 }
Beispiel #10
0
 public StandalonePluginTreeNode(SC.Interfaces.IRoot root, string pluginName)
     : base(root)
 {
     this.Text = pluginName;
 }
Beispiel #11
0
 public ServerPluginTreeNode(SC.Interfaces.IRoot root, string serverName, string pluginName)
     : base(root)
 {
     this.serverName = serverName;
     this.Text       = pluginName;
 }
Beispiel #12
0
 public ServerTreeNode(SC.Interfaces.IRoot root, string serverName)
     : base(root)
 {
     this.Text = serverName;
 }
Beispiel #13
0
 public SCTreeNode(SC.Interfaces.IRoot root)
 {
     this.root = root;
 }
        public void SetProvider(SC.Interfaces.IStandaloneProvider provider)
        {
            if (secProvider != null || settProvider != null)
                throw new InvalidOperationException("Cannot assign providers twice.");

            this.secProvider = provider.GetSecurityProvider();
            this.settProvider = provider.GetSettingsProvider();
            this.root = provider.GetRoot();
        }
 public StandaloneProvider(string name, SC.Interfaces.IRoot root)
     : base(name)
 {
     this.root = root;
 }
Beispiel #16
0
 public SecurityManagerTreeNode(SC.Interfaces.IRoot root)
     : base(root)
 {
     this.Text = "Security Manager";
 }
Beispiel #17
0
 protected SCBrowserEventArgs(SC.Interfaces.IRoot root)
 {
     this.root = root;
 }
Beispiel #18
0
 protected SCBrowserEventArgs(SC.Interfaces.IRoot root)
 {
     this.root = root;
 }
 public void RefreshConnection()
 {
     root = SC.Client.SCClientProvider.GetRoot(settings.Endpoint.ToString(), settings.Username, settings.Password);
 }
 public void RefreshConnection()
 {
     root = SC.Client.SCClientProvider.GetRoot(settings.Endpoint.ToString(), settings.Username, settings.Password);
 }