static public void Run() { Console.WriteLine("------------Facade------------"); ActionFacade actionFacade = new ActionFacade(new HttpRequests(), new TftpRequests(), new TcpRequests()); actionFacade.HttpRequests.Get("SomeUrl"); actionFacade.TftpRequests.StartServer(); actionFacade.TcpRequests.Ping("SomeIp"); }
public void SetUp() { _turn = new Mock <Turn>(); _move = new Mock <Move>(); _actionFacadeMock = new ActionFacade(_turn.Object, _move.Object); ConfigurationManager.AppSettings["BoardSizeMinX"] = "0"; ConfigurationManager.AppSettings["BoardSizeMaxX"] = "4"; ConfigurationManager.AppSettings["BoardSizeMinY"] = "0"; ConfigurationManager.AppSettings["BoardSizeMaxY"] = "4"; }
public void RunThreadedInstall() { try { //Bypass the obsolete call internal to ExecuteInstall //ExecuteInstall(_config.ProductName, IisSiteEnum.Localhost, AspNetVersionEnum.Asp40, AppPoolEnum.GreenStoneCustom40IntegratedImpersonating, false) Logger.LogInstallProgress("RunThreadedInstall - Begin"); const string iisSite = "localhost"; const AspNetVersionEnum aspNetVersion = AspNetVersionEnum.Asp40; const string appPool = "GreenstoneCustom40IntegratedImpersonating"; const bool allowAnonymousAccess = false; const bool integratedSecurity = false; const string port = ""; Logger.LogInstallProgress("RunThreadedInstall - Setup Variables"); string xmlInstructionsPath = System.IO.Path.Combine(_config.CustomActionTarget, _config.XmlInstructionsName); Logger.LogInstallProgress($"RunThreadedInstall - xmlInstructionsPath: {xmlInstructionsPath}"); ConfigurationGateway configGateway = new ConfigurationGateway(_config.ProductName, _config.Version, xmlInstructionsPath); ActionFacade actionFacade = new ActionFacade(Logger); Logger.LogInstallProgress("RunThreadedInstall - Setup Active Directory"); SetupActiveDirectory(); // NOTE: Just sets some logins for the website / app pool Logger.LogInstallProgress("RunThreadedInstall - Execute PreInstall Actions"); ExecutePreInstallActions(this); Logger.LogInstallProgress("RunThreadedInstall - Setup IIS Site"); IisAppPoolMaintenance appPoolManager = new IisAppPoolMaintenance(); // NOTE: Adds a new App Pool to IIS if the one specified here is not found appPoolManager.AddAppPoolIfNotExists(appPool, aspNetVersion); // NOTE: Adds the directory to the iisSite (typically was Default Site) actionFacade.CreateVirtualDirectory(_config.WebTarget, _config.ProductName, iisSite, aspNetVersion, appPool, allowAnonymousAccess, integratedSecurity, port); Logger.LogInstallProgress("RunThreadedInstall - Execute PostInstall Actions"); // NOTE: Reads the XML file for this install to open a window prompt with name/value configuration (to update AppSettings) this.ContextActions = configGateway.ProcessConfigurationInstructions(); ExecutePostInstallActions(this); } catch (Exception ex) { // WriteEntry(<source>, <message>, <type>, <ID>) EventLog.WriteEntry(".NET Runtime", ex.ToString(), EventLogEntryType.Error, 1026); throw; } finally { AutoEvent.Set(); } }
static void Main(string[] args) { var console = new ConsoleWrapper(); var turn = new Turn(); var move = new Move(); var action = new ActionFacade(turn, move); var game = new BoardGame(console, action); var minX = int.Parse(ConfigurationManager.AppSettings["StartingAtX"]); var minY = int.Parse(ConfigurationManager.AppSettings["StartingAtY"]); var direction = Enum.Parse <Direction>(ConfigurationManager.AppSettings["StartingDirection"]); game.PlayGame(minX, minY, direction); }