ConnectionList served no purpose and was removed

This commit is contained in:
David Sparer
2016-09-26 15:10:32 -06:00
parent 288221918e
commit fa7ca994e9
8 changed files with 0 additions and 89 deletions

View File

@@ -32,8 +32,6 @@ namespace mRemoteNG.App
public static class Runtime
{
#region Public Properties
public static ConnectionList ConnectionList { get; set; }
private static ConnectionList PreviousConnectionList { get; set; }
public static CredentialList CredentialList { get; set; }
public static CredentialList PreviousCredentialList { get; set; }
public static WindowList WindowList { get; set; }
@@ -201,7 +199,6 @@ namespace mRemoteNG.App
{
try
{
ConnectionList = new ConnectionList();
ConnectionsLoader connectionsLoader = new ConnectionsLoader();
if (filename == GetDefaultStartupConnectionFileName())
@@ -276,13 +273,6 @@ namespace mRemoteNG.App
// disable sql update checking while we are loading updates
SQLConnProvider?.Disable();
if (ConnectionList != null)
{
PreviousConnectionList = ConnectionList.Copy();
}
ConnectionList = new ConnectionList();
if (!Settings.Default.UseSQLServer)
{
if (withDialog)
@@ -472,7 +462,6 @@ namespace mRemoteNG.App
if (!Settings.Default.UseSQLServer)
connectionsSaver.ConnectionFileName = GetStartupConnectionFileName();
connectionsSaver.ConnectionList = ConnectionList;
connectionsSaver.Export = false;
connectionsSaver.SaveSecurity = new Security.Save(false);
connectionsSaver.ConnectionTreeModel = ConnectionTreeModel;
@@ -530,7 +519,6 @@ namespace mRemoteNG.App
connectionsSave.ConnectionFileName = saveFileDialog.FileName;
connectionsSave.Export = false;
connectionsSave.SaveSecurity = new Security.Save();
connectionsSave.ConnectionList = ConnectionList;
connectionsSave.ConnectionTreeModel = ConnectionTreeModel;
connectionsSave.SaveConnections();

View File

@@ -59,7 +59,6 @@ namespace mRemoteNG.Config.Connections
public bool Export {get; set;}
public Format SaveFormat {get; set;}
public Save SaveSecurity {get; set;}
public ConnectionList ConnectionList {get; set;}
public ConnectionTreeModel ConnectionTreeModel { get; set; }
#endregion
@@ -258,7 +257,6 @@ namespace mRemoteNG.Config.Connections
{
var xmlConnectionsSerializer = new XmlConnectionsSerializer()
{
ConnectionList = ConnectionList,
Export = Export,
SaveSecurity = SaveSecurity
};

View File

@@ -83,7 +83,6 @@ namespace mRemoteNG.Config.Serializers
newConnectionInfo.Inheritance.Description = false;
parentContainer.AddChild(newConnectionInfo);
Runtime.ConnectionList.Add(newConnectionInfo);
}
}
}

View File

@@ -31,13 +31,11 @@ namespace mRemoteNG.Config.Serializers
//TODO find way to inject data source info
private string ConnectionFileName = "";
public ConnectionList ConnectionList { get; set; }
public XmlConnectionsDeserializer(string xml)
{
LoadXmlConnectionData(xml);
ValidateConnectionFileVersion();
ConnectionList = new ConnectionList();
}
private void LoadXmlConnectionData(string connections)
@@ -140,7 +138,6 @@ namespace mRemoteNG.Config.Serializers
{
var connectionInfo = GetConnectionInfoFromXml(xmlNode);
parentContainer.AddChild(connectionInfo);
ConnectionList.Add(connectionInfo);
}
else if (nodeType == TreeNodeType.Container)
{

View File

@@ -24,7 +24,6 @@ namespace mRemoteNG.Config.Serializers
public bool Export { get; set; }
public Save SaveSecurity { get; set; }
public ConnectionList ConnectionList { get; set; }
public string Serialize(ConnectionTreeModel connectionTreeModel)

View File

@@ -1,68 +0,0 @@
using System;
using System.Collections;
namespace mRemoteNG.Connection
{
public class ConnectionList : CollectionBase
{
public ConnectionInfo this[object Index]
{
get
{
if (Index is ConnectionInfo)
return (ConnectionInfo)Index;
else
return ((ConnectionInfo) (List[Convert.ToInt32(Index)]));
}
}
public new int Count
{
get { return List.Count; }
}
public ConnectionInfo Add(ConnectionInfo connectionInfo)
{
List.Add(connectionInfo);
return connectionInfo;
}
public void AddRange(ConnectionInfo[] connectionInfoArray)
{
foreach (ConnectionInfo connectionInfo in connectionInfoArray)
{
List.Add(connectionInfo);
}
}
public ConnectionInfo FindByConstantID(string id)
{
foreach (ConnectionInfo connectionInfo in List)
{
if (connectionInfo.ConstantID == id)
return connectionInfo;
}
return null;
}
public ConnectionList Copy()
{
try
{
return (ConnectionList)MemberwiseClone();
}
catch (Exception)
{
}
return null;
}
public new void Clear()
{
List.Clear();
}
}
}

View File

@@ -506,7 +506,6 @@ namespace mRemoteNG.UI.Window
var newConnectionInfo = new ConnectionInfo();
var selectedContainer = SelectedNode as ContainerInfo;
newConnectionInfo.SetParent(selectedContainer ?? SelectedNode.Parent);
Runtime.ConnectionList.Add(newConnectionInfo);
}
catch (Exception ex)
{

View File

@@ -304,7 +304,6 @@
<Compile Include="Connection\InterfaceControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Connection\ConnectionList.cs" />
<Compile Include="Connection\Protocol\ProtocolBase.cs" />
<Compile Include="Connection\Protocol\Http\Connection.Protocol.HTTP.cs" />
<Compile Include="Connection\Protocol\Http\Connection.Protocol.HTTPBase.cs" />