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(); }
public RootClickedEventArgs(SC.Interfaces.IRoot root) : base(root) { }
public SecurityManagerClickedEventArgs(SC.Interfaces.IRoot root) : base(root) { }
public StandalonePluginClickedEventArgs(SC.Interfaces.IRoot root, string pluginName) : base(root) { this.pluginName = pluginName; }
public ServerPluginClickedEventArgs(SC.Interfaces.IRoot root, string serverName, string pluginName) : base(root) { this.serverName = serverName; this.pluginName = pluginName; }
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; }
public SCTreeNode(SC.Interfaces.IRoot root) { this.root = root; }
public StandalonePluginTreeNode(SC.Interfaces.IRoot root, string pluginName) : base(root) { this.Text = pluginName; }
public ServerPluginTreeNode(SC.Interfaces.IRoot root, string serverName, string pluginName) : base(root) { this.serverName = serverName; this.Text = pluginName; }
public ServerTreeNode(SC.Interfaces.IRoot root, string serverName) : base(root) { this.Text = serverName; }
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 SecurityManagerTreeNode(SC.Interfaces.IRoot root) : base(root) { this.Text = "Security Manager"; }
protected SCBrowserEventArgs(SC.Interfaces.IRoot root) { this.root = root; }
public void RefreshConnection() { root = SC.Client.SCClientProvider.GetRoot(settings.Endpoint.ToString(), settings.Username, settings.Password); }