49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWoLauncher
|
|
{
|
|
public class ConnectionProfile
|
|
{
|
|
public string Name { get; set; }
|
|
public string Server { get; set; }
|
|
public string Tenant { get; set; }
|
|
|
|
public ConnectionProfile(string pname, string pserver, string ptenant)
|
|
{
|
|
Name = pname;
|
|
Server = pserver;
|
|
Tenant = ptenant;
|
|
if (Name == null)
|
|
Name = String.Empty;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return Name;
|
|
}
|
|
|
|
// Mistery Bug:
|
|
//public override int GetHashCode()
|
|
//{
|
|
// String key = String.Format("{0}_{1}_{2}", Name, Server, Tenant);
|
|
// return key.GetHashCode();
|
|
//}
|
|
|
|
//public override bool Equals(object obj)
|
|
//{
|
|
// var profile = obj as ConnectionProfile;
|
|
// if (profile == null)
|
|
// {
|
|
// return false;
|
|
// }
|
|
// String key1 = String.Format("{0}_{1}_{2}", Name, Server, Tenant);
|
|
// String key2 = String.Format("{0}_{1}_{2}", profile.Name, profile.Server, profile.Tenant);
|
|
// return key1.Equals(key2);
|
|
//}
|
|
}
|
|
}
|