public void Connect()
{
if(Connection.IsConnected)
{
return;
}
if(string.IsNullOrEmpty(Name))
{
throw new ArgumentException(string.Format(StringResources.Error_Connect_Failed, StringResources.Error_DSF_Name_Not_Provided));
}
Dev2Logger.Log.Debug("Attempting to connect to [ " + Connection.AppServerUri + " ] ");
Connection.Connect(ID);
}
EnvironmentModel::Connect ( IEnvironmentModel other ) : void |
public void GivenIHaveAServer(string serverName) { if(serverName != "localhost") { var environmentModel = new EnvironmentModel(Guid.NewGuid(), new ServerProxy(new Uri(string.Format("http://{0}:3142", serverName)))); EnvironmentRepository.Instance.Save(environmentModel); environmentModel.Connect(); } }