예제 #1
0
        private void PatchProfiles(string oldConfigFile)
        {
            foreach (var pair in _appPathKeyMapping)
            {
                ConnectionDescription profile;
                if (_knownConnections._knownConnectionProfiles.TryGetValue(pair.Key, out profile))
                {
                    string pathMapping;
                    if (_appPathKeyMapping.TryGetValue(profile.ConnectionTypeName, out pathMapping))
                    {
                        var oldRepoValue = _xmlHelper.configGet(oldConfigFile, pathMapping);
                        if (!string.IsNullOrEmpty(oldRepoValue))
                        {
                            profile.AppPath = oldRepoValue;
                        }
                    }

                    if (pair.Key == KnownConnections.Ssh().ConnectionTypeName)
                    {
                        PatchSshProfile(oldConfigFile, profile);
                    }
                    else if (pair.Key == KnownConnections.Rdp().ConnectionTypeName)
                    {
                        PatchRdpProfile(oldConfigFile, profile);
                    }
                    else if (pair.Key == KnownConnections.WinScpFtp().ConnectionTypeName ||
                             pair.Key == KnownConnections.WinScpScp().ConnectionTypeName ||
                             pair.Key == KnownConnections.WinScpSftp().ConnectionTypeName)
                    {
                        PatchWinScpProfile(oldConfigFile, profile);
                    }
                    else if (pair.Key == KnownConnections.Vnc().ConnectionTypeName)
                    {
                        PatchVncProfile(oldConfigFile, profile);
                    }
                }
            }
        }
예제 #2
0
 public OldRepositoryReader(string configFile, KnownConnections knownConnections)
 {
     _xmlHelper        = new XmlHelper();
     ConfigFile        = configFile;
     _knownConnections = knownConnections;
 }
예제 #3
0
 public NewRepositoryReader(KnownConnections knownConnections)
 {
     _knownConnections = knownConnections;
 }