AutoMerge.BranchFactory.CreateBranch C# (CSharp) Method

CreateBranch() private method

private CreateBranch ( string targetBranch, string targetPath ) : MergeInfoViewModel
targetBranch string
targetPath string
return MergeInfoViewModel
        private MergeInfoViewModel CreateBranch(string targetBranch, string targetPath)
        {
            var mergeInfo = new MergeInfoViewModel(_eventAggregator)
            {
                SourceBranch = _sourceBranch,
                TargetBranch = targetBranch,
                SourcePath = _sourceFolder,
                TargetPath = targetPath,
                ChangesetVersionSpec = _changesetVersion,
                ValidationResult = BranchValidationResult.Success,
            };

            if (_sourceBranch != targetBranch)
            {
                mergeInfo = _branchValidator.Validate(mergeInfo);
            }

            return mergeInfo;
        }