public ProjectHandler Initialize(SalesforceMigrationsProject salesforceMigrationsProject)
        {
            string fileName = string.Format("{0}\\{1}", GetProjectLocation, _projectName);
            _salesforceMigrationsProject = salesforceMigrationsProject;

            return this;
        }
        public ProjectHandler Initialize()
        {
            string fileName = string.Format("{0}\\{1}", GetProjectLocation, _projectName);

            _salesforceMigrationsProject =
                JsonConvert.DeserializeObject<SalesforceMigrationsProject>(File.ReadAllText(fileName));
            return this;
        }
        public void Setup()
        {
            SalesforceMigrationsProject project = new SalesforceMigrationsProject
            {
                ContextTypes = new[]
                {
                    "ApexClass", "ApexComponent", "ApexPage", "ApexTrigger", "Workflow", "RemoteSiteSetting",
                    "PermissionSet", "CustomObject", "StaticResource", "Profile"
                }.ToList(),
                Environments = new List<SalesForceEnvionment>
                {
                    new SalesForceEnvionment
                    {
                        Name = "Dev54 SandBox",
                        AuthorizationCredential = new Credential
                        {
                            UserName = "******",
                            Password = "******",
                            Token = "UBB2jcTNepy81bfDhy1duZt4I",
                            EnvironmentType = SalesforceEnvironmentType.Sandbox
                        }
                    },
                    new SalesForceEnvionment
                    {
                        Name = "Dev49 SandBox",
                        AuthorizationCredential = new Credential
                        {
                            UserName = "******",
                            Password = "******",
                            Token = "Up5Iauh1187WdUDLB519PVoN9",
                            EnvironmentType = SalesforceEnvironmentType.Sandbox
                        }
                    },
                    new SalesForceEnvionment
                    {
                        Name = "Dev58 SandBox",
                        AuthorizationCredential = new Credential
                        {
                            UserName = "******",
                            Password = "******",
                            Token = "68CsU07xwwEcgUbC6guo1Oix",
                            EnvironmentType = SalesforceEnvironmentType.Sandbox
                        }
                    },
                    new SalesForceEnvionment
                    {
                        Name = "Dev56 SandBox",
                        AuthorizationCredential = new Credential
                        {
                            UserName = "******",
                            Password = "******",
                            Token = "YBm64kT2z18rGOnTUuTJmAf1",
                            EnvironmentType = SalesforceEnvironmentType.Sandbox
                        }
                    },
                    new SalesForceEnvionment
                    {
                        Name = "Dev43 SandBox",
                        AuthorizationCredential = new Credential
                        {
                            UserName = "******",
                            Password = "******",
                            Token = "Dcv65G0PfeMbDnVCYKsz50OZf",
                            EnvironmentType = SalesforceEnvironmentType.Sandbox
                        }
                    },
                },
                PullEnvironments = new List<string>
                {
                    "Dev54 SandBox",
                    "Dev49 SandBox",
                    "Dev58 SandBox",
                    "Dev56 SandBox",
                    "Dev43 SandBox"
                },
                PushEnvironments = new List<string>
                {
                    "Dev58 SandBox"
                }
            };

            ProjectHandler projectHandler = new ProjectHandler()
                .Initialize(project);

            projectHandler.SaveProject();
        }