예제 #1
0
        public JsonResult GetPlan(string ID)
        {
            PlanManager         pm    = PlanManager.GetInstance();
            List <PROJECT_PLAN> plans = pm.Select(ID);

            return(Json(plans));
        }
예제 #2
0
 public virtual async ValueTask <Tuple <ResponseStatus, object> > RemovePlan(long planId)
 {
     PlanManager.RemovePlan(planId);
     return(new Tuple <ResponseStatus, object>(
                ResponseStatus.Success,
                null));
 }
예제 #3
0
        public void ReplaceSpawnElementReferencesTest()
        {
            var pm     = new PlanManager {
            };
            var origId = "999999999999999999999999";
            var newId  = "000000000000000000000000";

            var list = new List <DTO.SpawnElement>
            {
                new DTO.SpawnElement
                {
                    ElementId = "53cfeea9d6a4850d58939849"
                },
                new DTO.SpawnElement
                {
                    ElementId = "532caae9a38116ac18000846"
                },
                new DTO.SpawnElement
                {
                    ElementId = "999999999999999999999999"
                }
            };

            pm.ReplaceSpawnElementReferences(list, origId, newId);

            Assert.AreEqual(list[2].ElementId, newId);
        }
예제 #4
0
 public HomeAppService(IRepository <MessageLog, Guid> repositoryMessageLog, PlanManager planManager, TaskItemAssignmentManager taskItemAssignmentManager, UserManager userManager)
 {
     _repositoryMessageLog      = repositoryMessageLog;
     _planManager               = planManager;
     _taskItemAssignmentManager = taskItemAssignmentManager;
     _userManager               = userManager;
 }
예제 #5
0
 public virtual async ValueTask <Tuple <ResponseStatus, object> > UpdatePlan(Plan plan)
 {
     PlanManager.UpdatePlan(plan);
     return(new Tuple <ResponseStatus, object>(
                ResponseStatus.Success,
                null));
 }
예제 #6
0
        public JsonResult RegPrj(PROJECT Project, List <PROJECT_PLAN> Plans, List <KPI> KPIs)
        {
            int             result = 0;
            PlanManager     plan   = PlanManager.GetInstance();
            ProjectManager  prj    = ProjectManager.GetInstance();
            KpiManager      km     = KpiManager.GetInstance();
            EmployeeManager em     = EmployeeManager.GetInstance();
            IdeaManager     idea   = IdeaManager.GetInstance();

            string existID = prj.IsExist(Project.IDEA_ID);

            if (string.IsNullOrEmpty(existID))
            {
                // generate id
                if (string.IsNullOrWhiteSpace(Project.IDEA_ID))
                {
                    Project.IDEA_ID = idea.GenerateId();
                    idea.Insert(Project.EMP_ID, Project.IDEA_TITLE, Project.BACKGROUND, "", "");
                }
                result = prj.InsertProject(Project);
                if (result > 0)
                {
                    foreach (var p in Plans)
                    {
                        plan.InsertPlan(Project.IDEA_ID, p.PLAN_CONTENTS, p.PLAN_DATE);
                    }
                    foreach (var kpi in KPIs)
                    {
                        km.InsertKPI(Project.IDEA_ID, kpi.PRJ_MONTH, kpi.TARGET_VALUE);
                    }
                    try
                    {
                        var emails = em.GetListEmail();
                        GMailer.GmailUsername = "******";
                        GMailer.GmailPassword = "******";

                        GMailer mailer = new GMailer();

                        mailer.Subject = "[Project Management - New project uploaded]";
                        mailer.Body    = " Employee " + Project.EMP_ID + " Has uploaded a project: " + Project.IDEA_TITLE + ".<br> Please check it out at<br> <a href='http://172.25.215.17/idea'>Project Management</a>";
                        mailer.IsHtml  = true;
                        foreach (var email in emails)
                        {
                            mailer.ToEmail = email.EMAIL.Trim();
                            mailer.Send();
                        }
                    }
                    catch
                    {
                        return(Json(result));
                    }
                }
            }
            else
            {
            }
            return(Json(result));
        }
예제 #7
0
 public FileItemController(
     FileItemManager fileItemManager,
     PlanManager planManager, ProjectManager projectManager, TaskItemAssignmentManager taskItemAssignmentManager)
 {
     _fileItemManager           = fileItemManager;
     _planManager               = planManager;
     _projectManager            = projectManager;
     _taskItemAssignmentManager = taskItemAssignmentManager;
 }
예제 #8
0
        private void SetPlan_Click(object sender, RoutedEventArgs e)
        {
            PlanManager PM = new PlanManager();


            Transient.Children.Clear();
            Transient.Children.Add(PM);
            Transient.Visibility = System.Windows.Visibility.Visible;
        }
예제 #9
0
 public ProjectAppService(
     IRepository <Project, Guid> projectRepository,
     FileItemManager fileItemManager,
     ProjectManager projectManager, PlanManager planManager, WorkshopLayoutManager workshopLayoutManager) : base(projectRepository)
 {
     _fileItemManager       = fileItemManager;
     _projectManager        = projectManager;
     _planManager           = planManager;
     _workshopLayoutManager = workshopLayoutManager;
 }
예제 #10
0
        public virtual async ValueTask <Tuple <ResponseStatus, object> > GetPlan(long planId)
        {
            var res = PlanManager.GetPlan(planId);

            return(new Tuple <ResponseStatus, object>(
                       res != null
                    ? ResponseStatus.Success
                    : ResponseStatus.BadRequest,
                       res));
        }
예제 #11
0
 public IHttpActionResult PostListPlan(FilterData filter)
 {
     try
     {
         var result = PlanManager.GetPlans(filter);
         return(Ok(result));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
예제 #12
0
 public IHttpActionResult PostCreatePlan(Plan plan)
 {
     try
     {
         var result = PlanManager.CreatePlan(plan);
         return(Ok(result));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
예제 #13
0
 public IHttpActionResult PostDeletePlan(int code)
 {
     try
     {
         var result = PlanManager.DeletePlan(code);
         return(Ok(result));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
예제 #14
0
        public JsonResult RemovePlan(string ID)
        {
            if (string.IsNullOrWhiteSpace(ID))
            {
                return(Json(-1));
            }
            var         result = 0;
            PlanManager pm     = PlanManager.GetInstance();

            result = pm.Delete(ID);
            return(Json(result));
        }
예제 #15
0
 public IHttpActionResult PostUpdatePlan(int code, Plan plan)
 {
     try
     {
         var result = PlanManager.UpdatePlan(new Plan(code, plan));
         return(Ok(result));
     }
     catch (Exception)
     {
         return(NotFound());
     }
 }
예제 #16
0
            public void Process_Action_With_Action_Spawn_Activated_Returned()
            {
                IPlanManager pm = new PlanManager
                {
                    PEUtils       = new StubPlanElementUtils(),
                    EndPointUtils = new StubPlanElementEndpointUtils()
                };

                ObjectId actionId = ObjectId.Parse("538ca77dfe7a59112c3649e4");

                PostProcessActionRequest request = new PostProcessActionRequest
                {
                    ContractNumber = "InHealth001",
                    PatientId      = "123456789012345678901234",
                    ProgramId      = "000000000000000000000000",
                    UserId         = "111111111111111111111111",
                    Version        = 1.0,
                    Action         = new Actions
                    {
                        Id            = actionId.ToString(),
                        Completed     = true,
                        ElementState  = 4,
                        Name          = "test action from stub",
                        Description   = "action Description",
                        Text          = "test action 1",
                        AttrEndDate   = DateTime.UtcNow.AddDays(10),
                        AttrStartDate = DateTime.UtcNow,
                        AssignDate    = DateTime.UtcNow,
                        SpawnElement  =
                            new List <SpawnElement>
                        {
                            new SpawnElement {
                                ElementId = "111116789012345678901234", ElementType = 3
                            }
                        },
                        Steps = new List <Step>
                        {
                            new Step
                            {
                                Id           = "000000000011111111111234",
                                ElementState = 1
                            }
                        }
                    }
                };

                PostProcessActionResponse response = pm.ProcessActionResults(request);

                Assert.IsNotNull(response.PlanElems);
                Assert.IsNotNull(response.PlanElems.Actions);
                Assert.AreEqual(actionId.ToString(), response.PlanElems.Actions[0].Id);
            }
예제 #17
0
        public IHttpActionResult PostCatigories()
        {
            try
            {
                var result = PlanManager.GetCategories();

                return(Ok(result));
            }
            catch (Exception)
            {
                return(NotFound());
            }
        }
예제 #18
0
        /// <summary>
        /// This method just show plan's data in fields of screen
        /// </summary>
        private void ShowPlan()
        {
            planManager = new PlanManager(this);

            originalPlan = planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));


            txtName.Text = originalPlan.Name;
            ucDateTimeInterval.DateInterval = new DateTimeInterval(originalPlan.AvailableStartDate, originalPlan.AvailableEndDate);

            // cboBranch.SelectedValue = Convert.ToString(originalPlan.BranchId);
            cboApplication.SelectedValue = Convert.ToString(originalPlan.ApplicationId);
            cboPackage.SelectedValue     = Convert.ToString(originalPlan.PackageId);
        }
예제 #19
0
        public JsonResult UpdateProject(PROJECT Project, List <PROJECT_PLAN> Plans, List <KPI> KPIs)
        {
            int            result = 0;
            PlanManager    plan   = PlanManager.GetInstance();
            ProjectManager prj    = ProjectManager.GetInstance();
            KpiManager     km     = KpiManager.GetInstance();

            string existID = prj.IsExist(Project.IDEA_ID);

            if (!string.IsNullOrEmpty(existID))
            {
                result = prj.UpdatePrj(Project.IDEA_ID, Project.EMP_ID, Project.IDEA_TITLE, Project.KPI_NAME, Project.KPI_UNIT,
                                       Project.REMARK, Project.NAME, Project.PRJ_CURR, Project.CURR_VALUE, Project.PRJECT_GRADE, Project.ATTACHMENT,
                                       Project.ISSUE, Project.REQUEST);

                if (result > 0)
                {
                    if (Plans != null)
                    {
                        foreach (var p in Plans)
                        {
                            if (string.IsNullOrWhiteSpace(p.ID))
                            {
                                plan.InsertPlan(p.IDEA_ID, p.PLAN_CONTENTS, p.PLAN_DATE, p.COMPLETE_YN, p.COMPLETE_DATE);
                            }
                            else
                            {
                                plan.Update(p.IDEA_ID, p.PLAN_CONTENTS, p.PLAN_DATE, p.COMPLETE_YN, p.COMPLETE_DATE, p.ID);
                            }
                        }
                    }
                    if (KPIs != null)
                    {
                        foreach (var kpi in KPIs)
                        {
                            if (!string.IsNullOrWhiteSpace(kpi.ID))
                            {
                                km.Update(kpi.IDEA_ID, kpi.PRJ_MONTH, kpi.TARGET_VALUE, kpi.RESULT_VALUE, kpi.ID);
                            }
                            else
                            {
                                km.InsertKPI(kpi.IDEA_ID, kpi.PRJ_MONTH, kpi.TARGET_VALUE, kpi.RESULT_VALUE);
                            }
                        }
                    }
                }
            }

            return(Json(result));
        }
예제 #20
0
 // Use this for initialization
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
     currentPlanIndex = 0;
     planList         = new List <bool[]>();
     NewPlan();
 }
예제 #21
0
        public void SaveActionResults_Test()
        {
            PlanManager           pm      = new PlanManager();
            PostSaveActionRequest request = new PostSaveActionRequest();

            request.Action = new Actions {
                Id = "534b652dd6a48504b03565f0", ModuleId = "534b652dd6a48504b03565ef"
            };
            request.PatientId      = "5325da1cd6a4850adcbba542";
            request.Token          = "534b523dd6a48504b03b0564";
            request.ProgramId      = "534b652dd6a48504b035649c";
            request.UserId         = "testing";
            request.Version        = 1.0;
            request.ContractNumber = "InHealth001";
            pm.SaveActionResults(request);
        }
예제 #22
0
        public JsonResult DeleteProject(string ID)
        {
            if (string.IsNullOrWhiteSpace(ID))
            {
                return(Json(-1));
            }
            var            result = 0;
            ProjectManager pm     = ProjectManager.GetInstance();
            PlanManager    plan   = PlanManager.GetInstance();
            KpiManager     kpi    = KpiManager.GetInstance();

            plan.DeletePlanByIdeaId(ID);
            kpi.DeleteKPIByIdeaId(ID);
            pm.DeleteLikeReply(ID);
            result = pm.Delete(ID);
            return(Json(result));
        }
예제 #23
0
        public PostSaveActionResponse Post(PostSaveActionRequest request)
        {
            var response = new PostSaveActionResponse();
            var intm     = new PlanManager();
            ValidateTokenResponse result = null;

            try
            {
                request.Token = base.Request.Headers["Token"] as string;
                result        = Security.IsUserValidated(request.Version, request.Token, request.ContractNumber);
                if (result.UserId.Trim() != string.Empty)
                {
                    request.UserId = result.UserId;
                    response       = intm.SaveActionResults(request);
                }
                else
                {
                    throw new UnauthorizedAccessException();
                }
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);
                if ((ex is WebServiceException) == false)
                {
                    intm.LogException(ex);
                }
            }
            finally
            {
                List <string> patientIds = null;
                if (!string.IsNullOrEmpty(response.PatientId))
                {
                    patientIds = new List <string> {
                        response.PatientId
                    };
                }

                if (result != null)
                {
                    AuditHelper.LogAuditData(request, result.SQLUserId, patientIds, System.Web.HttpContext.Current.Request, request.GetType().Name);
                }
            }
            return(response);
        }
예제 #24
0
    // Start is called before the first frame update
    void Start()
    {
        worldManager = new WorldManager();
        planManager  = new PlanManager();


        //Ask the Object Manager to return relevant objects

        objectManager.addAgent();
        objectManager.findObjects();
        objectManager.addPlanObjects();

        planManager.addProblemToAgenda("blueraincoat", "robot", "robot-4", objectManager.getObjectList());

        objectManager.setWorldObjects();


        //worldManager.addObjectsToWorld(objects);
        //worldManager.startWorld();
    }
예제 #25
0
        /// <summary>
        /// This method fill an new plan object and send them to bd for update or insert
        /// </summary>
        private void SavePlan()
        {
            planManager = new PlanManager(this);

            plan = new DataClasses.Plan();
            if (!String.IsNullOrEmpty(Request["PlanId"]))
            {
                plan = planManager.GetPlan(Convert.ToInt32(Request["PlanId"]));
            }

            plan.Name = txtName.Text;
            plan.AvailableStartDate = ucDateTimeInterval.DateInterval.BeginDate;
            plan.AvailableEndDate   = ucDateTimeInterval.DateInterval.EndDate;
            plan.ApplicationId      = Convert.ToInt32(cboApplication.SelectedValue);
            plan.PackageId          = Convert.ToInt32(cboPackage.SelectedValue);

            planManager.Save(plan);

            Response.Redirect("Plans.aspx");
        }
예제 #26
0
            public void Set_Action_State_Changed_To_Complete()
            {
                IPlanManager pm = new PlanManager
                {
                    PEUtils       = new StubPlanElementUtils(),
                    EndPointUtils = new StubPlanElementEndpointUtils()
                };

                PostProcessActionRequest request = new PostProcessActionRequest
                {
                    ContractNumber = "InHealth001",
                    PatientId      = "123456789012345678901234",
                    ProgramId      = "000000000000000000000000",
                    UserId         = "111111111111111111111111",
                    Version        = 1.0,
                    Action         = new DTO.Actions
                    {
                        Id            = "000000000000000000000000",
                        Completed     = true,
                        ElementState  = 4,
                        Name          = "test action from stub",
                        Description   = "action Description",
                        Text          = "test action 1",
                        AttrEndDate   = DateTime.UtcNow.AddDays(10),
                        AttrStartDate = DateTime.UtcNow,
                        AssignDate    = System.DateTime.UtcNow,
                        Steps         = new List <Step>
                        {
                            new Step
                            {
                                Id           = "000000000011111111111234",
                                ElementState = 1
                            }
                        }
                    }
                };

                PostProcessActionResponse response = pm.ProcessActionResults(request);

                Assert.IsNotNull(response);
            }
예제 #27
0
        public void InsertActionIntoModuleTest()
        {
            var pm             = new PlanManager();
            var actionId       = ObjectId.GenerateNewId().ToString();
            var step1Id        = ObjectId.GenerateNewId().ToString();
            var step2Id        = ObjectId.GenerateNewId().ToString();
            var selectedRespId = ObjectId.GenerateNewId().ToString();
            var repeatId       = "999999999999999999999999";
            var module         = SampleFactory.CreateModule(actionId, step1Id, step2Id, selectedRespId);

            var action = SampleFactory.CreateAction(repeatId);

            pm.ReplaceActionReferenceInModule(actionId, action, module);
            Assert.AreEqual(module.Actions[0].Next, repeatId);
            Assert.AreEqual(module.Actions[0].Previous, repeatId);
            Assert.AreEqual(module.Actions[0].SpawnElement[0].ElementId, repeatId);
            Assert.AreEqual(module.Actions[0].Steps[0].SpawnElement[0].ElementId, repeatId);
            Assert.AreEqual(module.Actions[0].Steps[0].Responses[0].SpawnElement[0].ElementId, repeatId);
            Assert.AreEqual(module.Actions.Count, 3);
            Assert.AreEqual(module.Actions[2].Id, repeatId);
        }
예제 #28
0
    public void Setup(PlanManager planManager)
    {
        this.planManager = planManager;
        timer.Setup(planManager);
        roundNumber.Setup(planManager);

        for (int i = 0; i < playerAmmoBars.Length; i++)
        {
            playerAmmoBars[i].Setup(planManager, i);
        }
        for (int i = 0; i < equipmentBars.Length; i++)
        {
            equipmentBars[i].Setup(planManager, i);
        }

        Canvas drawCanvas = gameObject.GetComponent <Canvas>();

        drawCanvas.worldCamera   = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>();
        drawCanvas.planeDistance = 1;

        ReloadAll();
    }
예제 #29
0
    protected void RegistrarEmpresa(object sender, EventArgs e)
    {
        var companyManager = new CompanyManager(this);
        var planManager    = new PlanManager(this);

        var plan = planManager.GetAllPlans().Where(x => x.Name.Contains(Request["plan"])).FirstOrDefault();

        if (plan == null)
        {
            throw new ArgumentException("O plano não existe!");
        }

        var company = new Company
        {
            PlanId               = plan.PlanId,
            StartDate            = DateTime.Now,
            ModifiedDate         = DateTime.Now,
            NextStatementDueDate = DateTime.Now.AddMonths(1),
            LegalEntityProfile   = new LegalEntityProfile
            {
                CNPJ          = txtCNPJ.Text,
                CompanyName   = txtCompanyName.Text,
                Phone         = txtCompanyPhone.Text,
                PostalCode    = adrCompanyAddress.PostalCode,
                AddressComp   = adrCompanyAddress.AddressComp,
                AddressNumber = adrCompanyAddress.AddressNumber,
                IE            = txtIE.Text
            }
        };

        var user = new InfoControl.Web.Security.DataEntities.User
        {
            UserName                = txtEmail.Text,
            Email                   = txtEmail.Text,
            Password                = txtSenha.Text,
            PasswordAnswer          = txtSenha.Text,
            CreationDate            = DateTime.Now,
            LastLockoutDate         = DateTime.Now,
            LastLoginDate           = DateTime.Now,
            LastPasswordChangedDate = DateTime.Now
        };

        var profile = new Profile
        {
            CPF           = txtCPF.Text,
            Name          = txtNome.Text,
            ModifiedDate  = DateTime.Now,
            Phone         = txtPhone.Text,
            PostalCode    = adrAdminAddress.PostalCode,
            AddressComp   = adrAdminAddress.AddressComp,
            AddressNumber = adrAdminAddress.AddressNumber
        };

        InsertCompanyStatus status = companyManager.InsertMatrixCompany(company, user, profile);

        switch (status)
        {
        case InsertCompanyStatus.Success:
            //txtError.Text = "<b> <font color='red'> Empresa registrada com sucesso!  </font> </b>";
            pnlFormRegister.Visible = false;
            successMessage.Visible  = true;
            break;

        case InsertCompanyStatus.DuplicateCNPJ:
            txtError.Text = "<b> <font color='red'>" + Resources.Exception.CNPJAlreadyExist + " </font> </b>";
            break;

        case InsertCompanyStatus.DuplicatedAdminEmail:
            txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorEmailAlreadyExist + " </font> </b>";
            break;

        case InsertCompanyStatus.DuplicatedUserName:
            txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorCPFAlreadyExist + " </font> </b>";
            break;

        case InsertCompanyStatus.InvalidPassword:
            txtError.Text = "<b> <font color='red'>" + Resources.Exception.InvalidUserPassword + " </font> </b>";
            break;

        default:
            txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorEmailAlreadyExist + " </font> </b>";
            break;
        }
    }
    protected void RegistrarEmpresa(object sender, EventArgs e)
    {
        var companyManager = new CompanyManager(this);
        var planManager = new PlanManager(this);

        var plan = planManager.GetAllPlans().Where(x => x.Name.Contains(Request["plan"])).FirstOrDefault();
        if (plan == null)
            throw new ArgumentException("O plano não existe!");

        var company = new Company
        {
            PlanId = plan.PlanId,
            StartDate = DateTime.Now,
            ModifiedDate = DateTime.Now,
            NextStatementDueDate = DateTime.Now.AddMonths(1),
            LegalEntityProfile = new LegalEntityProfile
            {
                CNPJ = txtCNPJ.Text,
                CompanyName = txtCompanyName.Text,
                Phone = txtCompanyPhone.Text,
                PostalCode = adrCompanyAddress.PostalCode,
                AddressComp = adrCompanyAddress.AddressComp,
                AddressNumber = adrCompanyAddress.AddressNumber,
                IE = txtIE.Text
            }
        };

        var user = new InfoControl.Web.Security.DataEntities.User
        {
            UserName = txtEmail.Text,
            Email = txtEmail.Text,
            Password = txtSenha.Text,
            PasswordAnswer = txtSenha.Text,
            CreationDate = DateTime.Now,
            LastLockoutDate = DateTime.Now,
            LastLoginDate = DateTime.Now,
            LastPasswordChangedDate = DateTime.Now
        };

        var profile = new Profile
        {
            CPF = txtCPF.Text,
            Name = txtNome.Text,
            ModifiedDate = DateTime.Now,
            Phone = txtPhone.Text,
            PostalCode = adrAdminAddress.PostalCode,
            AddressComp = adrAdminAddress.AddressComp,
            AddressNumber = adrAdminAddress.AddressNumber
        };

        InsertCompanyStatus status = companyManager.InsertMatrixCompany(company, user, profile);

        switch (status)
        {
            case InsertCompanyStatus.Success:
                //txtError.Text = "<b> <font color='red'> Empresa registrada com sucesso!  </font> </b>";
                pnlFormRegister.Visible = false;
                successMessage.Visible = true;
                break;

            case InsertCompanyStatus.DuplicateCNPJ:
                txtError.Text = "<b> <font color='red'>" + Resources.Exception.CNPJAlreadyExist + " </font> </b>";
                break;

            case InsertCompanyStatus.DuplicatedAdminEmail:
                txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorEmailAlreadyExist + " </font> </b>";
                break;

            case InsertCompanyStatus.DuplicatedUserName:
                txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorCPFAlreadyExist + " </font> </b>";
                break;

            case InsertCompanyStatus.InvalidPassword:
                txtError.Text = "<b> <font color='red'>" + Resources.Exception.InvalidUserPassword + " </font> </b>";
                break;

            default:
                txtError.Text = "<b> <font color='red'>" + Resources.Exception.AdministratorEmailAlreadyExist + " </font> </b>";
                break;
        }
    }
예제 #31
0
        private static void Main2(string[] args)
        {
            NLogConfigManager.CreateFileConfig();
            Logger = NLog.LogManager.GetCurrentClassLogger();

            if (args.Length != 1)
            {
                throw new InvalidUserParamsException(
                          "RandoopBare takes exactly one argument but was "
                          + "given the following arguments:"
                          + System.Environment.NewLine
                          + Util.PrintArray(args));;
            }

            // Parse XML file with generation parameters.
            string configFileName       = ConfigFileName.Parse(args[0]);
            RandoopConfiguration config = LoadConfigFile(configFileName);

            // Set the random number generator.
            if (config.randomSource == RandomSource.SystemRandom)
            {
                Logger.Debug("Randoom seed = " + config.randomseed);
                SystemRandom random = new SystemRandom();
                random.Init(config.randomseed);
                Enviroment.Random = random;
            }
            else
            {
                Util.Assert(config.randomSource == RandomSource.Crypto);
                Logger.Debug("Randoom seed = new System.Security.Cryptography.RNGCryptoServiceProvider()");
                Enviroment.Random = new CryptoRandom();
            }

            if (!Directory.Exists(config.outputdir))
            {
                throw new InvalidUserParamsException("output directory does not exist: "
                                                     + config.outputdir);
            }

            Collection <Assembly> assemblies = Misc.LoadAssemblies(config.assemblies);

            ////[email protected] for substituting MessageBox.Show() - start
            ////Instrument instrumentor = new Instrument();
            //foreach (FileName asm in config.assemblies)
            //{
            //    Instrument.MethodInstrument(asm.fileName, "System.Windows.Forms.MessageBox::Show", "System.Logger.Debug");
            //}
            ////[email protected] for substituting MessageBox.Show() - end

            IReflectionFilter filter1 = new VisibilityFilter(config);
            ConfigFilesFilter filter2 = new ConfigFilesFilter(config);

            Logger.Debug("========== REFLECTION PATTERNS:");
            filter2.PrintFilter(Console.Out);

            IReflectionFilter filter = new ComposableFilter(filter1, filter2);

            Collection <Type> typesToExplore = ReflectionUtils.GetExplorableTypes(assemblies);

            PlanManager planManager = new PlanManager(config);

            planManager.builderPlans.AddEnumConstantsToPlanDB(typesToExplore);
            planManager.builderPlans.AddConstantsToTDB(config);

            Logger.Debug("========== INITIAL PRIMITIVE VALUES:");
            planManager.builderPlans.PrintPrimitives(Console.Out);

            StatsManager stats = new StatsManager(config);

            Logger.Debug("Analyzing assembly.");

            ActionSet actions;

            try
            {
                actions = new ActionSet(typesToExplore, filter);
            }
            catch (EmpytActionSetException)
            {
                string msg = "After filtering based on configuration files, no remaining methods or constructors to explore.";
                throw new InvalidUserParamsException(msg);
            }

            Logger.Debug("Generating tests.");

            RandomExplorer explorer =
                new RandomExplorer(typesToExplore, filter, true, config.randomseed, config.arraymaxsize, stats, actions);
            ITimer t = new Timer(config.timelimit);

            try
            {
                explorer.Explore(t, planManager, config.methodweighing, config.forbidnull, true, config.fairOpt);
            }
            catch (Exception e)
            {
                Logger.Error("Explorer raised exception {0}", e.ToString());
                throw;
            }
        }