Showing the changes to Source/Libraries/GSF.ServiceProcess (1 of 6 files). Show all
Unified · Split
| @@ -89,16 +89,6 @@ · 88 unmodified lines | ||
| 89 | 89 | // |
| 90 | 90 | //****************************************************************************************************** |
| 91 | 91 | |
| 92 | −using GSF.Collections; | |
| 93 | −using GSF.Communication; | |
| 94 | −using GSF.Configuration; | |
| 95 | −using GSF.Diagnostics; | |
| 96 | −using GSF.ErrorManagement; | |
| 97 | −using GSF.IO; | |
| 98 | −using GSF.Reflection; | |
| 99 | −using GSF.Scheduling; | |
| 100 | −using GSF.Security; | |
| 101 | −using GSF.Security.Cryptography; | |
| 102 | 92 | using System; |
| 103 | 93 | using System.Collections.Generic; |
| 104 | 94 | using System.ComponentModel; |
| @@ -112,6 +102,16 @@ using System.Security.Principal; · 7 unmodified lines | ||
| 112 | 102 | using System.ServiceProcess; |
| 113 | 103 | using System.Text; |
| 114 | 104 | using System.Threading; |
| 105 | +using GSF.Collections; | |
| 106 | +using GSF.Communication; | |
| 107 | +using GSF.Configuration; | |
| 108 | +using GSF.Diagnostics; | |
| 109 | +using GSF.ErrorManagement; | |
| 110 | +using GSF.IO; | |
| 111 | +using GSF.Reflection; | |
| 112 | +using GSF.Scheduling; | |
| 113 | +using GSF.Security; | |
| 114 | +using GSF.Security.Cryptography; | |
| 115 | 115 | |
| 116 | 116 | namespace GSF.ServiceProcess |
| 117 | 117 | { |
| @@ -1572,7 +1572,7 @@ namespace GSF.ServiceProcess · 1454 unmodified lines | ||
| 1572 | 1572 | { |
| 1573 | 1573 | lock (m_processes) |
| 1574 | 1574 | { |
| 1575 | − return m_processes.Find(process => string.Compare(process.Name, processName, true) == 0); | |
| 1575 | + return m_processes.Find(process => string.Compare(process.Name, processName, StringComparison.OrdinalIgnoreCase) == 0); | |
| 1576 | 1576 | } |
| 1577 | 1577 | } |
| 1578 | 1578 | |
| @@ -1598,7 +1598,7 @@ namespace GSF.ServiceProcess · 19 unmodified lines | ||
| 1598 | 1598 | { |
| 1599 | 1599 | lock (m_clientRequestHandlers) |
| 1600 | 1600 | { |
| 1601 | − return m_clientRequestHandlers.Find(handler => string.Compare(handler.Command, handlerCommand, true) == 0); | |
| 1601 | + return m_clientRequestHandlers.Find(handler => string.Compare(handler.Command, handlerCommand, StringComparison.OrdinalIgnoreCase) == 0); | |
| 1602 | 1602 | } |
| 1603 | 1603 | } |
| 1604 | 1604 | |
| @@ -1829,14 +1829,14 @@ namespace GSF.ServiceProcess · 224 unmodified lines | ||
| 1829 | 1829 | SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty); |
| 1830 | 1830 | |
| 1831 | 1831 | // Initialize security provider for the remote client's user from specified credentials. |
| 1832 | − if (!Thread.CurrentPrincipal.Identity.IsAuthenticated && | |
| 1833 | − !string.IsNullOrEmpty(client.ClientUserCredentials)) | |
| 1832 | + if (!Thread.CurrentPrincipal.Identity.IsAuthenticated && !string.IsNullOrEmpty(client.ClientUserCredentials)) | |
| 1834 | 1833 | { |
| 1835 | 1834 | string[] credentialParts = client.ClientUserCredentials.Split(':'); |
| 1835 | + | |
| 1836 | 1836 | if (credentialParts.Length == 2) |
| 1837 | 1837 | { |
| 1838 | 1838 | ISecurityProvider provider = SecurityProviderUtility.CreateProvider(credentialParts[0]); |
| 1839 | − provider.Initialize(); | |
| 1839 | + | |
| 1840 | 1840 | if (provider.Authenticate(credentialParts[1])) |
| 1841 | 1841 | SecurityProviderCache.CurrentProvider = provider; |
| 1842 | 1842 | } |
| @@ -2892,7 +2892,7 @@ namespace GSF.ServiceProcess · 1049 unmodified lines | ||
| 2892 | 2892 | { |
| 2893 | 2893 | typedComponent = component as IPersistSettings; |
| 2894 | 2894 | |
| 2895 | − if ((object)typedComponent == null || string.Compare(categoryName, typedComponent.SettingsCategory, true) != 0) | |
| 2895 | + if ((object)typedComponent == null || string.Compare(categoryName, typedComponent.SettingsCategory, StringComparison.OrdinalIgnoreCase) != 0) | |
| 2896 | 2896 | continue; |
| 2897 | 2897 | |
| 2898 | 2898 | typedComponent.LoadSettings(); |
| @@ -2962,7 +2962,7 @@ namespace GSF.ServiceProcess · 63 unmodified lines | ||
| 2962 | 2962 | { |
| 2963 | 2963 | typedComponent = component as IPersistSettings; |
| 2964 | 2964 | |
| 2965 | − if ((object)typedComponent == null || string.Compare(categoryName, typedComponent.SettingsCategory, true) != 0) | |
| 2965 | + if ((object)typedComponent == null || string.Compare(categoryName, typedComponent.SettingsCategory, StringComparison.OrdinalIgnoreCase) != 0) | |
| 2966 | 2966 | continue; |
| 2967 | 2967 | |
| 2968 | 2968 | ConfigurationFile config = ConfigurationFile.Current; |
| @@ -3210,7 +3210,7 @@ namespace GSF.ServiceProcess · 241 unmodified lines | ||
| 3210 | 3210 | // Abort system process. |
| 3211 | 3211 | Process processToAbort = null; |
| 3212 | 3212 | |
| 3213 | − if (string.Compare(processName, "Me", true) == 0) | |
| 3213 | + if (string.Compare(processName, "Me", StringComparison.OrdinalIgnoreCase) == 0) | |
| 3214 | 3214 | processName = Process.GetCurrentProcess().ProcessName; |
| 3215 | 3215 | |
| 3216 | 3216 | foreach (Process process in Process.GetProcessesByName(processName)) |
| @@ -3707,7 +3707,7 @@ namespace GSF.ServiceProcess · 490 unmodified lines | ||
| 3707 | 3707 | UpdateStatus(requestinfo.Sender.ClientID, UpdateType.Alarm, "Failed to establish remote command session - Password is invalid.\r\n\r\n"); |
| 3708 | 3708 | } |
| 3709 | 3709 | } |
| 3710 | − else if (string.Compare(requestinfo.Request.Command, "Telnet", true) == 0 && (object)m_remoteCommandProcess != null && disconnectSession) | |
| 3710 | + else if (string.Compare(requestinfo.Request.Command, "Telnet", StringComparison.OrdinalIgnoreCase) == 0 && (object)m_remoteCommandProcess != null && disconnectSession) | |
| 3711 | 3711 | { |
| 3712 | 3712 | // User wants to terminate an established remote command session. |
| 3713 | 3713 | m_remoteCommandProcess.ErrorDataReceived -= RemoteCommandProcess_ErrorDataReceived; |