Example #1
0
 private void ImportFolder(vRDConfigurationFileConnectionsFolder Folder, List<string> FolderNames, Dictionary<string, vRDConfigurationFileCredentialsFolderCredentials> Credentials)
 {
     foreach (Connection conn in Folder.Connection)
     {
         ImportConnection(conn, FolderNames, Credentials);
     }
     foreach (vRDConfigurationFileConnectionsFolderFolder folder in Folder.Folder)
     {
         FolderNames.Add(folder.Name);
     }
 }
Example #2
0
 private List<FavoriteConfigurationElement> ConvertVRDConnectionCollectionToLocal(Connection[] connections, vRDConfigurationFileConnectionsFolder[] folders,
     vRDConfigurationFileConnectionsFolderFolder[] subFolders, String connectionTag,
     Dictionary<string, vRDConfigurationFileCredentialsFolderCredentials> credentials)
 {
     List<FavoriteConfigurationElement> coll = new List<FavoriteConfigurationElement>();
     //covert vrd connection
     if (connections != null && connections.Length > 0)
     {
         foreach (Connection con in connections)
         {
             FavoriteConfigurationElement fav = ConvertVRDConnectionToLocal(credentials, con);
             if (connectionTag != null && connectionTag != String.Empty && !fav.TagList.Contains(connectionTag))
             {
                 fav.TagList.Add(connectionTag);
                 fav.Tags = connectionTag;
             }
             coll.Add(fav);
         }
     }
     //get connection object from root folder
     if (folders != null && folders.Length > 0)
     {
         foreach (vRDConfigurationFileConnectionsFolder folder in folders)
         {
             coll.AddRange(ConvertVRDConnectionCollectionToLocal(folder.Connection, null, folder.Folder, folder.Name, credentials));
         }
     }
     //get connection object from sub folder
     if (subFolders != null && subFolders.Length > 0)
     {
         foreach (vRDConfigurationFileConnectionsFolderFolder folder in subFolders)
         {
             string tag = connectionTag + folder.Name;
             coll.AddRange(ConvertVRDConnectionCollectionToLocal(folder.Connection, null, null, tag, credentials));
         }
     }
     return coll;
 }