conflict_resolution
stringlengths
27
16k
<<<<<<< var gitItem = (GitItem)GitTree.SelectedNode.Tag; UICommands.StartArchiveDialog(this, selectedRevisions.First(), gitItem.FileName); ======= var gitItem = (GitItem)GitTree.SelectedNode.Tag; // this should not fail, if it still does, user should know UICommands.StartArchiveDialog(this, selectedRevisions.First(), null, gitItem.FileName); >>>>>>> var gitItem = (GitItem)GitTree.SelectedNode.Tag; UICommands.StartArchiveDialog(this, selectedRevisions.First(), null, gitItem.FileName);
<<<<<<< input = GitModule.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[-]{3}[ ][\\\"]{0,1}[a]/(.*)[\\\"]{0,1}"); ======= input = GitCommandHelpers.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[-]{3}[ ][\\\"]{0,1}[aiwco12]/(.*)[\\\"]{0,1}"); >>>>>>> input = GitModule.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[-]{3}[ ][\\\"]{0,1}[aiwco12]/(.*)[\\\"]{0,1}"); <<<<<<< input = GitModule.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[+]{3}[ ][\\\"]{0,1}[b]/(.*)[\\\"]{0,1}"); ======= input = GitCommandHelpers.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[+]{3}[ ][\\\"]{0,1}[biwco12]/(.*)[\\\"]{0,1}"); >>>>>>> input = GitModule.UnquoteFileName(input); Match regexMatch = Regex.Match(input, "[+]{3}[ ][\\\"]{0,1}[biwco12]/(.*)[\\\"]{0,1}");
<<<<<<< if (forcePush) { if (!form.ProcessArguments.Contains(" -f ")) form.ProcessArguments = form.ProcessArguments.Replace("push", "push -f"); form.Retry(); return true; } if (Settings.AutoPullOnPushRejectedAction == Settings.PullAction.None) ======= if (AppSettings.AutoPullOnPushRejectedAction == AppSettings.PullAction.None) >>>>>>> if (forcePush) { if (!form.ProcessArguments.Contains(" -f ")) form.ProcessArguments = form.ProcessArguments.Replace("push", "push -f"); form.Retry(); return true; } if (AppSettings.AutoPullOnPushRejectedAction == AppSettings.PullAction.None)
<<<<<<< public string NewVersion; private readonly SynchronizationContext _syncContext; ======= >>>>>>> public string NewVersion;
<<<<<<< ======= this.Revisions.TabIndex = 0; this.Revisions.Scroll += new System.Windows.Forms.ScrollEventHandler(this.Revisions_Scroll); >>>>>>> this.Revisions.TabIndex = 0; <<<<<<< ======= this.Revisions.CellContextMenuStripChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.Revisions_CellContextMenuStripChanged); this.Revisions.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Revisions_CellContentClick); // // Graph // this.Graph.HeaderText = "Graph"; this.Graph.Name = "Graph"; this.Graph.ReadOnly = true; this.Graph.Width = 200; >>>>>>> <<<<<<< resources.ApplyResources(this.deleteTagToolStripMenuItem, "deleteTagToolStripMenuItem"); ======= this.deleteTagToolStripMenuItem.Size = new System.Drawing.Size(254, 22); this.deleteTagToolStripMenuItem.Text = "Delete tag"; this.deleteTagToolStripMenuItem.Click += new System.EventHandler(this.deleteTagToolStripMenuItem_Click); >>>>>>> this.deleteTagToolStripMenuItem.Size = new System.Drawing.Size(254, 22); this.deleteTagToolStripMenuItem.Text = "Delete tag"; <<<<<<< resources.ApplyResources(this.deleteBranchToolStripMenuItem, "deleteBranchToolStripMenuItem"); ======= this.deleteBranchToolStripMenuItem.Size = new System.Drawing.Size(254, 22); this.deleteBranchToolStripMenuItem.Text = "Delete branch"; this.deleteBranchToolStripMenuItem.Click += new System.EventHandler(this.deleteBranchToolStripMenuItem_Click); >>>>>>> this.deleteBranchToolStripMenuItem.Size = new System.Drawing.Size(254, 22); this.deleteBranchToolStripMenuItem.Text = "Delete branch"; <<<<<<< ======= this.label1.Size = new System.Drawing.Size(315, 104); this.label1.TabIndex = 0; this.label1.Text = resources.GetString("label1.Text"); this.label1.Click += new System.EventHandler(this.label1_Click); >>>>>>> this.label1.Size = new System.Drawing.Size(315, 104); this.label1.TabIndex = 0; this.label1.Text = resources.GetString("label1.Text"); <<<<<<< ======= this.Size = new System.Drawing.Size(585, 204); this.Load += new System.EventHandler(this.RevisionGrid_Load); >>>>>>> this.Size = new System.Drawing.Size(585, 204);
<<<<<<< using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Windows.Forms; using GitUIPluginInterfaces; namespace AutoCompileSubmodules { public class AutoCompileSubModules : IGitPluginForRepository { private const string MsBuildPath = @"C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe"; #region IGitPlugin Members /// <summary> /// Gets the plugin description. /// </summary> /// <value>The description.</value> public string Description { get { return "Auto compile SubModules"; } } // Store settings to use later public IGitPluginSettingsContainer Settings { get; set; } public void Register(IGitUICommands gitUiCommands) { // Register settings Settings.AddSetting("Enabled (true / false)", "false"); Settings.AddSetting("Path to msbuild.exe", FindMsBuild()); Settings.AddSetting("msbuild.exe arguments", "/p:Configuration=Debug"); // Connect to events gitUiCommands.PostUpdateSubmodules += GitUiCommandsPostUpdateSubmodules; gitUiCommands.PostUpdateSubmodulesRecursive += GitUiCommandsPostUpdateSubmodulesRecursive; } public void Execute(GitUIBaseEventArgs e) { // Only build when plugin is enabled if (string.IsNullOrEmpty(e.GitWorkingDir)) return; var arguments = Settings.GetSetting("msbuild.exe arguments"); var msbuildpath = Settings.GetSetting("Path to msbuild.exe"); var workingDir = new DirectoryInfo(e.GitWorkingDir); var solutionFiles = workingDir.GetFiles("*.sln", SearchOption.AllDirectories); for (var n = solutionFiles.Length - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; var result = MessageBox.Show( string.Format("Do you want to build {0}?\n\n{1}", solutionFile.Name, SolutionFilesToString(solutionFiles)), "Build", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Cancel) return; if (result != DialogResult.Yes) continue; if (string.IsNullOrEmpty(msbuildpath) || !File.Exists(msbuildpath)) MessageBox.Show("Please enter correct MSBuild path in the plugin settings dialog and try again."); else e.GitUICommands.StartCommandLineProcessDialog(msbuildpath, solutionFile.FullName + " " + arguments); } } #endregion private static string FindMsBuild() { return File.Exists(MsBuildPath) ? MsBuildPath : ""; } private void GitUiCommandsPostUpdateSubmodulesRecursive(object sender, GitUIBaseEventArgs e) { if (Settings.GetSetting("Enabled (true / false)") .Equals("true", StringComparison.InvariantCultureIgnoreCase)) Execute(e); } /// <summary> /// Automaticly compile all solution files found in any submodule /// </summary> private void GitUiCommandsPostUpdateSubmodules(object sender, GitUIBaseEventArgs e) { if (Settings.GetSetting("Enabled (true / false)") .Equals("true", StringComparison.InvariantCultureIgnoreCase)) Execute(e); } private static string SolutionFilesToString(IList<FileInfo> solutionFiles) { var solutionString = new StringBuilder(); for (var n = solutionFiles.Count - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; solutionString.Append(solutionFile.Name); solutionString.Append("\n"); } return solutionString.ToString(); } } ======= using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Windows.Forms; using GitUIPluginInterfaces; namespace AutoCompileSubmodules { public class AutoCompileSubModules : IGitPlugin { private const string MsBuildPath = @"C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe"; #region IGitPlugin Members /// <summary> /// Gets the plugin description. /// </summary> /// <value>The description.</value> public string Description { get { return "Auto compile SubModules"; } } // Store settings to use later public IGitPluginSettingsContainer Settings { get; set; } public void Register(IGitUICommands gitUiCommands) { // Register settings Settings.AddSetting("Enabled (true / false)", "false"); Settings.AddSetting("Path to msbuild.exe", FindMsBuild()); Settings.AddSetting("msbuild.exe arguments", "/p:Configuration=Debug"); // Connect to events gitUiCommands.PostUpdateSubmodules += GitUiCommandsPostUpdateSubmodules; } public void Execute(GitUIBaseEventArgs e) { // Only build when plugin is enabled if (string.IsNullOrEmpty(e.GitWorkingDir)) return; var arguments = Settings.GetSetting("msbuild.exe arguments"); var msbuildpath = Settings.GetSetting("Path to msbuild.exe"); var workingDir = new DirectoryInfo(e.GitWorkingDir); var solutionFiles = workingDir.GetFiles("*.sln", SearchOption.AllDirectories); for (var n = solutionFiles.Length - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; var result = MessageBox.Show( string.Format("Do you want to build {0}?\n\n{1}", solutionFile.Name, SolutionFilesToString(solutionFiles)), "Build", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Cancel) return; if (result != DialogResult.Yes) continue; if (string.IsNullOrEmpty(msbuildpath) || !File.Exists(msbuildpath)) MessageBox.Show("Please enter correct MSBuild path in the plugin settings dialog and try again."); else e.GitUICommands.StartCommandLineProcessDialog(msbuildpath, solutionFile.FullName + " " + arguments); } } #endregion private static string FindMsBuild() { return File.Exists(MsBuildPath) ? MsBuildPath : ""; } /// <summary> /// Automaticly compile all solution files found in any submodule /// </summary> private void GitUiCommandsPostUpdateSubmodules(object sender, GitUIBaseEventArgs e) { if (Settings.GetSetting("Enabled (true / false)") .Equals("true", StringComparison.InvariantCultureIgnoreCase)) Execute(e); } private static string SolutionFilesToString(IList<FileInfo> solutionFiles) { var solutionString = new StringBuilder(); for (var n = solutionFiles.Count - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; solutionString.Append(solutionFile.Name); solutionString.Append("\n"); } return solutionString.ToString(); } } >>>>>>> using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Windows.Forms; using GitUIPluginInterfaces; namespace AutoCompileSubmodules { public class AutoCompileSubModules : IGitPluginForRepository { private const string MsBuildPath = @"C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe"; #region IGitPlugin Members /// <summary> /// Gets the plugin description. /// </summary> /// <value>The description.</value> public string Description { get { return "Auto compile SubModules"; } } // Store settings to use later public IGitPluginSettingsContainer Settings { get; set; } public void Register(IGitUICommands gitUiCommands) { // Register settings Settings.AddSetting("Enabled (true / false)", "false"); Settings.AddSetting("Path to msbuild.exe", FindMsBuild()); Settings.AddSetting("msbuild.exe arguments", "/p:Configuration=Debug"); // Connect to events gitUiCommands.PostUpdateSubmodules += GitUiCommandsPostUpdateSubmodules; } public void Execute(GitUIBaseEventArgs e) { // Only build when plugin is enabled if (string.IsNullOrEmpty(e.GitWorkingDir)) return; var arguments = Settings.GetSetting("msbuild.exe arguments"); var msbuildpath = Settings.GetSetting("Path to msbuild.exe"); var workingDir = new DirectoryInfo(e.GitWorkingDir); var solutionFiles = workingDir.GetFiles("*.sln", SearchOption.AllDirectories); for (var n = solutionFiles.Length - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; var result = MessageBox.Show( string.Format("Do you want to build {0}?\n\n{1}", solutionFile.Name, SolutionFilesToString(solutionFiles)), "Build", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Cancel) return; if (result != DialogResult.Yes) continue; if (string.IsNullOrEmpty(msbuildpath) || !File.Exists(msbuildpath)) MessageBox.Show("Please enter correct MSBuild path in the plugin settings dialog and try again."); else e.GitUICommands.StartCommandLineProcessDialog(msbuildpath, solutionFile.FullName + " " + arguments); } } #endregion private static string FindMsBuild() { return File.Exists(MsBuildPath) ? MsBuildPath : ""; } /// <summary> /// Automaticly compile all solution files found in any submodule /// </summary> private void GitUiCommandsPostUpdateSubmodules(object sender, GitUIBaseEventArgs e) { if (Settings.GetSetting("Enabled (true / false)") .Equals("true", StringComparison.InvariantCultureIgnoreCase)) Execute(e); } private static string SolutionFilesToString(IList<FileInfo> solutionFiles) { var solutionString = new StringBuilder(); for (var n = solutionFiles.Count - 1; n > 0; n--) { var solutionFile = solutionFiles[n]; solutionString.Append(solutionFile.Name); solutionString.Append("\n"); } return solutionString.ToString(); } }
<<<<<<< Message.DefaultCellStyle.Font = SystemFonts.DefaultFont; Author.DefaultCellStyle.Font = SystemFonts.DefaultFont; Date.DefaultCellStyle.Font = SystemFonts.DefaultFont; NormalFont = SystemFonts.DefaultFont; HeadFont = new Font(NormalFont, FontStyle.Underline); ======= NormalFont = Revisions.Font; HeadFont = new Font(NormalFont, FontStyle.Bold); >>>>>>> Message.DefaultCellStyle.Font = SystemFonts.DefaultFont; Date.DefaultCellStyle.Font = SystemFonts.DefaultFont; NormalFont = SystemFonts.DefaultFont;
<<<<<<< private Task _loadThread; ======= >>>>>>> <<<<<<< ThreadHelper.JoinableTaskFactory.RunAsync( async () => ======= Action<FormGitStatistics> a = sender => { var (commitsPerUser, totalCommits) = CommitCounter.GroupAllCommitsByContributor(_module); _syncContext.Post(o => >>>>>>> ThreadHelper.JoinableTaskFactory.RunAsync( async () => <<<<<<< _loadThread = Task.Run(() => LoadLinesOfCode()); ======= Task.Factory.StartNew(LoadLinesOfCode); >>>>>>> Task.Run(() => LoadLinesOfCode());
<<<<<<< MulticolorBranches.Checked = Settings.MulticolorBranches; ColorTagLabel.BackColor = Settings.TagColor; ColorTagLabel.Text = Settings.TagColor.Name; ColorTagLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorTagLabel.BackColor); ColorBranchLabel.BackColor = Settings.BranchColor; ColorBranchLabel.Text = Settings.BranchColor.Name; ColorBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorBranchLabel.BackColor); ColorRemoteBranchLabel.BackColor = Settings.RemoteBranchColor; ColorRemoteBranchLabel.Text = Settings.RemoteBranchColor.Name; ColorRemoteBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorRemoteBranchLabel.BackColor); ColorOtherLabel.BackColor = Settings.OtherTagColor; ColorOtherLabel.Text = Settings.OtherTagColor.Name; ColorOtherLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorOtherLabel.BackColor); ColorAddedLineLabel.BackColor = Settings.DiffAddedColor; ColorAddedLineLabel.Text = Settings.DiffAddedColor.Name; ColorAddedLineLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorAddedLineLabel.BackColor); ColorAddedLineDiffLabel.BackColor = Settings.DiffAddedExtraColor; ColorAddedLineDiffLabel.Text = Settings.DiffAddedExtraColor.Name; ColorAddedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorAddedLineDiffLabel.BackColor); ColorRemovedLine.BackColor = Settings.DiffRemovedColor; ColorRemovedLine.Text = Settings.DiffRemovedColor.Name; ColorRemovedLine.ForeColor = ColorHelper.GetForeColorForBackColor(ColorRemovedLine.BackColor); ColorRemovedLineDiffLabel.BackColor = Settings.DiffRemovedExtraColor; ColorRemovedLineDiffLabel.Text = Settings.DiffRemovedExtraColor.Name; ColorRemovedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorRemovedLineDiffLabel.BackColor); ColorSectionLabel.BackColor = Settings.DiffSectionColor; ColorSectionLabel.Text = Settings.DiffSectionColor.Name; ColorSectionLabel.ForeColor = ColorHelper.GetForeColorForBackColor(ColorSectionLabel.BackColor); ======= Language.Items.Clear(); Language.Items.Add("English"); Language.Items.AddRange(Translator.GetAllTranslations()); Language.Text = Settings.Translation; _RevisionGraphColorLabel.BackColor = Settings.RevisionGraphColor; _RevisionGraphColorLabel.Text = Settings.RevisionGraphColor.Name; _RevisionGraphColorLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_RevisionGraphColorLabel.BackColor); _RevisionGraphColorSelected.BackColor = Settings.RevisionGraphColorSelected; _RevisionGraphColorSelected.Text = Settings.RevisionGraphColorSelected.Name; _RevisionGraphColorSelected.ForeColor = ColorHelper.GetForeColorForBackColor(_RevisionGraphColorSelected.BackColor); _ColorTagLabel.BackColor = Settings.TagColor; _ColorTagLabel.Text = Settings.TagColor.Name; _ColorTagLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorTagLabel.BackColor); _ColorBranchLabel.BackColor = Settings.BranchColor; _ColorBranchLabel.Text = Settings.BranchColor.Name; _ColorBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorBranchLabel.BackColor); _ColorRemoteBranchLabel.BackColor = Settings.RemoteBranchColor; _ColorRemoteBranchLabel.Text = Settings.RemoteBranchColor.Name; _ColorRemoteBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemoteBranchLabel.BackColor); _ColorOtherLabel.BackColor = Settings.OtherTagColor; _ColorOtherLabel.Text = Settings.OtherTagColor.Name; _ColorOtherLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorOtherLabel.BackColor); _ColorAddedLineLabel.BackColor = Settings.DiffAddedColor; _ColorAddedLineLabel.Text = Settings.DiffAddedColor.Name; _ColorAddedLineLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorAddedLineLabel.BackColor); _ColorAddedLineDiffLabel.BackColor = Settings.DiffAddedExtraColor; _ColorAddedLineDiffLabel.Text = Settings.DiffAddedExtraColor.Name; _ColorAddedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorAddedLineDiffLabel.BackColor); _ColorRemovedLine.BackColor = Settings.DiffRemovedColor; _ColorRemovedLine.Text = Settings.DiffRemovedColor.Name; _ColorRemovedLine.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemovedLine.BackColor); _ColorRemovedLineDiffLabel.BackColor = Settings.DiffRemovedExtraColor; _ColorRemovedLineDiffLabel.Text = Settings.DiffRemovedExtraColor.Name; _ColorRemovedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemovedLineDiffLabel.BackColor); _ColorSectionLabel.BackColor = Settings.DiffSectionColor; _ColorSectionLabel.Text = Settings.DiffSectionColor.Name; _ColorSectionLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorSectionLabel.BackColor); >>>>>>> Language.Items.Clear(); Language.Items.Add("English"); Language.Items.AddRange(Translator.GetAllTranslations()); Language.Text = Settings.Translation; MulticolorBranches.Checked = Settings.MulticolorBranches; _ColorTagLabel.BackColor = Settings.TagColor; _ColorTagLabel.Text = Settings.TagColor.Name; _ColorTagLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorTagLabel.BackColor); _ColorBranchLabel.BackColor = Settings.BranchColor; _ColorBranchLabel.Text = Settings.BranchColor.Name; _ColorBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorBranchLabel.BackColor); _ColorRemoteBranchLabel.BackColor = Settings.RemoteBranchColor; _ColorRemoteBranchLabel.Text = Settings.RemoteBranchColor.Name; _ColorRemoteBranchLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemoteBranchLabel.BackColor); _ColorOtherLabel.BackColor = Settings.OtherTagColor; _ColorOtherLabel.Text = Settings.OtherTagColor.Name; _ColorOtherLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorOtherLabel.BackColor); _ColorAddedLineLabel.BackColor = Settings.DiffAddedColor; _ColorAddedLineLabel.Text = Settings.DiffAddedColor.Name; _ColorAddedLineLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorAddedLineLabel.BackColor); _ColorAddedLineDiffLabel.BackColor = Settings.DiffAddedExtraColor; _ColorAddedLineDiffLabel.Text = Settings.DiffAddedExtraColor.Name; _ColorAddedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorAddedLineDiffLabel.BackColor); _ColorRemovedLine.BackColor = Settings.DiffRemovedColor; _ColorRemovedLine.Text = Settings.DiffRemovedColor.Name; _ColorRemovedLine.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemovedLine.BackColor); _ColorRemovedLineDiffLabel.BackColor = Settings.DiffRemovedExtraColor; _ColorRemovedLineDiffLabel.Text = Settings.DiffRemovedExtraColor.Name; _ColorRemovedLineDiffLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorRemovedLineDiffLabel.BackColor); _ColorSectionLabel.BackColor = Settings.DiffSectionColor; _ColorSectionLabel.Text = Settings.DiffSectionColor.Name; _ColorSectionLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_ColorSectionLabel.BackColor); <<<<<<< Settings.MulticolorBranches = MulticolorBranches.Checked; Settings.TagColor = ColorTagLabel.BackColor; Settings.BranchColor = ColorBranchLabel.BackColor; Settings.RemoteBranchColor = ColorRemoteBranchLabel.BackColor; Settings.OtherTagColor = ColorOtherLabel.BackColor; ======= Settings.RevisionGraphColor = _RevisionGraphColorLabel.BackColor; Settings.RevisionGraphColorSelected = _RevisionGraphColorSelected.BackColor; Settings.TagColor = _ColorTagLabel.BackColor; Settings.BranchColor = _ColorBranchLabel.BackColor; Settings.RemoteBranchColor = _ColorRemoteBranchLabel.BackColor; Settings.OtherTagColor = _ColorOtherLabel.BackColor; >>>>>>> Settings.MulticolorBranches = MulticolorBranches.Checked; Settings.TagColor = _ColorTagLabel.BackColor; Settings.BranchColor = _ColorBranchLabel.BackColor; Settings.RemoteBranchColor = _ColorRemoteBranchLabel.BackColor; Settings.OtherTagColor = _ColorOtherLabel.BackColor; <<<<<<< ======= private void label25_Click(object sender, EventArgs e) { ColorDialog colorDialog = new ColorDialog(); colorDialog.Color = _RevisionGraphColorLabel.BackColor; colorDialog.ShowDialog(); _RevisionGraphColorLabel.BackColor = colorDialog.Color; _RevisionGraphColorLabel.Text = colorDialog.Color.Name; _RevisionGraphColorLabel.ForeColor = ColorHelper.GetForeColorForBackColor(_RevisionGraphColorLabel.BackColor); } private void label25_Click_1(object sender, EventArgs e) { ColorDialog colorDialog = new ColorDialog(); colorDialog.Color = _RevisionGraphColorSelected.BackColor; colorDialog.ShowDialog(); _RevisionGraphColorSelected.BackColor = colorDialog.Color; _RevisionGraphColorSelected.Text = colorDialog.Color.Name; _RevisionGraphColorSelected.ForeColor = ColorHelper.GetForeColorForBackColor(_RevisionGraphColorSelected.BackColor); } >>>>>>>
<<<<<<< FillBuildReport(); // Ensure correct page visibility _formBrowseMenuCommands = new FormBrowseMenuCommands(this, aCommands, Module, RevisionGrid); ======= _formBrowseMenuCommands = new FormBrowseMenuCommands(this, RevisionGrid); >>>>>>> FillBuildReport(); // Ensure correct page visibility _formBrowseMenuCommands = new FormBrowseMenuCommands(this, RevisionGrid);
<<<<<<< string result; if (Settings.FollowRenamesInFileHistory) result = RunCachableCmd(Settings.GitCommand, "diff -M -z --name-status \"" + to + "\" \"" + from + "\""); else result = RunCachableCmd(Settings.GitCommand, "diff -z --name-status \"" + to + "\" \"" + from + "\""); ======= var result = RunCachableCmd(Settings.GitCommand, "diff -z --name-status \"" + to + "\" \"" + from + "\""); var files = result.Split(new[] { '\0', '\n' }, StringSplitOptions.RemoveEmptyEntries); var diffFiles = new List<GitItemStatus>(); for (int n = 0; n + 1 < files.Length; n = n + 2) { if (string.IsNullOrEmpty(files[n])) continue; diffFiles.Add( new GitItemStatus { Name = files[n + 1].Trim(), IsNew = files[n] == "A", IsChanged = files[n] == "M", IsDeleted = files[n] == "D", IsTracked = true }); } >>>>>>> string result; if (Settings.FollowRenamesInFileHistory) result = RunCachableCmd(Settings.GitCommand, "diff -M -z --name-status \"" + to + "\" \"" + from + "\""); else result = RunCachableCmd(Settings.GitCommand, "diff -z --name-status \"" + to + "\" \"" + from + "\""); <<<<<<< ======= public static List<GitItemStatus> GetModifiedFiles() { var status = RunCmd(Settings.GitCommand, "ls-files -z --modified --exclude-standard"); var statusStrings = status.Split(new[] { '\0', '\n' }, StringSplitOptions.RemoveEmptyEntries); var gitItemStatusList = new List<GitItemStatus>(); foreach (var statusString in statusStrings) { if (string.IsNullOrEmpty(statusString.Trim())) continue; gitItemStatusList.Add( new GitItemStatus { IsNew = false, IsChanged = true, IsDeleted = false, IsTracked = true, Name = statusString.Trim() }); } return gitItemStatusList; } >>>>>>> <<<<<<< return GetAllChangedFilesFromString(statusString, false); } ======= var statusStrings = status.Split(new[] { '\0', '\n' }, StringSplitOptions.RemoveEmptyEntries); >>>>>>> return GetAllChangedFilesFromString(statusString, false); } <<<<<<< return GetAllChangedFilesFromString(status, true); ======= var statusStrings = status.Split(new[] { '\0', '\n' }, StringSplitOptions.RemoveEmptyEntries); for (int n = 0; n + 1 < statusStrings.Length; n = n + 2) { if (string.IsNullOrEmpty(statusStrings[n])) continue; gitItemStatusList.Add( new GitItemStatus { Name = statusStrings[n + 1].Trim(), IsNew = statusStrings[n] == "A", IsChanged = statusStrings[n] == "M", IsDeleted = statusStrings[n] == "D", IsTracked = true }); } >>>>>>> return GetAllChangedFilesFromString(status, true);
<<<<<<< // settingsToolStripMenuItem1 // this.settingsToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.gitMaintenanceToolStripMenuItem, this.toolStripSeparator4, this.editgitignoreToolStripMenuItem1, this.editgitattributesToolStripMenuItem, this.editmailmapToolStripMenuItem, this.editbuildserverToolStripMenuItem, this.toolStripSeparator13, this.settingsToolStripMenuItem2}); this.settingsToolStripMenuItem1.Name = "settingsToolStripMenuItem1"; this.settingsToolStripMenuItem1.Size = new System.Drawing.Size(61, 20); this.settingsToolStripMenuItem1.Text = "Settings"; // ======= >>>>>>> <<<<<<< private ToolStripMenuItem reportAnIssueToolStripMenuItem; private ToolStripMenuItem editbuildserverToolStripMenuItem; private TabPage BuildReportTabPage; private WebBrowser BuildReportWebBrowser; ======= private ToolStripMenuItem reportAnIssueToolStripMenuItem; private ToolStripSeparator toolStripSeparator40; private ToolStripSeparator toolStripSeparator41; private ToolStripSeparator toolStripSeparator42; private ToolStripSeparator toolStripSeparator43; private ToolStripSeparator toolStripSeparator44; private ToolStripSeparator toolStripSeparator45; private ToolStripSeparator toolStripSeparator46; >>>>>>> private ToolStripMenuItem reportAnIssueToolStripMenuItem; private ToolStripMenuItem editbuildserverToolStripMenuItem; private TabPage BuildReportTabPage; private WebBrowser BuildReportWebBrowser; private ToolStripSeparator toolStripSeparator40; private ToolStripSeparator toolStripSeparator41; private ToolStripSeparator toolStripSeparator42; private ToolStripSeparator toolStripSeparator43; private ToolStripSeparator toolStripSeparator44; private ToolStripSeparator toolStripSeparator45; private ToolStripSeparator toolStripSeparator46;
<<<<<<< this.localChangesGB.Size = new System.Drawing.Size(391, 53); ======= this.localChangesGB.Size = new System.Drawing.Size(289, 51); this.localChangesGB.MaximumSize = new System.Drawing.Size(Screen.FromControl(this).Bounds.Width, 51); >>>>>>> this.localChangesGB.Size = new System.Drawing.Size(391, 53); this.localChangesGB.MaximumSize = new System.Drawing.Size(Screen.FromControl(this).Bounds.Width, 51); <<<<<<< this.tableLayoutPanel2.Controls.Add(this.chkSetLocalChangesActionAsDefault, 4, 0); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; ======= >>>>>>> this.tableLayoutPanel2.Controls.Add(this.chkSetLocalChangesActionAsDefault, 4, 0); <<<<<<< this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(487, 249); ======= this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 0F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(442, 249); >>>>>>> this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 0F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(487, 249);
<<<<<<< headers = {{ 'Authorization': 'Bearer ' + authToken, 'User-Agent': 'compute.rhino3d.py/' + __version__ }} r = requests.post(url+endpoint, data=postdata, headers=headers) ======= headers = {'Authorization': 'Bearer ' + authToken} r = requests.post(posturl, data=postdata, headers=headers) >>>>>>> headers = {{ 'Authorization': 'Bearer ' + authToken, 'User-Agent': 'compute.rhino3d.py/' + __version__ }} r = requests.post(posturl, data=postdata, headers=headers)
<<<<<<< if (commitSha1 == null || !_IsCommitInRevisionGrid(commitSha1)) { continue; } ======= if (commitSha1 == null || !_isCommitInRevisionGrid(commitSha1)) { return null; } >>>>>>> if (commitSha1 == null || !_isCommitInRevisionGrid(commitSha1)) { continue; } <<<<<<< buildDetails.Add(new BuildDetails { Id = version, BuildId = b["buildId"].ToObject<string>(), Branch = b["branch"].ToObject<string>(), CommitId = commitSha1, CommitHashList = new[] { commitSha1 }, Status = status, StartDate = b["started"] == null ? DateTime.MinValue : b["started"].ToObject<DateTime>(), BaseWebUrl = baseWebUrl, Url = WebSiteUrl + "/project/" + project.Id + "/build/" + version, BaseApiUrl = baseApiUrl, AppVeyorBuildReportUrl = baseApiUrl + "/build/" + version, PullRequestText = (pullRequestId != null ? " PR#" + pullRequestId.Value<string>() : string.Empty), Duration = duration, TestsResultText = string.Empty }); } return buildDetails; }); ======= return new BuildDetails { Id = version, BuildId = b["buildId"].ToObject<string>(), Branch = b["branch"].ToObject<string>(), CommitId = commitSha1, CommitHashList = new[] { commitSha1 }, Status = status, StartDate = b["started"]?.ToObject<DateTime>() ?? DateTime.MinValue, BaseWebUrl = baseWebUrl, Url = WebSiteUrl + "/project/" + project.Id + "/build/" + version, BaseApiUrl = baseApiUrl, AppVeyorBuildReportUrl = baseApiUrl + "/build/" + version, PullRequestText = pullRequestId != null ? " PR#" + pullRequestId.Value<string>() : string.Empty, Duration = duration, TestsResultText = string.Empty }; }) .Where(x => x != null) .ToList(); }, TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.AttachedToParent); return buildTask.Result.Where(b => b != null).ToList(); >>>>>>> buildDetails.Add(new BuildDetails { Id = version, BuildId = b["buildId"].ToObject<string>(), Branch = b["branch"].ToObject<string>(), CommitId = commitSha1, CommitHashList = new[] { commitSha1 }, Status = status, StartDate = b["started"] == null ? DateTime.MinValue : b["started"].ToObject<DateTime>(), BaseWebUrl = baseWebUrl, Url = WebSiteUrl + "/project/" + project.Id + "/build/" + version, BaseApiUrl = baseApiUrl, AppVeyorBuildReportUrl = baseApiUrl + "/build/" + version, PullRequestText = pullRequestId != null ? " PR#" + pullRequestId.Value<string>() : string.Empty, Duration = duration, TestsResultText = string.Empty }); } return buildDetails; });
<<<<<<< dontSetAsDefaultToolStripMenuItem.Checked = Settings.DonSetAsLastPullAction; //Close(); ======= dontSetAsDefaultToolStripMenuItem.Checked = Settings.DonSetAsLastPullAction; GitUICommands.Instance.BrowseInitialize += (a, b) => Initialize(); >>>>>>> dontSetAsDefaultToolStripMenuItem.Checked = Settings.DonSetAsLastPullAction; //Close(); GitUICommands.Instance.BrowseInitialize += (a, b) => Initialize(); <<<<<<< try { if (Settings.IconStyle.Equals("Cow", StringComparison.CurrentCultureIgnoreCase)) { using (var cow_moo = Properties.Resources.cow_moo) new System.Media.SoundPlayer(cow_moo).Play(); } } catch // This code is just for fun, we do not want the program to crash because of it. { } ======= try { if (Settings.PlaySpecialStartupSound) { new System.Media.SoundPlayer(Properties.Resources.cow_moo).Play(); } } catch // This code is just for fun, we do not want the program to crash because of it. { } >>>>>>> try { if (Settings.PlaySpecialStartupSound) { using (var cow_moo = Properties.Resources.cow_moo) new System.Media.SoundPlayer(cow_moo).Play(); } } catch // This code is just for fun, we do not want the program to crash because of it. { } <<<<<<< var command = string.Join(" ", "checkout", args, string.Format("\"{0}\"", toolStripItem.Text)); using (var form = new FormProcess(command)) form.ShowDialog(this); ======= var command = "checkout".Join(" ", args).Join(" ", string.Format("\"{0}\"", toolStripItem.Text)); var form = new FormProcess(command); form.ShowDialog(this); >>>>>>> var command = "checkout".Join(" ", args).Join(" ", string.Format("\"{0}\"", toolStripItem.Text)); using (var form = new FormProcess(command)) form.ShowDialog(this);
<<<<<<< public static Control FindFocusedControl(this ContainerControl container) { var control = container.ActiveControl; container = control as ContainerControl; if (container == null) return control; else return container.FindFocusedControl(); } ======= public static bool? GetNullableChecked(this CheckBox chx) { if (chx.CheckState == CheckState.Indeterminate) return null; else return chx.Checked; } public static void SetNullableChecked(this CheckBox chx, bool? Checked) { if (Checked.HasValue) chx.CheckState = Checked.Value ? CheckState.Checked : CheckState.Unchecked; else chx.CheckState = CheckState.Indeterminate; } >>>>>>> public static bool? GetNullableChecked(this CheckBox chx) { if (chx.CheckState == CheckState.Indeterminate) return null; else return chx.Checked; } public static void SetNullableChecked(this CheckBox chx, bool? Checked) { if (Checked.HasValue) chx.CheckState = Checked.Value ? CheckState.Checked : CheckState.Unchecked; else chx.CheckState = CheckState.Indeterminate; } public static Control FindFocusedControl(this ContainerControl container) { var control = container.ActiveControl; container = control as ContainerControl; if (container == null) return control; else return container.FindFocusedControl(); }
<<<<<<< TranslationString branchNewForRemote = new TranslationString("The branch you are about to push seems to be a new branch for the remote." + Environment.NewLine + "Are you sure you want to push this branch?"); ======= TranslationString pushToCaption = new TranslationString("Push to {0}"); >>>>>>> TranslationString branchNewForRemote = new TranslationString("The branch you are about to push seems to be a new branch for the remote." + Environment.NewLine + "Are you sure you want to push this branch?"); TranslationString pushToCaption = new TranslationString("Push to {0}");
<<<<<<< private System.Windows.Forms.CheckBox MulticolorBranches; ======= private System.Windows.Forms.TabPage TabPageGit; private System.Windows.Forms.GroupBox groupBox7; private System.Windows.Forms.Label label50; private System.Windows.Forms.GroupBox groupBox8; private System.Windows.Forms.Button otherHomeBrowse; private System.Windows.Forms.TextBox otherHomeDir; private System.Windows.Forms.RadioButton otherHome; private System.Windows.Forms.RadioButton userprofileHome; private System.Windows.Forms.RadioButton defaultHome; private System.Windows.Forms.Label label51; >>>>>>> private System.Windows.Forms.TabPage TabPageGit; private System.Windows.Forms.GroupBox groupBox7; private System.Windows.Forms.Label label50; private System.Windows.Forms.GroupBox groupBox8; private System.Windows.Forms.Button otherHomeBrowse; private System.Windows.Forms.TextBox otherHomeDir; private System.Windows.Forms.RadioButton otherHome; private System.Windows.Forms.RadioButton userprofileHome; private System.Windows.Forms.RadioButton defaultHome; private System.Windows.Forms.Label label51; private System.Windows.Forms.CheckBox MulticolorBranches;
<<<<<<< this.fileExplorerToolStripMenuItem.Size = new System.Drawing.Size(155, 22); ======= this.fileExplorerToolStripMenuItem.Size = new System.Drawing.Size(177, 22); this.fileExplorerToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.O))); >>>>>>> this.fileExplorerToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.fileExplorerToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.O)));
<<<<<<< var original = stream.Position; while (stream.Position < original + length) ======= long original = stream.Position; while (stream.Position < original + length.First) >>>>>>> var original = stream.Position; while (stream.Position < original + length.First) <<<<<<< var result = new StringBuilder("SNMP SEQUENCE: "); foreach (var item in _list) ======= var result = new StringBuilder("SNMP SEQUENCE: "); foreach (ISnmpData item in _list) >>>>>>> var result = new StringBuilder("SNMP SEQUENCE: "); foreach (var item in _list)
<<<<<<< /// <summary> /// Patches the checks for OuiAssistMode to include a check for OuiFileSelectSlot.ISubmenu as well. /// </summary> [MonoModCustomMethodAttribute("PatchOuiFileSelectSubmenuChecks")] class PatchOuiFileSelectSubmenuChecksAttribute : Attribute { }; ======= /// <summary> /// Patches the Fonts.Prepare method to also include custom fonts. /// </summary> [MonoModCustomMethodAttribute("PatchFontsPrepare")] class PatchFontsPrepareAttribute : Attribute { }; >>>>>>> /// <summary> /// Patches the checks for OuiAssistMode to include a check for OuiFileSelectSlot.ISubmenu as well. /// </summary> [MonoModCustomMethodAttribute("PatchOuiFileSelectSubmenuChecks")] class PatchOuiFileSelectSubmenuChecksAttribute : Attribute { }; /// Patches the Fonts.Prepare method to also include custom fonts. /// </summary> [MonoModCustomMethodAttribute("PatchFontsPrepare")] class PatchFontsPrepareAttribute : Attribute { }; <<<<<<< public static void PatchOuiFileSelectSubmenuChecks(MethodDefinition method, CustomAttribute attrib) { TypeDefinition t_ISubmenu = method.Module.GetType("Celeste.OuiFileSelectSlot/ISubmenu"); if (t_ISubmenu == null) return; // The routine is stored in a compiler-generated method. foreach (TypeDefinition nest in method.DeclaringType.NestedTypes) { if (!nest.Name.StartsWith("<" + method.Name + ">d__")) continue; method = nest.FindMethod("System.Boolean MoveNext()") ?? method; break; } ILProcessor il = method.Body.GetILProcessor(); Mono.Collections.Generic.Collection<Instruction> instrs = method.Body.Instructions; for (int instri = 0; instri < instrs.Count - 4; instri++) { if (instrs[instri].OpCode == OpCodes.Brtrue_S && instrs[instri + 1].OpCode == OpCodes.Ldarg_0 && instrs[instri + 2].OpCode == OpCodes.Ldfld && instrs[instri + 3].OpCode == OpCodes.Isinst && ((TypeDefinition) instrs[instri + 3].Operand).Name == "OuiAssistMode") { // gather some info FieldReference field = (FieldReference) instrs[instri + 2].Operand; Instruction branchTarget = (Instruction) instrs[instri].Operand; // then inject another similar check for ISubmenu instri++; instrs.Insert(instri++, il.Create(OpCodes.Ldarg_0)); instrs.Insert(instri++, il.Create(OpCodes.Ldfld, field)); instrs.Insert(instri++, il.Create(OpCodes.Isinst, t_ISubmenu)); instrs.Insert(instri++, il.Create(OpCodes.Brtrue_S, branchTarget)); } else if (instrs[instri].OpCode == OpCodes.Ldarg_0 && instrs[instri + 1].OpCode == OpCodes.Ldfld && instrs[instri + 2].OpCode == OpCodes.Isinst && ((TypeDefinition) instrs[instri + 2].Operand).Name == "OuiAssistMode" && instrs[instri + 3].OpCode == OpCodes.Brfalse_S) { // gather some info FieldReference field = (FieldReference) instrs[instri + 1].Operand; Instruction branchTarget = instrs[instri + 4]; // then inject another similar check for ISubmenu instri++; instrs.Insert(instri++, il.Create(OpCodes.Ldfld, field)); instrs.Insert(instri++, il.Create(OpCodes.Isinst, t_ISubmenu)); instrs.Insert(instri++, il.Create(OpCodes.Brtrue_S, branchTarget)); instrs.Insert(instri++, il.Create(OpCodes.Ldarg_0)); } } } ======= public static void PatchFontsPrepare(MethodDefinition method, CustomAttribute attrib) { MethodDefinition m_GetFiles = method.DeclaringType.FindMethod("System.String[] _GetFiles(System.String,System.String,System.IO.SearchOption)"); if (m_GetFiles == null) return; ILProcessor il = method.Body.GetILProcessor(); Mono.Collections.Generic.Collection<Instruction> instrs = method.Body.Instructions; for (int instri = 0; instri < instrs.Count; instri++) { if (instrs[instri].OpCode == OpCodes.Call && (instrs[instri].Operand as MethodReference).Name == "GetFiles") { instrs[instri].Operand = m_GetFiles; } } } >>>>>>> public static void PatchOuiFileSelectSubmenuChecks(MethodDefinition method, CustomAttribute attrib) { TypeDefinition t_ISubmenu = method.Module.GetType("Celeste.OuiFileSelectSlot/ISubmenu"); if (t_ISubmenu == null) return; // The routine is stored in a compiler-generated method. foreach (TypeDefinition nest in method.DeclaringType.NestedTypes) { if (!nest.Name.StartsWith("<" + method.Name + ">d__")) continue; method = nest.FindMethod("System.Boolean MoveNext()") ?? method; break; } ILProcessor il = method.Body.GetILProcessor(); Mono.Collections.Generic.Collection<Instruction> instrs = method.Body.Instructions; for (int instri = 0; instri < instrs.Count - 4; instri++) { if (instrs[instri].OpCode == OpCodes.Brtrue_S && instrs[instri + 1].OpCode == OpCodes.Ldarg_0 && instrs[instri + 2].OpCode == OpCodes.Ldfld && instrs[instri + 3].OpCode == OpCodes.Isinst && ((TypeDefinition) instrs[instri + 3].Operand).Name == "OuiAssistMode") { // gather some info FieldReference field = (FieldReference) instrs[instri + 2].Operand; Instruction branchTarget = (Instruction) instrs[instri].Operand; // then inject another similar check for ISubmenu instri++; instrs.Insert(instri++, il.Create(OpCodes.Ldarg_0)); instrs.Insert(instri++, il.Create(OpCodes.Ldfld, field)); instrs.Insert(instri++, il.Create(OpCodes.Isinst, t_ISubmenu)); instrs.Insert(instri++, il.Create(OpCodes.Brtrue_S, branchTarget)); } else if (instrs[instri].OpCode == OpCodes.Ldarg_0 && instrs[instri + 1].OpCode == OpCodes.Ldfld && instrs[instri + 2].OpCode == OpCodes.Isinst && ((TypeDefinition) instrs[instri + 2].Operand).Name == "OuiAssistMode" && instrs[instri + 3].OpCode == OpCodes.Brfalse_S) { // gather some info FieldReference field = (FieldReference) instrs[instri + 1].Operand; Instruction branchTarget = instrs[instri + 4]; // then inject another similar check for ISubmenu instri++; instrs.Insert(instri++, il.Create(OpCodes.Ldfld, field)); instrs.Insert(instri++, il.Create(OpCodes.Isinst, t_ISubmenu)); instrs.Insert(instri++, il.Create(OpCodes.Brtrue_S, branchTarget)); instrs.Insert(instri++, il.Create(OpCodes.Ldarg_0)); } } } public static void PatchFontsPrepare(MethodDefinition method, CustomAttribute attrib) { MethodDefinition m_GetFiles = method.DeclaringType.FindMethod("System.String[] _GetFiles(System.String,System.String,System.IO.SearchOption)"); if (m_GetFiles == null) return; ILProcessor il = method.Body.GetILProcessor(); Mono.Collections.Generic.Collection<Instruction> instrs = method.Body.Instructions; for (int instri = 0; instri < instrs.Count; instri++) { if (instrs[instri].OpCode == OpCodes.Call && (instrs[instri].Operand as MethodReference).Name == "GetFiles") { instrs[instri].Operand = m_GetFiles; } } }
<<<<<<< using Orleans.Runtime.Configuration; using System.Collections.Generic; ======= using System; using System.Collections.Generic; >>>>>>> using System; using System.Collections.Generic; using Orleans.Runtime.Configuration; using System.Collections.Generic; <<<<<<< public static void RegisterDashboard(this GlobalConfiguration config, int port = 8080, string username = null, string password = null) { var settings = new Dictionary<string, string>(); settings.Add("Port", port.ToString()); if (!string.IsNullOrWhiteSpace(username) && !string.IsNullOrWhiteSpace(password)) { settings.Add("Username", username); settings.Add("Password", password); } config.RegisterBootstrapProvider<Dashboard>("Dashboard", settings); } ======= public static double SumZero<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) { if (!source.Any()) return 0; return source.Sum(selector); } public static long SumZero<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) { if (!source.Any()) return 0; return source.Sum(selector); } public static double AverageZero<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) { if (!source.Any()) return 0; return source.Average(selector); } public static string ToSiloAddress(this string value) { var parts = value.Split(':'); return $"{parts[0].Substring(1)}:{parts[1]}@{parts[2]}"; } >>>>>>> public static double SumZero<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) { if (!source.Any()) return 0; return source.Sum(selector); } public static long SumZero<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) { if (!source.Any()) return 0; return source.Sum(selector); } public static double AverageZero<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) { if (!source.Any()) return 0; return source.Average(selector); } public static string ToSiloAddress(this string value) { var parts = value.Split(':'); return $"{parts[0].Substring(1)}:{parts[1]}@{parts[2]}"; } public static void RegisterDashboard(this GlobalConfiguration config, int port = 8080, string username = null, string password = null) { var settings = new Dictionary<string, string>(); settings.Add("Port", port.ToString()); if (!string.IsNullOrWhiteSpace(username) && !string.IsNullOrWhiteSpace(password)) { settings.Add("Username", username); settings.Add("Password", password); } config.RegisterBootstrapProvider<Dashboard>("Dashboard", settings); }
<<<<<<< else if (e.PropertyName == Map.IndoorEnabledProperty.PropertyName) { UpdateHasIndoorEnabled(); } ======= else if (e.PropertyName == Map.PaddingProperty.PropertyName) { UpdatePadding(); } >>>>>>> else if (e.PropertyName == Map.IndoorEnabledProperty.PropertyName) { UpdateHasIndoorEnabled(); } else if (e.PropertyName == Map.PaddingProperty.PropertyName) { UpdatePadding(); }
<<<<<<< ======= // Screen fade logic int animationTick = 0; int animationLength = 20; bool animationStarted = false; >>>>>>> <<<<<<< foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>())) a.traits.Get<ChronoshiftPaletteEffect>().DoChronoshift(); ======= // Start the screen-fade animation animationStarted = true; // Play chronosphere active anim var chronosphere = Game.world.Actors.Where(a => a.Owner == order.Subject.Owner && a.traits.Contains<Chronosphere>()).FirstOrDefault(); if (chronosphere != null) chronosphere.traits.Get<RenderBuilding>().PlayCustomAnim(chronosphere, "active"); >>>>>>> foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>())) a.traits.Get<ChronoshiftPaletteEffect>().DoChronoshift(); // Play chronosphere active anim var chronosphere = Game.world.Actors.Where(a => a.Owner == order.Subject.Owner && a.traits.Contains<Chronosphere>()).FirstOrDefault(); if (chronosphere != null) chronosphere.traits.Get<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
<<<<<<< var mobile = unit.traits.Get<Mobile>(); mobile.facing = 128; mobile.QueueAction( new Traits.Mobile.MoveTo( unit.Location + new int2( 0, 3 ) ) ); world.AddFrameEndTask(_ => world.Add(unit)); // todo: make the producing building play `build` } ======= unit.Order(unit.Location + new int2(0, 3)).Apply(false); world.AddFrameEndTask(_ => world.Add(unit)); // todo: make the producing building play `build` if (producer.traits.Contains<RenderWarFactory>()) producer.traits.Get<RenderWarFactory>().EjectUnit(); } >>>>>>> var mobile = unit.traits.Get<Mobile>(); mobile.facing = 128; mobile.QueueAction( new Traits.Mobile.MoveTo( unit.Location + new int2( 0, 3 ) ) ); world.AddFrameEndTask(_ => world.Add(unit)); // todo: make the producing building play `build` if (producer.traits.Contains<RenderWarFactory>()) producer.traits.Get<RenderWarFactory>().EjectUnit(); }
<<<<<<< //readonly SpriteHelper sh; //readonly FontHelper fhDebug, fhTitle; ======= readonly SpriteHelper sh; readonly Font fDebug, fTitle; Sheet textSheet; SpriteRenderer rgbaRenderer; Sprite textSprite; >>>>>>> readonly Font fDebug, fTitle; Sheet textSheet; SpriteRenderer rgbaRenderer; Sprite textSprite; <<<<<<< //sh = new SpriteHelper(device); //fhDebug = new FontHelper(device, "Tahoma", 10, false); //fhTitle = new FontHelper(device, "Tahoma", 10, true); ======= //sh = new SpriteHelper(device); fDebug = new Font("Tahoma", 10, FontStyle.Regular); fTitle = new Font("Tahoma", 10, FontStyle.Bold); textSheet = new Sheet(this, new Size(256, 256)); rgbaRenderer = new SpriteRenderer(this, true, RgbaSpriteShader); textSprite = new Sprite(textSheet, new Rectangle(0, 0, 256, 256), TextureChannel.Alpha); } Bitmap RenderTextToBitmap(string s, Font f, Color c) { Bitmap b = new Bitmap(256, 256); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(b); g.DrawString(s, f, new SolidBrush(c), 0, 0); g.Flush(); g.Dispose(); return b; } int2 GetTextSize(string s, Font f) { Bitmap b = new Bitmap(1,1); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(b); return new int2(g.MeasureString(s, f).ToSize()); >>>>>>> fDebug = new Font("Tahoma", 10, FontStyle.Regular); fTitle = new Font("Tahoma", 10, FontStyle.Bold); textSheet = new Sheet(this, new Size(256, 256)); rgbaRenderer = new SpriteRenderer(this, true, RgbaSpriteShader); textSprite = new Sprite(textSheet, new Rectangle(0, 0, 256, 256), TextureChannel.Alpha); } Bitmap RenderTextToBitmap(string s, Font f, Color c) { Bitmap b = new Bitmap(256, 256); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(b); g.DrawString(s, f, new SolidBrush(c), 0, 0); g.Flush(); g.Dispose(); return b; } int2 GetTextSize(string s, Font f) { Bitmap b = new Bitmap(1,1); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(b); return new int2(g.MeasureString(s, f).ToSize()); <<<<<<< //sh.Begin(); //fhDebug.Draw(sh, text, pos.X, pos.Y, c.ToArgb()); //sh.End(); ======= Bitmap b = RenderTextToBitmap(text, fDebug, c); textSheet.Texture.SetData(b); rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome"); rgbaRenderer.Flush(); >>>>>>> Bitmap b = RenderTextToBitmap(text, fDebug, c); textSheet.Texture.SetData(b); rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome"); rgbaRenderer.Flush(); <<<<<<< //sh.Begin(); //fhTitle.Draw(sh, text, pos.X, pos.Y, c.ToArgb()); //sh.End(); ======= Bitmap b = RenderTextToBitmap(text, fTitle, c); textSheet.Texture.SetData(b); rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome"); rgbaRenderer.Flush(); >>>>>>> Bitmap b = RenderTextToBitmap(text, fTitle, c); textSheet.Texture.SetData(b); rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome"); rgbaRenderer.Flush(); <<<<<<< return new int2(20,20);//fhDebug.MeasureText(sh, text)); ======= return GetTextSize(text, fDebug); >>>>>>> return GetTextSize(text, fDebug); <<<<<<< return new int2(20,20);//fhTitle.MeasureText(sh, text)); ======= return GetTextSize(text, fTitle); >>>>>>> return GetTextSize(text, fTitle);
<<<<<<< public AddCommandCommand(IRepository repository, List<IBotCommand> allCommands) : base(repository, UserRole.Mod) ======= public AddCommandCommand(IRepository repository) : base(UserRole.Mod, "AddCommand", "CommandAdd") >>>>>>> public AddCommandCommand(IRepository repository) : base(repository, UserRole.Mod)
<<<<<<< builder.RegisterType<TopBallersCommand>().AsImplementedInterfaces().SingleInstance(); ======= builder.RegisterType<ScheduleCommand>().AsImplementedInterfaces().SingleInstance(); >>>>>>> builder.RegisterType<TopBallersCommand>().AsImplementedInterfaces().SingleInstance(); builder.RegisterType<ScheduleCommand>().AsImplementedInterfaces().SingleInstance();
<<<<<<< modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.AliasEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<Guid?>("CommandId"); b.Property<string>("Word"); b.HasKey("Id"); b.HasIndex("CommandId"); b.HasIndex("Word") .IsUnique() .HasFilter("[Word] IS NOT NULL"); b.ToTable("AliasEntity"); }); modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.BlastTypeEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<string>("ImagePath"); b.Property<string>("Message"); b.Property<string>("Name"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() .HasFilter("[Name] IS NOT NULL"); b.ToTable("BlastTypes"); }); ======= modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.BlastTypeEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<string>("ImagePath"); b.Property<string>("Message"); b.Property<string>("Name"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() .HasFilter("[Name] IS NOT NULL"); b.ToTable("BlastTypes"); }); >>>>>>> modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.AliasEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<Guid?>("CommandId"); b.Property<string>("Word"); b.HasKey("Id"); b.HasIndex("CommandId"); b.HasIndex("Word") .IsUnique() .HasFilter("[Word] IS NOT NULL"); b.ToTable("AliasEntity"); }); modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.BlastTypeEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<string>("ImagePath"); b.Property<string>("Message"); b.Property<string>("Name"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() .HasFilter("[Name] IS NOT NULL"); b.ToTable("BlastTypes"); }); <<<<<<< ======= modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.CommandWordEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<string>("CommandWord"); b.Property<string>("FullTypeName"); b.Property<bool>("IsPrimary"); b.HasKey("Id"); b.HasIndex("CommandWord") .IsUnique() .HasFilter("[CommandWord] IS NOT NULL"); b.ToTable("CommandWords"); }); >>>>>>> modelBuilder.Entity("DevChatter.Bot.Core.Data.Model.CommandWordEntity", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<string>("CommandWord"); b.Property<string>("FullTypeName"); b.Property<bool>("IsPrimary"); b.HasKey("Id"); b.HasIndex("CommandWord") .IsUnique() .HasFilter("[CommandWord] IS NOT NULL"); b.ToTable("CommandWords"); });
<<<<<<< using System.Collections.Generic; using System.Linq; ======= using System; using System.Collections.Generic; using System.Collections.Immutable; using Autofac; >>>>>>> using Autofac;
<<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, null); return _sharpBucketV2.Get(new Repository(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, null); return _sharpBucketV2.Get<Repository>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, null); return _sharpBucketV2.Get<Repository>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, null); return _sharpBucketV2.Delete(new Repository(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, null); return _sharpBucketV2.Delete<Repository>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, null); return _sharpBucketV2.Delete<Repository>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/"); return _sharpBucketV2.Get(new PullRequest(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/"); return _sharpBucketV2.Get<PullRequest>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/"); return _sharpBucketV2.Get<PullRequest>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/approve/"); return _sharpBucketV2.Post(new PullRequestInfo(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/approve/"); return _sharpBucketV2.Post<PullRequestInfo>(null, overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/approve/"); return _sharpBucketV2.Post<PullRequestInfo>(null, overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/approve/"); return _sharpBucketV2.Delete(new PullRequestInfo(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/approve/"); return _sharpBucketV2.Delete<PullRequestInfo>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/approve/"); return _sharpBucketV2.Delete<PullRequestInfo>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/diff/"); return _sharpBucketV2.Get(new Object(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/diff/"); return _sharpBucketV2.Get(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/diff/"); return _sharpBucketV2.Get(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/merge/"); return _sharpBucketV2.Post(new Merge(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/merge/"); return _sharpBucketV2.Post<Merge>(null, overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/merge/"); return _sharpBucketV2.Post<Merge>(null, overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/decline/"); return _sharpBucketV2.Post(new PullRequest(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/decline/"); return _sharpBucketV2.Post<PullRequest>(null, overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/decline/"); return _sharpBucketV2.Post<PullRequest>(null, overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/comments/{commentId}/"); return _sharpBucketV2.Get(new Comment(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "pullrequests/" + pullRequestId + "/comments/" + commentId + "/"); return _sharpBucketV2.Get<Comment>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"pullrequests/{pullRequestId}/comments/{commentId}/"); return _sharpBucketV2.Get<Comment>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"branch-restrictions/{restrictionId}"); return _sharpBucketV2.Get(new BranchRestriction(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "branch-restrictions/" + restrictionId); return _sharpBucketV2.Get<BranchRestriction>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"branch-restrictions/{restrictionId}"); return _sharpBucketV2.Get<BranchRestriction>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"branch-restrictions/{restrictionId}"); return _sharpBucketV2.Delete(new BranchRestriction(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "branch-restrictions/" + restrictionId); return _sharpBucketV2.Delete<BranchRestriction>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"branch-restrictions/{restrictionId}"); return _sharpBucketV2.Delete<BranchRestriction>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"diff/{options}"); return _sharpBucketV2.Get(new object(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "diff/" + options); return _sharpBucketV2.Get(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"diff/{options}"); return _sharpBucketV2.Get(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"patch/{options}"); return _sharpBucketV2.Get(new object(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "patch/" + options); return _sharpBucketV2.Get(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"patch/{options}"); return _sharpBucketV2.Get(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}"); return _sharpBucketV2.Get(new Commit(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "commit/" + revision); return _sharpBucketV2.Get<Commit>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}"); return _sharpBucketV2.Get<Commit>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"commits/{revision}/comments/{revision}/{commentId}/"); return _sharpBucketV2.Get(new Comment(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "commits/" + revision + "/comments/" + revision + "/" + commentId + "/"); return _sharpBucketV2.Get<Comment>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"commits/{revision}/comments/{revision}/{commentId}/"); return _sharpBucketV2.Get<Comment>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/approve/"); return _sharpBucketV2.Post(new UserRole(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "commit/" + revision + "/approve/"); return _sharpBucketV2.Post<UserRole>(null, overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/approve/"); return _sharpBucketV2.Post<UserRole>(null, overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/approve/"); _sharpBucketV2.Delete(new object(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "commit/" + revision + "/approve/"); _sharpBucketV2.Delete<object>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/approve/"); _sharpBucketV2.Delete<object>(overrideUrl); <<<<<<< var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/statuses/build/" + key); return _sharpBucketV2.Get(new BuildInfo(), overrideUrl); ======= var overrideUrl = GetRepositoryUrl(accountName, repository, "commit/" + revision + "/statuses/build/" + key); return _sharpBucketV2.Get<BuildInfo>(overrideUrl); >>>>>>> var overrideUrl = GetRepositoryUrl(accountName, slug, $"commit/{revision}/statuses/build/" + key); return _sharpBucketV2.Get<BuildInfo>(overrideUrl);
<<<<<<< MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, (GameState.SE.CurrentSecond - GameState.SE.lastTick), ErrorMessage); ======= MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, MissileGroups[loop].contact.Position.System, MissileGroups[loop].contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); >>>>>>> MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); <<<<<<< MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, (GameState.SE.CurrentSecond - GameState.SE.lastTick), ErrorMessage); ======= MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, MissileGroups[loop].contact.Position.System, MissileGroups[loop].contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); >>>>>>> MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); <<<<<<< if (System.FactionDetectionLists[FactionID].Active[loop2] != CurrentSecond && CurrentTaskGroup.ActiveSensorQue.Count > 0) ======= if (System.FactionDetectionLists[FactionID].Active[loop2] != GameState.Instance.CurrentSecond && TaskGroups[loop].ActiveSensorQue.Count > 0) >>>>>>> if (System.FactionDetectionLists[FactionID].Active[loop2] != GameState.Instance.CurrentSecond && CurrentTaskGroup.ActiveSensorQue.Count > 0) <<<<<<< MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, (GameState.SE.CurrentSecond - GameState.SE.lastTick), ErrorMessage); ======= MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, MissileGroups[loop].contact.Position.System, MissileGroups[loop].contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); >>>>>>> MessageEntry NMsg = new MessageEntry(MessageEntry.MessageType.Error, CurrentTaskGroup.Contact.Position.System, CurrentTaskGroup.Contact, GameState.Instance.GameDateTime, GameState.Instance.LastTimestep, ErrorMessage); <<<<<<< if (System.FactionDetectionLists[FactionID].Active[loop2] != CurrentSecond && CurrentTaskGroup.ActiveSensorQue.Count > 0) ======= if (System.FactionDetectionLists[FactionID].Active[loop2] != GameState.Instance.CurrentSecond && TaskGroups[loop].ActiveSensorQue.Count > 0) >>>>>>> if (System.FactionDetectionLists[FactionID].Active[loop2] != GameState.Instance.CurrentSecond && CurrentTaskGroup.ActiveSensorQue.Count > 0)
<<<<<<< int targetIndex = _moveTargetList.SelectedIndex; ======= if (_starSystems.SelectedIndex == -1) //if b is not a valid selection return; int targetIndex = _targetList.SelectedIndex; >>>>>>> if (_starSystems.SelectedIndex == -1) //if b is not a valid selection return; int targetIndex = _moveTargetList.SelectedIndex;
<<<<<<< public CustomApiService(ConfigWrapper options, IWorkingHoursService workingHoursService) ======= public CustomApiService(BaseConfig options) >>>>>>> public CustomApiService(BaseConfig options, IWorkingHoursService workingHoursService)
<<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); var model = await Task.Run(() => _shoppingCartViewModelService.PrepareOrderTotals(cart, isEditable)); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); var model = await _shoppingCartViewModelService.PrepareOrderTotals(cart, isEditable); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); var model = await _shoppingCartViewModelService.PrepareOrderTotals(cart, isEditable);
<<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart); <<<<<<< _workContext.CurrentCustomer = _customerService.GetCustomerById(_workContext.CurrentCustomer.Id); cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= _workContext.CurrentCustomer = await _customerService.GetCustomerById(_workContext.CurrentCustomer.Id); cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> _workContext.CurrentCustomer = await _customerService.GetCustomerById(_workContext.CurrentCustomer.Id); cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var item = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart) .FirstOrDefault(sci => sci.Id == id); ======= var item = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => (sci.ShoppingCartType == ShoppingCartType.ShoppingCart) && sci.Id == id) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .FirstOrDefault(); >>>>>>> var item = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart) .FirstOrDefault(sci => sci.Id == id); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id).ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); _shoppingCartViewModelService.PrepareShoppingCart(model, cart); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); await _shoppingCartViewModelService.PrepareShoppingCart(model, cart); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions); await _shoppingCartViewModelService.PrepareShoppingCart(model, cart); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var cart = customer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var cart = customer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< var pageCart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var pageCart = pageCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var pageCart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var cart = pageCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); <<<<<<< var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist); ======= var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.Wishlist) .LimitPerStore(_shoppingCartSettings.CartsSharedBetweenStores, _storeContext.CurrentStore.Id) .ToList(); >>>>>>> var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.Wishlist);
<<<<<<< ILanguageService languageService, ILocalizationService localizationService, IMessageTokenProvider messageTokenProvider, IPermissionService permissionService, ======= ILanguageService languageService, ILocalizationService localizationService, IMessageTokenProvider messageTokenProvider, >>>>>>> ILanguageService languageService, ILocalizationService localizationService, IMessageTokenProvider messageTokenProvider, <<<<<<< ======= public IActionResult TestTemplate(string id, string languageId = "") { var messageTemplate = _messageTemplateService.GetMessageTemplateById(id); if (messageTemplate == null) //No message template found with the specified id return RedirectToAction("List"); var model = new TestMessageTemplateModel { Id = messageTemplate.Id, LanguageId = languageId }; var tokens = _messageTokenProvider.GetListOfAllowedTokens().Distinct().ToList(); //filter them to the current template var subject = messageTemplate.GetLocalized(mt => mt.Subject, languageId); var body = messageTemplate.GetLocalized(mt => mt.Body, languageId); tokens = tokens.Where(x => subject.Contains(x) || body.Contains(x)).ToList(); model.Tokens = tokens; return View(model); } [HttpPost, ActionName("TestTemplate")] [FormValueRequired("send-test")] public IActionResult TestTemplate(TestMessageTemplateModel model, IFormCollection form) { var messageTemplate = _messageTemplateService.GetMessageTemplateById(model.Id); if (messageTemplate == null) //No message template found with the specified id return RedirectToAction("List"); var tokens = new List<Token>(); foreach (var formKey in form.Keys) if (formKey.StartsWith("token_", StringComparison.OrdinalIgnoreCase)) { var tokenKey = formKey.Substring("token_".Length).Replace("%", ""); var tokenValue = form[formKey]; tokens.Add(new Token(tokenKey, tokenValue)); } _workflowMessageService.SendTestEmail(messageTemplate.Id, model.SendTo, tokens, model.LanguageId); if (ModelState.IsValid) { SuccessNotification(_localizationService.GetResource("Admin.ContentManagement.MessageTemplates.Test.Success")); } return RedirectToAction("Edit", new {id = messageTemplate.Id}); } >>>>>>>
<<<<<<< using Telerik.Sitefinity.Modules.Blogs; ======= using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes; >>>>>>> using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes; using Telerik.Sitefinity.Modules.Blogs;
<<<<<<< /// <summary> /// Gets the selector items. /// </summary> /// <value>The selector items.</value> public ICollection<HtmlAnchor> SelectorItems { get { return this.Find.AllByExpression<HtmlAnchor>("ng-repeat=item in items"); } } /// <summary> /// Gets the search input. /// </summary> /// <value>The search input.</value> public HtmlInputText SearchInput { get { return this.Get<HtmlInputText>("ng-model=filter.search"); } } ======= /// <summary> /// Gets search div. /// </summary> public HtmlDiv SearchByTypingDiv { get { return this.Get<HtmlDiv>("tagname=div", "class=input-group m-bottom-sm"); } } /// <summary> /// Gets no items div. /// </summary> public HtmlDiv NoItemsFoundDiv { get { return this.Get<HtmlDiv>("tagname=div", "InnerText=No items found"); } } >>>>>>> /// <summary> /// Gets search div. /// </summary> public HtmlDiv SearchByTypingDiv { get { return this.Get<HtmlDiv>("tagname=div", "class=input-group m-bottom-sm"); } } /// <summary> /// Gets no items div. /// </summary> public HtmlDiv NoItemsFoundDiv { get { return this.Get<HtmlDiv>("tagname=div", "InnerText=No items found"); } } /// <summary> /// Gets the selector items. /// </summary> /// <value>The selector items.</value> public ICollection<HtmlAnchor> SelectorItems { get { return this.Find.AllByExpression<HtmlAnchor>("ng-repeat=item in items"); } } /// <summary> /// Gets the search input. /// </summary> /// <value>The search input.</value> public HtmlInputText SearchInput { get { return this.Get<HtmlInputText>("ng-model=filter.search"); } }
<<<<<<< public bool SendEmailOnSuccess { get; set; } /// <inheritDoc/> public ActivationMethod ActivationMethod { get; set; } /// <inheritDoc/> ======= public string SuccessfulRegistrationMsg { get; set; } /// <inheritDoc/> public Guid? SuccessfulRegistrationPageId { get; set; } /// <inheritDoc/> >>>>>>> public bool SendEmailOnSuccess { get; set; } /// <inheritDoc/> public ActivationMethod ActivationMethod { get; set; } /// <inheritDoc/> public string SuccessfulRegistrationMsg { get; set; } /// <inheritDoc/> public Guid? SuccessfulRegistrationPageId { get; set; } /// <inheritDoc/>
<<<<<<< #endregion /// <summary> /// Sets the e-tag value /// </summary> /// <param name="value">The e-tag value</param> /// <returns>A CouchRequest with the new e-tag value</returns> public CouchRequest Etag(string value) ======= public ICouchRequest Etag(string value) >>>>>>> #endregion /// <summary> /// Sets the e-tag value /// </summary> /// <param name="value">The e-tag value</param> /// <returns>A CouchRequest with the new e-tag value</returns> public ICouchRequest Etag(string value) <<<<<<< /// <summary> /// Sets the absolute path in the query /// </summary> /// <param name="name">The absolute path</param> /// <returns>A <see cref="CouchRequest"/> with the new path set.</returns> public CouchRequest Path(string name) ======= public ICouchRequest Path(string name) >>>>>>> /// <summary> /// Sets the absolute path in the query /// </summary> /// <param name="name">The absolute path</param> /// <returns>A <see cref="CouchRequest"/> with the new path set.</returns> public ICouchRequest Path(string name) <<<<<<< /// <summary> /// Sets the raw query information in the request. Don't forget to start with a question mark (?). /// </summary> /// <param name="value">The raw query</param> /// <returns>A <see cref="CouchRequest"/> with the new query set.</returns> public CouchRequest Query(string value) ======= public ICouchRequest Query(string name) >>>>>>> /// <summary> /// Sets the raw query information in the request. Don't forget to start with a question mark (?). /// </summary> /// <param name="value">The raw query</param> /// <returns>A <see cref="CouchRequest"/> with the new query set.</returns> public ICouchRequest Query(string value)
<<<<<<< //TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock)] ======= TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock), Telerik.TestUI.Core.Attributes.KnownIssue(BugId = 210190)] >>>>>>> //TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock), Telerik.TestUI.Core.Attributes.KnownIssue(BugId = 210190)]
<<<<<<< /// <summary> /// word: Roles /// </summary> /// <value>Roles</value> [ResourceEntry("Roles", Value = "Roles", Description = "word: Roles", LastModified = "2015/03/03")] public string Roles { get { return this["Roles"]; } } /// <summary> /// phrase: which the user will be assigned to /// </summary> /// <value>which the user will be assigned to</value> [ResourceEntry("RolesDescription", Value = "which the user will be assigned to", Description = "phrase: which the user will be assigned to", LastModified = "2015/03/03")] public string RolesDescription { get { return this["RolesDescription"]; } } ======= /// <summary> /// phrase: Back to Login /// </summary> [ResourceEntry("BackToLogin", Value = "Back to Login", Description = "Back to Login", LastModified = "2015/03/03")] public string BackToLogin { get { return this["BackToLogin"]; } } >>>>>>> /// <summary> /// word: Roles /// </summary> /// <value>Roles</value> [ResourceEntry("Roles", Value = "Roles", Description = "word: Roles", LastModified = "2015/03/03")] public string Roles { get { return this["Roles"]; } } /// <summary> /// phrase: which the user will be assigned to /// </summary> /// <value>which the user will be assigned to</value> [ResourceEntry("RolesDescription", Value = "which the user will be assigned to", Description = "phrase: which the user will be assigned to", LastModified = "2015/03/03")] public string RolesDescription { get { return this["RolesDescription"]; } } /// <summary> /// phrase: Back to Login /// </summary> [ResourceEntry("BackToLogin", Value = "Back to Login", Description = "Back to Login", LastModified = "2015/03/03")] public string BackToLogin { get { return this["BackToLogin"]; } }
<<<<<<< CommentsAllowSubscription = this.ThreadConfig.AllowSubscription && this.ThreadIsClosed, ======= CommentDateTimeFormatString = this.DateTimeFormatString, CommentsAllowSubscription = this.ThreadConfig.AllowSubscription && !this.ThreadIsClosed, >>>>>>> CommentsAllowSubscription = this.ThreadConfig.AllowSubscription && !this.ThreadIsClosed,
<<<<<<< /// <summary> /// Gets word: URL /// </summary> [ResourceEntry("Url", Value = "URL", Description = "word : URL", LastModified = "2015/04/27")] public string Url { get { return this["Url"]; } } ======= /// <summary> /// Gets phrase : Write CSS /// </summary> [ResourceEntry("WriteCss", Value = "Write CSS", Description = "phrase : Write CSS", LastModified = "2015/04/27")] public string WriteCss { get { return this["WriteCss"]; } } /// <summary> /// Gets phrase : Link to CSS file /// </summary> [ResourceEntry("LinkToCssFile", Value = "Link to CSS file", Description = "phrase : Link to CSS file", LastModified = "2015/04/27")] public string LinkToCssFile { get { return this["LinkToCssFile"]; } } /// <summary> /// Gets phrase : Media /// </summary> [ResourceEntry("Media", Value = "Media", Description = "phrase : Media", LastModified = "2015/04/27")] public string Media { get { return this["Media"]; } } /// <summary> /// Gets phrase : All /// </summary> [ResourceEntry("All", Value = "All", Description = "phrase : All", LastModified = "2015/04/27")] public string All { get { return this["All"]; } } /// <summary> /// Gets phrase : Select media types... /// </summary> [ResourceEntry("SelectedMediaTypes", Value = "Select media types...", Description = "phrase : Select media types...", LastModified = "2015/04/27")] public string SelectedMediaTypes { get { return this["AllSelectedMediaTypes"]; } } /// <summary> /// Gets phrase : Description /// </summary> [ResourceEntry("Description", Value = "Description", Description = "phrase : Description", LastModified = "2015/04/27")] public string Description { get { return this["Description"]; } } >>>>>>> /// <summary> /// Gets word: URL /// </summary> [ResourceEntry("Url", Value = "URL", Description = "word : URL", LastModified = "2015/04/27")] public string Url { get { return this["Url"]; } } /// Gets phrase : Write CSS /// </summary> [ResourceEntry("WriteCss", Value = "Write CSS", Description = "phrase : Write CSS", LastModified = "2015/04/27")] public string WriteCss { get { return this["WriteCss"]; } } /// <summary> /// Gets phrase : Link to CSS file /// </summary> [ResourceEntry("LinkToCssFile", Value = "Link to CSS file", Description = "phrase : Link to CSS file", LastModified = "2015/04/27")] public string LinkToCssFile { get { return this["LinkToCssFile"]; } } /// <summary> /// Gets phrase : Media /// </summary> [ResourceEntry("Media", Value = "Media", Description = "phrase : Media", LastModified = "2015/04/27")] public string Media { get { return this["Media"]; } } /// <summary> /// Gets phrase : All /// </summary> [ResourceEntry("All", Value = "All", Description = "phrase : All", LastModified = "2015/04/27")] public string All { get { return this["All"]; } } /// <summary> /// Gets phrase : Select media types... /// </summary> [ResourceEntry("SelectedMediaTypes", Value = "Select media types...", Description = "phrase : Select media types...", LastModified = "2015/04/27")] public string SelectedMediaTypes { get { return this["AllSelectedMediaTypes"]; } } /// <summary> /// Gets phrase : Description /// </summary> [ResourceEntry("Description", Value = "Description", Description = "phrase : Description", LastModified = "2015/04/27")] public string Description { get { return this["Description"]; } }
<<<<<<< protected override IQueryable<IDataItem> GetItemsQuery() { if (this.ContentType == null) throw new InvalidOperationException("ContentType cannot be inferred from the WidgetName. A required module might be deactivated."); var manager = DynamicModuleManager.GetManager(this.ProviderName); return manager.GetDataItems(this.ContentType); } /// <inheritdoc /> public virtual ContentListViewModel CreateListViewModelByParent(Telerik.Sitefinity.DynamicModules.Model.DynamicContent parentItem, int page) ======= public virtual ContentListViewModel CreateListViewModel(Telerik.Sitefinity.DynamicModules.Model.DynamicContent parentItem, int page) >>>>>>> public virtual ContentListViewModel CreateListViewModelByParent(Telerik.Sitefinity.DynamicModules.Model.DynamicContent parentItem, int page)
<<<<<<< using System.Web; ======= using System.Text; using System.Text.RegularExpressions; using System.Web; >>>>>>> using System.Web; <<<<<<< ======= /// <inheritDoc/> public bool UseAjaxSubmit { get; set; } /// <inheritDoc/> public string AjaxSubmitTargetUrl { get; set; } /// <summary> /// Represents the current form /// </summary> public FormDescription FormData { get { FormDescription descr = null; if (this.FormId != Guid.Empty) { var manager = FormsManager.GetManager(); if (this.FormId != Guid.Empty) { descr = manager.GetForm(this.FormId); } } return descr; } } /// <inheritDoc/> public virtual bool NeedsRedirect { get { if (this.UseCustomConfirmation) return this.CustomConfirmationMode == CustomConfirmationMode.RedirectToAPage; else return this.FormData.SubmitAction == SubmitAction.PageRedirect; } } >>>>>>> /// <summary> /// Represents the current form /// </summary> public FormDescription FormData { get { FormDescription descr = null; if (this.FormId != Guid.Empty) { var manager = FormsManager.GetManager(); if (this.FormId != Guid.Empty) { descr = manager.GetForm(this.FormId); } } return descr; } } /// <inheritDoc/> public virtual bool NeedsRedirect { get { if (this.UseCustomConfirmation) return this.CustomConfirmationMode == CustomConfirmationMode.RedirectToAPage; else return this.FormData.SubmitAction == SubmitAction.PageRedirect; } } <<<<<<< public virtual bool TrySubmitForm(FormCollection collection, HttpFileCollectionBase files, string userHostAddress) ======= public virtual SubmitStatus TrySubmitForm(FormCollection collection, string userHostAddress) >>>>>>> public virtual SubmitStatus TrySubmitForm(FormCollection collection, HttpFileCollectionBase files, string userHostAddress) <<<<<<< var postedFiles = new Dictionary<string, List<FormHttpPostedFile>>(); for (int i = 0; i < files.AllKeys.Length; i++) { if (formFields.Contains(files.AllKeys[i])) { postedFiles[files.AllKeys[i]] = files.GetMultiple(files.AllKeys[i]).Select(f => new FormHttpPostedFile() { FileName = f.FileName, ContentLength = f.ContentLength, ContentType = f.ContentType, InputStream = f.InputStream }).ToList(); } } var formLanguage = SystemManager.CurrentContext.AppSettings.Multilingual ? CultureInfo.CurrentUICulture.Name : null; FormsHelper.SaveFormsEntry(form, formData, postedFiles, userHostAddress, ClaimsManager.GetCurrentUserId(), formLanguage); ======= var formFields = new HashSet<string>(form.Controls.Select(this.FormFieldName).Where((f) => !string.IsNullOrEmpty(f))); >>>>>>> var formFields = new HashSet<string>(form.Controls.Select(this.FormFieldName).Where((f) => !string.IsNullOrEmpty(f)));
<<<<<<< /// <summary> /// Indicates that the provided credentials are not valid. /// </summary> /// <value>The incorrect credentials.</value> public bool IncorrectCredentials { get; set; } ======= /// <summary> /// Gets or sets a value indicating whether Remember me checkbox is displayed. /// </summary> /// <value> /// <c>true</c> if Remember me checkbox will be displayed; otherwise, <c>false</c>. /// </value> public bool ShowRememberMe { get; set; } private bool rememberMe = true; >>>>>>> /// <summary> /// Indicates that the provided credentials are not valid. /// </summary> /// <value>The incorrect credentials.</value> public bool IncorrectCredentials { get; set; } /// <summary> /// Gets or sets a value indicating whether Remember me checkbox is displayed. /// </summary> /// <value> /// <c>true</c> if Remember me checkbox will be displayed; otherwise, <c>false</c>. /// </value> public bool ShowRememberMe { get; set; } private bool rememberMe = true;
<<<<<<< [ControllerToolboxItem(Name = "News_MVC", Title = "News", SectionName = ToolboxesConfig.ContentToolboxSectionName, ModuleName = "News", CssClass = "sfNewsViewIcn")] ======= [ControllerToolboxItem(Name = "News", Title = "News", SectionName = "MvcWidgets", ModuleName = "News", CssClass = NewsController.WidgetIconCssClass)] >>>>>>> [ControllerToolboxItem(Name = "News_MVC", Title = "News", SectionName = ToolboxesConfig.ContentToolboxSectionName, ModuleName = "News", CssClass = NewsController.WidgetIconCssClass)]
<<<<<<< private const string templateNamePrefix = "Index."; private const string templateName = "Default"; ======= internal const string WidgetIconCssClass = "sfSubmitBtnIcn sfMvcIcn"; private const string TemplateNamePrefix = "Index."; private string templateName = "Default"; #endregion >>>>>>> private const string templateNamePrefix = "Index."; private const string templateName = "Default"; internal const string WidgetIconCssClass = "sfSubmitBtnIcn sfMvcIcn";
<<<<<<< #region Fields readonly IEnumerable<IRequester> _requesters; readonly IDocument _document; readonly Predicate<IRequest> _filter; #endregion #region ctor ======= >>>>>>> #region ctor
<<<<<<< ======= /// <inheritDocs /> [Browsable(false)] public virtual IMetaField MetaField { get { if (this.Model.MetaField == null) { this.Model.MetaField = this.Model.GetMetaField(this); } return this.Model.MetaField; } set { this.Model.MetaField = value; } } /// <inheritDocs /> public virtual FieldDisplayMode DisplayMode { get; set; } /// <summary> /// Gets or sets the name of the template that will be displayed when field is in write view. /// </summary> /// <value></value> public string WriteTemplateName { get { return this.writeTemplateName; } set { this.writeTemplateName = value; } } /// <summary> /// Gets or sets the name of the template that will be displayed when field is in read view. /// </summary> /// <value></value> public string ReadTemplateName { get { return this.readTemplateName; } set { this.readTemplateName = value; } } #endregion #region Actions public virtual ActionResult Index(object value = null) { if (value == null || !(value is string)) value = this.MetaField.DefaultValue; string templateName; var viewModel = this.Model.GetViewModel(value, this.MetaField); if (this.DisplayMode == FieldDisplayMode.Read) templateName = CheckboxesFieldController.ReadTemplateNamePrefix + this.ReadTemplateName; else templateName = CheckboxesFieldController.WriteTemplateNamePrefix + this.WriteTemplateName; return this.View(templateName, viewModel); } /// <summary> /// Called when a request matches this controller, but no method with the specified action name is found in the controller. /// </summary> /// <param name="actionName">The name of the attempted action.</param> protected override void HandleUnknownAction(string actionName) { this.Index().ExecuteResult(this.ControllerContext); } #endregion #region Public methods /// <inheritDocs /> public bool IsValid() { return this.Model.IsValid(this.Model.Value); } #endregion #region Private fields and Constants internal const string WidgetIconCssClass = "sfCheckboxesIcn sfMvcIcn"; private string writeTemplateName = "Default"; private string readTemplateName = "Default"; private const string WriteTemplateNamePrefix = "Write."; private const string ReadTemplateNamePrefix = "Read."; >>>>>>>
<<<<<<< /// <summary> /// Dynamic Widgets test category /// </summary> public const string DynamicWidgets = "DynamicWidgets"; ======= /// <summary> /// New category for new tests /// </summary> public const string New = "New"; >>>>>>> /// <summary> /// Dynamic Widgets test category /// </summary> public const string DynamicWidgets = "DynamicWidgets"; /// <summary> /// New category for new tests /// </summary> public const string New = "New";
<<<<<<< /// Gets or sets the whether to send email message on successful registration confirmation. /// </summary> bool SendEmailOnSuccess { get; set; } /// <summary> /// Gets or sets the activation method. /// </summary> /// <value> /// The activation method. /// </value> ActivationMethod ActivationMethod { get; set;} /// <summary> ======= /// Gets or sets the message that would be displayed on successful registration. /// </summary> /// <value>The successful registration message.</value> string SuccessfulRegistrationMsg { get; set; } /// <summary> /// Gets or sets the identifier of the page that will be opened on successful registration. /// </summary> /// <value> /// The successful registration page identifier. /// </value> Guid? SuccessfulRegistrationPageId { get; set; } /// <summary> >>>>>>> /// Gets or sets the whether to send email message on successful registration confirmation. /// </summary> bool SendEmailOnSuccess { get; set; } /// <summary> /// Gets or sets the activation method. /// </summary> /// <value> /// The activation method. /// </value> ActivationMethod ActivationMethod { get; set;} /// <summary> /// Gets or sets the message that would be displayed on successful registration. /// </summary> /// <value>The successful registration message.</value> string SuccessfulRegistrationMsg { get; set; } /// <summary> /// Gets or sets the identifier of the page that will be opened on successful registration. /// </summary> /// <value> /// The successful registration page identifier. /// </value> Guid? SuccessfulRegistrationPageId { get; set; } /// <summary>
<<<<<<< Bind<IEmailCampaignsModel>().To<EmailCampaignsModel>(); Bind<IUnsubscribeFormModel>().To<UnsubscribeFormModel>(); ======= Bind<ISubscribeFormModel>().To<SubscribeFormModel>(); >>>>>>> Bind<IUnsubscribeFormModel>().To<UnsubscribeFormModel>(); Bind<ISubscribeFormModel>().To<SubscribeFormModel>();
<<<<<<< ======= using System.Web; >>>>>>> using System.Web; <<<<<<< using Telerik.Sitefinity.Frontend.Identity.Mvc.Models.Profile; ======= using Telerik.Sitefinity.Web.Mail; using Telerik.Sitefinity.Modules.UserProfiles; >>>>>>> using Telerik.Sitefinity.Web.Mail;
<<<<<<< //TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock)] ======= TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock), Telerik.TestUI.Core.Attributes.KnownIssue(BugId = 210190)] >>>>>>> //TestCategory(FeatherTestCategories.MediaSelector), TestCategory(FeatherTestCategories.ContentBlock), Telerik.TestUI.Core.Attributes.KnownIssue(BugId = 210190)]
<<<<<<< using Telerik.Sitefinity.Frontend.Forms.Mvc.Models.Fields.Recaptcha; using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers; ======= >>>>>>> using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers; <<<<<<< Initializer.CreateFormsGoogleRecaptchaFieldConfig(); Initializer.AddFieldsToToolbox(); ======= >>>>>>> Initializer.AddFieldsToToolbox();
<<<<<<< using Telerik.Sitefinity.Data; using Telerik.Sitefinity.Frontend.Mvc; using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes; ======= >>>>>>> using Telerik.Sitefinity.Frontend.Mvc; using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes; <<<<<<< [ControllerMetadataAttribute(IsTemplatableControl = false)] ======= [Localization(typeof(DynamicContentResources))] >>>>>>> [Localization(typeof(DynamicContentResources))] [ControllerMetadataAttribute(IsTemplatableControl = false)]
<<<<<<< [ControllerToolboxItem(Name = "ChangePassword_MVC", Title = "Change password", SectionName = "Login", CssClass = "sfChangePasswordIcn")] ======= [ControllerToolboxItem(Name = "ChangePasswordMVC", Title = "Change password", SectionName = "MvcWidgets", CssClass = ChangePasswordController.WidgetIconCssClass)] >>>>>>> [ControllerToolboxItem(Name = "ChangePassword_MVC", Title = "Change password", SectionName = "Login", CssClass = ChangePasswordController.WidgetIconCssClass)]
<<<<<<< /// Gets the next button on frontend /// </summary> public HtmlButton NextStepButton { get { return this.Get<HtmlButton>("TagName=button", "data-sf-btn-role=next"); } } /// <summary> /// Gets the next button on frontend /// </summary> public HtmlButton NextStepVisible { get { return this.Find.AllByExpression<HtmlButton>("TagName=button", "data-sf-btn-role=next").Where(b => b.IsVisible()).FirstOrDefault(); } } /// <summary> /// Gets the previous anchor on frontend /// </summary> public HtmlAnchor PreviousStep { get { return this.Get<HtmlAnchor>("TagName=a", "data-sf-btn-role=prev"); } } /// <summary> /// Gets the fields for form when hybrid page is used ======= /// Gets the captcha field on frontend >>>>>>> /// Gets the next button on frontend /// </summary> public HtmlButton NextStepButton { get { return this.Get<HtmlButton>("TagName=button", "data-sf-btn-role=next"); } } /// <summary> /// Gets the next button on frontend /// </summary> public HtmlButton NextStepVisible { get { return this.Find.AllByExpression<HtmlButton>("TagName=button", "data-sf-btn-role=next").Where(b => b.IsVisible()).FirstOrDefault(); } } /// <summary> /// Gets the previous anchor on frontend /// </summary> public HtmlAnchor PreviousStep { get { return this.Get<HtmlAnchor>("TagName=a", "data-sf-btn-role=prev"); } } /// <summary> /// Gets the captcha field on frontend
<<<<<<< /// <summary> /// Gets or sets the taxon size used for Cloud template. /// </summary> /// <value>The size of the cloud.</value> public int CloudSize { get; set; } ======= /// <summary> /// Gets or sets the url of the taxon. /// </summary> /// <value>The url.</value> public string Url { get; set; } >>>>>>> /// <summary> /// Gets or sets the url of the taxon. /// </summary> /// <value>The url.</value> public string Url { get; set; } /// <summary> /// Gets or sets the taxon size used for Cloud template. /// </summary> /// <value>The size of the cloud.</value> public int CloudSize { get; set; }
<<<<<<< /// <summary> /// phrase: Next image /// </summary> /// <value>Next image</value> [ResourceEntry("NextImage", Value = "Next image", Description = "phrase: Next image", LastModified = "2015/02/24")] public string NextImage { get { return this["NextImage"]; } } /// <summary> /// phrase: Previous image /// </summary> /// <value>Previous image</value> [ResourceEntry("PreviousImage", Value = "Previous image", Description = "phrase: Previous image", LastModified = "2015/02/24")] public string PreviousImage { get { return this["PreviousImage"]; } } ======= /// <summary> /// phrase: Thumbnail size /// </summary> /// <value>Thumbnail size</value> [ResourceEntry("ThumbnailSize", Value = "Thumbnail size", Description = "phrase: Thumbnail size", LastModified = "2015/02/23")] public string ThumbnailSize { get { return this["ThumbnailSize"]; } } /// <summary> /// phrase: Image size /// </summary> /// <value>Image size</value> [ResourceEntry("ImageSize", Value = "Image size", Description = "phrase: Image size", LastModified = "2015/02/24")] public string ImageSize { get { return this["ImageSize"]; } } >>>>>>> /// <summary> /// phrase: Thumbnail size /// </summary> /// <value>Thumbnail size</value> [ResourceEntry("ThumbnailSize", Value = "Thumbnail size", Description = "phrase: Thumbnail size", LastModified = "2015/02/23")] public string ThumbnailSize { get { return this["ThumbnailSize"]; } } /// <summary> /// phrase: Image size /// </summary> /// <value>Image size</value> [ResourceEntry("ImageSize", Value = "Image size", Description = "phrase: Image size", LastModified = "2015/02/24")] public string ImageSize { get { return this["ImageSize"]; } } /// <summary> /// phrase: Next image /// </summary> /// <value>Next image</value> [ResourceEntry("NextImage", Value = "Next image", Description = "phrase: Next image", LastModified = "2015/02/24")] public string NextImage { get { return this["NextImage"]; } } /// <summary> /// phrase: Previous image /// </summary> /// <value>Previous image</value> [ResourceEntry("PreviousImage", Value = "Previous image", Description = "phrase: Previous image", LastModified = "2015/02/24")] public string PreviousImage { get { return this["PreviousImage"]; } }
<<<<<<< /// Verifies the image resizing properties. /// </summary> /// <param name="altText">The alt text.</param> /// <param name="src">The SRC.</param> public void VerifyImageResizingProperties(string altText, string srcWidth, string srcHeight, string srcQuality, string srcResizingOption) { HtmlImage image = ActiveBrowser.Find.ByExpression<HtmlImage>("alt=~" + altText) .AssertIsPresent(altText); Assert.IsTrue(image.Src.Contains(srcWidth) && image.Src.Contains(srcHeight) && image.Src.Contains(srcQuality) && image.Src.Contains(srcResizingOption), "src is not correct"); } /// <summary> ======= /// Verifies the thumbnail strip template info. /// </summary> /// <param name="countLabel">The count label.</param> /// <param name="imageName">Name of the image.</param> public void VerifyThumbnailStripTemplateInfo(string countLabel, string imageName) { ActiveBrowser.Find.ByExpression<HtmlAnchor>("class=~js-Gallery-prev").AssertIsPresent("Prev"); ActiveBrowser.Find.ByExpression<HtmlAnchor>("class=~js-Gallery-next").AssertIsPresent("Next"); ActiveBrowser.Find.ByExpression<HtmlDiv>("innertext=" + countLabel).AssertIsPresent(countLabel); ActiveBrowser.Find.ByExpression<HtmlContainerControl>("tagname=h2", "class=js-Gallery-title", "innertext=" + imageName).AssertIsPresent("Next"); } /// <summary> >>>>>>> /// Verifies the thumbnail strip template info. /// </summary> /// <param name="countLabel">The count label.</param> /// <param name="imageName">Name of the image.</param> public void VerifyThumbnailStripTemplateInfo(string countLabel, string imageName) { ActiveBrowser.Find.ByExpression<HtmlAnchor>("class=~js-Gallery-prev").AssertIsPresent("Prev"); ActiveBrowser.Find.ByExpression<HtmlAnchor>("class=~js-Gallery-next").AssertIsPresent("Next"); ActiveBrowser.Find.ByExpression<HtmlDiv>("innertext=" + countLabel).AssertIsPresent(countLabel); ActiveBrowser.Find.ByExpression<HtmlContainerControl>("tagname=h2", "class=js-Gallery-title", "innertext=" + imageName).AssertIsPresent("Next"); } /// <summary> /// Verifies the image resizing properties. /// </summary> /// <param name="altText">The alt text.</param> /// <param name="src">The SRC.</param> public void VerifyImageResizingProperties(string altText, string srcWidth, string srcHeight, string srcQuality, string srcResizingOption) { HtmlImage image = ActiveBrowser.Find.ByExpression<HtmlImage>("alt=~" + altText) .AssertIsPresent(altText); Assert.IsTrue(image.Src.Contains(srcWidth) && image.Src.Contains(srcHeight) && image.Src.Contains(srcQuality) && image.Src.Contains(srcResizingOption), "src is not correct"); } /// <summary>
<<<<<<< [ControllerToolboxItem(Name = "Navigation_MVC", Title = "Navigation", SectionName = ToolboxesConfig.NavigationControlsSectionName, CssClass = "sfNavigationIcn")] ======= [ControllerToolboxItem(Name = "Navigation", Title = "Navigation", SectionName = "MvcWidgets", CssClass = NavigationController.WidgetIconCssClass)] >>>>>>> [ControllerToolboxItem(Name = "Navigation_MVC", Title = "Navigation", SectionName = ToolboxesConfig.NavigationControlsSectionName, CssClass = NavigationController.WidgetIconCssClass)]
<<<<<<< [ControllerToolboxItem(Name = "Profile_MVC", Title = "Profile", SectionName = "Users", CssClass = "sfProfilecn")] ======= [ControllerToolboxItem(Name = "ProfileMVC", Title = "Profile", SectionName = "MvcWidgets", CssClass = ProfileController.WidgetIconCssClass)] >>>>>>> [ControllerToolboxItem(Name = "Profile_MVC", Title = "Profile", SectionName = "Users", CssClass = ProfileController.WidgetIconCssClass)]
<<<<<<< _db.ListCollections().ToList().Count(); //get the collection count so that db connection is established ======= _db.ListCollections().ToList().Count(); //get the collection count so that first db connection is established >>>>>>> _db.ListCollections().ToList().Count(); //get the collection count so that first db connection is established <<<<<<< return _db.GetCollection<T>(GetCollectionName<T>()); ======= CheckIfInitialized(); return _db.GetCollection<T>(typeof(T).Name); >>>>>>> CheckIfInitialized(); return _db.GetCollection<T>(GetCollectionName<T>()); <<<<<<< internal async static Task CreateIndexAsync<T>(CreateIndexModel<T> model) { CheckIfInitialized(); await GetCollection<T>().Indexes.CreateOneAsync(model); } internal async static Task DropIndexAsync<T>(string name) { await GetCollection<T>().Indexes.DropOneAsync(name); } ======= internal async static Task CreateIndexAsync<T>(CreateIndexModel<T> model) { await GetCollection<T>().Indexes.CreateOneAsync(model); } internal async static Task DropIndexAsync<T>(string name) { await GetCollection<T>().Indexes.DropOneAsync(name); } >>>>>>> internal async static Task CreateIndexAsync<T>(CreateIndexModel<T> model) { await GetCollection<T>().Indexes.CreateOneAsync(model); } internal async static Task DropIndexAsync<T>(string name) { await GetCollection<T>().Indexes.DropOneAsync(name); } <<<<<<< ///// <summary> ///// Define an index for a given Entity collection. ///// </summary> ///// <typeparam name="T">Any class that inherits from Entity</typeparam> ///// <param name="type">Specify the type of index to create</param> ///// <param name="options">Specify the indexing options</param> ///// <param name="propertiesToIndex">x => x.Prop1, x => x.Prop2, x => x.PropEtc</param> //public static void DefineIndex<T>(Type type, Options options, params Expression<Func<T, object>>[] propertiesToIndex) //{ // DefineIndexAsync<T>(type, options, propertiesToIndex).GetAwaiter().GetResult(); //} ///// <summary> ///// Define an index for a given Entity collection. ///// </summary> ///// <typeparam name="T">Any class that inherits from Entity</typeparam> ///// <param name="type">Specify the type of index to create</param> ///// <param name="priority">Specify the indexing priority</param> ///// <param name="propertiesToIndex">x => x.Prop1, x => x.Prop2, x => x.PropEtc</param> //public static void DefineIndex<T>(Type type, Priority priority, params Expression<Func<T, object>>[] propertiesToIndex) //{ // DefineIndexAsync<T>( // type, // priority, // propertiesToIndex).GetAwaiter().GetResult(); //} ///// <summary> ///// Define an index for a given Entity collection. ///// </summary> ///// <typeparam name="T">Any class that inherits from Entity</typeparam> ///// <param name="type">Specify the type of index to create</param> ///// <param name="options">Specify the indexing options</param> ///// <param name="propertiesToIndex">x => x.Prop1, x => x.Prop2, x => x.PropEtc</param> //async public static Task DefineIndexAsync<T>(Type type, Options options, params Expression<Func<T, object>>[] propertiesToIndex) //{ // CheckIfInitialized(); // var propNames = new SortedSet<string>(); // var keyDefs = new List<IndexKeysDefinition<T>>(); // foreach (var property in propertiesToIndex) // { // var member = property.Body as MemberExpression; // if (member == null) member = (property.Body as UnaryExpression)?.Operand as MemberExpression; // if (member == null) throw new ArgumentException("Unable to get property name"); // propNames.Add(member.Member.Name); // } // foreach (var prop in propNames) // { // switch (type) // { // case Type.Ascending: // keyDefs.Add(Builders<T>.IndexKeys.Ascending(prop)); // break; // case Type.Descending: // keyDefs.Add(Builders<T>.IndexKeys.Descending(prop)); // break; // case Type.Geo2D: // keyDefs.Add(Builders<T>.IndexKeys.Geo2D(prop)); // break; // case Type.Geo2DSphere: // keyDefs.Add(Builders<T>.IndexKeys.Geo2DSphere(prop)); // break; // case Type.GeoHaystack: // keyDefs.Add(Builders<T>.IndexKeys.GeoHaystack(prop)); // break; // case Type.Hashed: // keyDefs.Add(Builders<T>.IndexKeys.Hashed(prop)); // break; // case Type.Text: // keyDefs.Add(Builders<T>.IndexKeys.Text(prop)); // break; // } // } // options.Name = typeof(T).Name; // if (type == Type.Text) // { // options.Name = $"{options.Name}[TEXT]"; // } // else // { // options.Name = $"{options.Name}[{string.Join("-", propNames)}]"; // } // var indexModel = new CreateIndexModel<T>( // Builders<T>.IndexKeys.Combine(keyDefs), // options.ToCreateIndexOptions()); // try // { // await GetCollection<T>().Indexes.CreateOneAsync(indexModel); // } // catch (MongoCommandException x) // { // if (x.Code == 85) // { // await GetCollection<T>().Indexes.DropOneAsync(options.Name); // await GetCollection<T>().Indexes.CreateOneAsync(indexModel); // } // else // { // throw x; // } // } //} ///// <summary> ///// Define an index for a given Entity collection. ///// </summary> ///// <typeparam name="T">Any class that inherits from Entity</typeparam> ///// <param name="type">Specify the type of index to create</param> ///// <param name="priority">Specify the indexing priority</param> ///// <param name="propertiesToIndex">x => x.Prop1, x => x.Prop2, x => x.PropEtc</param> //async public static Task DefineIndexAsync<T>(Type type, Priority priority, params Expression<Func<T, object>>[] propertiesToIndex) //{ // await DefineIndexAsync<T>( // type, // new Options { Background = (priority == Priority.Background) }, // propertiesToIndex); //} /// <summary> ======= /// <summary> >>>>>>> /// <summary> <<<<<<< Collection collectionattr = typeof(T).GetTypeInfo().GetCustomAttribute<Collection>(); if (collectionattr != null) { result = collectionattr.Name; } return result; } } ======= >>>>>>> Collection collectionattr = typeof(T).GetTypeInfo().GetCustomAttribute<Collection>(); if (collectionattr != null) { result = collectionattr.Name; } return result; } }
<<<<<<< private int _frameForLastQueuedTranslation = -1; private int _consecutiveFramesQueued = 0; ======= private string _previouslyQueuedText = null; private int _concurrentStaggers = 0; >>>>>>> private string _previouslyQueuedText = null; private int _concurrentStaggers = 0; private int _frameForLastQueuedTranslation = -1; private int _consecutiveFramesQueued = 0; <<<<<<< CheckConsecutiveFrames(); ======= CheckStaggerText( lookupKey ); >>>>>>> CheckStaggerText( lookupKey ); CheckConsecutiveFrames(); <<<<<<< public void CheckConsecutiveFrames() { var currentFrame = Time.frameCount; var lastFrame = currentFrame - 1; if( lastFrame == _frameForLastQueuedTranslation ) { // we also queued something last frame, lets increment our counter _consecutiveFramesQueued++; if( _consecutiveFramesQueued > Settings.MaximumConcurrentFrameTranslations ) { // Shutdown, this wont be tolerated!!! _unstartedJobs.Clear(); _completedJobs.Clear(); _ongoingJobs.Clear(); Settings.IsShutdown = true; Logger.Current.Error( $"SPAM DETECTED: Translations were queued every frame for more than {Settings.MaximumConcurrentFrameTranslations} consecutive frames. Shutting down plugin." ); } } else if( currentFrame == _frameForLastQueuedTranslation ) { // do nothing, there may be multiple translations per frame, that wont increase this counter } else { // but if multiple Update frames has passed, we will reset the counter _consecutiveFramesQueued = 0; } _frameForLastQueuedTranslation = currentFrame; } ======= private void CheckStaggerText( string untranslatedText ) { if( _previouslyQueuedText != null ) { if( untranslatedText.StartsWith( _previouslyQueuedText ) ) { _concurrentStaggers++; if( _concurrentStaggers > Settings.MaximumStaggers ) { _unstartedJobs.Clear(); _completedJobs.Clear(); _ongoingJobs.Clear(); Settings.IsShutdown = true; Logger.Current.Error( $"SPAM DETECTED: Text that is 'scrolling in' is being translated. Disable that feature. Shutting down plugin." ); } } else { _concurrentStaggers = 0; } } _previouslyQueuedText = untranslatedText; } >>>>>>> public void CheckConsecutiveFrames() { var currentFrame = Time.frameCount; var lastFrame = currentFrame - 1; if( lastFrame == _frameForLastQueuedTranslation ) { // we also queued something last frame, lets increment our counter _consecutiveFramesQueued++; if( _consecutiveFramesQueued > Settings.MaximumConcurrentFrameTranslations ) { // Shutdown, this wont be tolerated!!! _unstartedJobs.Clear(); _completedJobs.Clear(); _ongoingJobs.Clear(); Settings.IsShutdown = true; Logger.Current.Error( $"SPAM DETECTED: Translations were queued every frame for more than {Settings.MaximumConcurrentFrameTranslations} consecutive frames. Shutting down plugin." ); } } else if( currentFrame == _frameForLastQueuedTranslation ) { // do nothing, there may be multiple translations per frame, that wont increase this counter } else { // but if multiple Update frames has passed, we will reset the counter _consecutiveFramesQueued = 0; } _frameForLastQueuedTranslation = currentFrame; } private void CheckStaggerText( string untranslatedText ) { if( _previouslyQueuedText != null ) { if( untranslatedText.StartsWith( _previouslyQueuedText ) ) { _concurrentStaggers++; if( _concurrentStaggers > Settings.MaximumStaggers ) { _unstartedJobs.Clear(); _completedJobs.Clear(); _ongoingJobs.Clear(); Settings.IsShutdown = true; Logger.Current.Error( $"SPAM DETECTED: Text that is 'scrolling in' is being translated. Disable that feature. Shutting down plugin." ); } } else { _concurrentStaggers = 0; } } _previouslyQueuedText = untranslatedText; }
<<<<<<< else if( UnityTextParsers.RegexSplittingTextParser.CanApply( ui ) && isBelowMaxLength ) ======= } if( UnityTextParsers.RegexSplittingTextParser.CanApply( ui ) && isBelowMaxLength ) { var result = UnityTextParsers.RegexSplittingTextParser.Parse( stabilizedText, scope ); if( result != null ) >>>>>>> if( UnityTextParsers.RegexSplittingTextParser.CanApply( ui ) && isBelowMaxLength ) <<<<<<< else if( UnityTextParsers.RichTextParser.CanApply( ui ) && isBelowMaxLength ) ======= } if( UnityTextParsers.RichTextParser.CanApply( ui ) && isBelowMaxLength ) { var result = UnityTextParsers.RichTextParser.Parse( stabilizedText, scope ); if( result != null ) >>>>>>> if( UnityTextParsers.RichTextParser.CanApply( ui ) && isBelowMaxLength )
<<<<<<< using UnityEngine.UI; using XUnity.AutoTranslator.Plugin.Core.Constants; ======= using UnityEngine; using XUnity.AutoTranslator.Plugin.Core.Configuration; >>>>>>> using UnityEngine; using XUnity.AutoTranslator.Plugin.Core.Configuration; using UnityEngine.UI; using XUnity.AutoTranslator.Plugin.Core.Constants; <<<<<<< if( !obj.SupportsStabilization() ) return null; ======= if( !Settings.EnableObjectTracking ) return null; if( obj is GUIContent ) return null; >>>>>>> if( !Settings.EnableObjectTracking ) return null; if( !obj.SupportsStabilization() ) return null;
<<<<<<< using Microsoft.Health.Dicom.Core.Messages.Delete; ======= using Microsoft.Health.Dicom.Core.Messages.Retrieve; >>>>>>> using Microsoft.Health.Dicom.Core.Messages.Delete; using Microsoft.Health.Dicom.Core.Messages.Retrieve; <<<<<<< public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID), cancellationToken); } public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, string seriesUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID, seriesUID), cancellationToken); } public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, string seriesUID, string instanceUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID, seriesUID, instanceUID), cancellationToken); } ======= public static Task<RetrieveDicomResourceResponse> RetrieveDicomStudyAsync( this IMediator mediator, string studyInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomStudyMetadataAsync( this IMediator mediator, string studyInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomSeriesAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomSeriesMetadataAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID, seriesInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomInstanceAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID, sopInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomInstanceMetadataAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID, seriesInstanceUID, sopInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomFramesAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, int[] frames, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID, sopInstanceUID, frames), cancellationToken); } >>>>>>> public static Task<RetrieveDicomResourceResponse> RetrieveDicomStudyAsync( this IMediator mediator, string studyInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomStudyMetadataAsync( this IMediator mediator, string studyInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomSeriesAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomSeriesMetadataAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID, seriesInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomInstanceAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID, sopInstanceUID), cancellationToken); } public static Task<RetrieveDicomMetadataResponse> RetrieveDicomInstanceMetadataAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, CancellationToken cancellationToken) { return mediator.Send(new RetrieveDicomMetadataRequest(studyInstanceUID, seriesInstanceUID, sopInstanceUID), cancellationToken); } public static Task<RetrieveDicomResourceResponse> RetrieveDicomFramesAsync( this IMediator mediator, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, int[] frames, string requestedTransferSyntax, CancellationToken cancellationToken) { return mediator.Send( new RetrieveDicomResourceRequest(requestedTransferSyntax, studyInstanceUID, seriesInstanceUID, sopInstanceUID, frames), cancellationToken); } public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID), cancellationToken); } public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, string seriesUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID, seriesUID), cancellationToken); } public static Task<DeleteDicomResourcesResponse> DeleteDicomResourcesAsync( this IMediator mediator, string studyInstanceUID, string seriesUID, string instanceUID, CancellationToken cancellationToken = default) { return mediator.Send(new DeleteDicomResourcesRequest(studyInstanceUID, seriesUID, instanceUID), cancellationToken); }
<<<<<<< Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), false, false); ======= DicomUID.Generate().UID, DicomUID.Generate().UID, DicomUID.Generate().UID); >>>>>>> DicomUID.Generate().UID, DicomUID.Generate().UID, DicomUID.Generate().UID, false, false); <<<<<<< Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), new[] { 5 }, false, false); ======= DicomUID.Generate().UID, DicomUID.Generate().UID, DicomUID.Generate().UID, new[] { 5 }); >>>>>>> DicomUID.Generate().UID, DicomUID.Generate().UID, DicomUID.Generate().UID, new[] { 5 }, false, false);
<<<<<<< using Dicom.Imaging; ======= using System.Reflection; >>>>>>> using System.Reflection; using Dicom.Imaging;
<<<<<<< using Microsoft.AspNetCore.Authorization; ======= using BlogTemplate.Services; >>>>>>> using Microsoft.AspNetCore.Authorization; using BlogTemplate.Services;
<<<<<<< public void UpdatePost(Post newPost, Post oldPost) { XDocument doc = XDocument.Load($"{StorageFolder}\\{oldPost.Slug}.xml"); //update info in file //change file name to reflect new slug doc.Root.Element("Title").Value = newPost.Title; doc.Root.Element("Body").Value = newPost.Body; doc.Root.Element("PubDate").Value = newPost.PubDate.ToString(); doc.Root.Element("LastModified").Value = newPost.LastModified.ToString(); doc.Root.Element("Slug").Value = newPost.Slug; doc.Root.Element("IsPublic").Value = newPost.IsPublic.ToString(); doc.Root.Element("Excerpt").Value = newPost.Excerpt; doc.Root.Elements("Tags").Remove(); doc.Root.Elements("Tag").Remove(); AddTags(newPost, doc.Root); doc.Save($"{StorageFolder}//{oldPost.Slug}.xml"); System.IO.File.Move($"{StorageFolder}//{oldPost.Slug}.xml", $"{StorageFolder}//{newPost.Slug}.xml"); } ======= >>>>>>> public void UpdatePost(Post newPost, Post oldPost) { XDocument doc = XDocument.Load($"{StorageFolder}\\{oldPost.Slug}.xml"); //update info in file //change file name to reflect new slug doc.Root.Element("Title").Value = newPost.Title; doc.Root.Element("Body").Value = newPost.Body; doc.Root.Element("PubDate").Value = newPost.PubDate.ToString(); doc.Root.Element("LastModified").Value = newPost.LastModified.ToString(); doc.Root.Element("Slug").Value = newPost.Slug; doc.Root.Element("IsPublic").Value = newPost.IsPublic.ToString(); doc.Root.Element("Excerpt").Value = newPost.Excerpt; doc.Root.Elements("Tags").Remove(); doc.Root.Elements("Tag").Remove(); AddTags(newPost, doc.Root); doc.Save($"{StorageFolder}//{oldPost.Slug}.xml"); System.IO.File.Move($"{StorageFolder}//{oldPost.Slug}.xml", $"{StorageFolder}//{newPost.Slug}.xml"); }
<<<<<<< #region License // // Copyright (c) 2008-2011, Dolittle // // Licensed under the MIT License (http://opensource.org/licenses/MIT) // With one exception : // Commercial libraries that is based partly or fully on Bifrost and is sold commercially, // must obtain a commercial license. // // You may not use this file except in compliance with the License. // You may obtain a copy of the license at // // http://github.com/dolittle/Bifrost/blob/master/MIT-LICENSE.txt // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #endregion using System; using Bifrost.Configuration; using Bifrost.Entities; namespace Bifrost.MongoDB { public class EntityContextConfiguration : IEntityContextConfiguration { public string Url { get; set; } public string DefaultDatabase { get; set; } public Type EntityContextType { get { return typeof(EntityContext<>); } } public IEntityContextConnection Connection { get; set; } } } ======= #region License // // Copyright (c) 2008-2011, Dolittle // // Licensed under the MIT License (http://opensource.org/licenses/MIT) // // You may not use this file except in compliance with the License. // You may obtain a copy of the license at // // http://github.com/dolittle/Bifrost/blob/master/MIT-LICENSE.txt // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #endregion using System; using Bifrost.Configuration; using Bifrost.Entities; namespace Bifrost.MongoDB { public class EntityContextConfiguration : IEntityContextConfiguration { public Type EntityContextType { get { return typeof(EntityContext<>); } } public IEntityContextConnection Connection { get; set; } } } >>>>>>> #region License // // Copyright (c) 2008-2011, Dolittle // // Licensed under the MIT License (http://opensource.org/licenses/MIT) // // You may not use this file except in compliance with the License. // You may obtain a copy of the license at // // http://github.com/dolittle/Bifrost/blob/master/MIT-LICENSE.txt // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #endregion using System; using Bifrost.Configuration; using Bifrost.Entities; namespace Bifrost.MongoDB { public class EntityContextConfiguration : IEntityContextConfiguration { public string Url { get; set; } public string DefaultDatabase { get; set; } public Type EntityContextType { get { return typeof(EntityContext<>); } } public IEntityContextConnection Connection { get; set; } } }
<<<<<<< public IActionResult OnPostPublish() { InitializePost(); if (ModelState.IsValid) { Post.Comments.Add(Comment); } return Page(); } ======= public void OnPostPublish() { } >>>>>>> public IActionResult OnPostPublish() { InitializePost(); if (ModelState.IsValid) { Post.Comments.Add(Comment); } return Page(); } public void OnPostPublish() { }
<<<<<<< var resolver = document.Options.GetService<IEntityService>() ?? HtmlEntityService.Resolver; _tokenizer = new HtmlTokenizer(document.Source, resolver); ======= var options = document.Options; var resolver = options.GetService<IEntityService>() ?? HtmlEntityService.Resolver; _tokenizer = new HtmlTokenizer(document.Source, options.Events, resolver); >>>>>>> var options = document.Options; var resolver = options.GetService<IEntityService>() ?? HtmlEntityService.Resolver; _tokenizer = new HtmlTokenizer(document.Source, resolver);
<<<<<<< builder.Services.AddHttpClient(); builder.Services.AddRefitClient<IGitHubAuthApi>() ======= builder.Services.AddRefitClient<IGitHubAuthApi>(RefitExtensions.GetNewtonsoftJsonRefitSettings()) >>>>>>> builder.Services.AddHttpClient(); builder.Services.AddRefitClient<IGitHubAuthApi>(RefitExtensions.GetNewtonsoftJsonRefitSettings())
<<<<<<< /// <summary> /// Register a binding of a type to a callback that can resolve it with a given lifecycle /// </summary> /// <typeparam name="T">Type to register</typeparam> /// <param name="container"><see cref="global::SimpleInjector.Container"/> to register into</param> /// <param name="resolveCallback"><see cref="Func{T}"/> that resolves the type</param> /// <param name="lifecycle"><see cref="BindingLifecycle">Lifecycle</see> of the binding</param> ======= >>>>>>> /// <summary> /// Register a binding of a type to a callback that can resolve it with a given lifecycle /// </summary> /// <typeparam name="T">Type to register</typeparam> /// <param name="container"><see cref="global::SimpleInjector.Container"/> to register into</param> /// <param name="resolveCallback"><see cref="Func{T}"/> that resolves the type</param> /// <param name="lifecycle"><see cref="BindingLifecycle">Lifecycle</see> of the binding</param> <<<<<<< /// <summary> /// Register a binding of a type to a callback that can resolve an instance of the type with a given lifecycle /// </summary> /// <param name="container"><see cref="global::SimpleInjector.Container"/> to register into</param> /// <param name="service"><see cref="Type"/> to register</param> /// <param name="resolveCallback"><see cref="Func{T}"/> that resolves the type</param> /// <param name="lifecycle"><see cref="BindingLifecycle">Lifecycle</see> of the binding</param> ======= >>>>>>> /// <summary> /// Register a binding of a type to a callback that can resolve an implementation of the type with a given lifecycle /// </summary> /// <param name="container"><see cref="global::SimpleInjector.Container"/> to register into</param> /// <param name="service"><see cref="Type"/> to register</param> /// <param name="resolveCallback"><see cref="Func{T}"/> that resolves the type</param> /// <param name="lifecycle"><see cref="BindingLifecycle">Lifecycle</see> of the binding</param> <<<<<<< static Lifestyle ResolveLifestyle(BindingLifecycle lifecycle) ======= public static void Register(this global::SimpleInjector.Container container, Type service, Func<Type, object> resolveCallback, BindingLifecycle lifecycle) { var lifestyle = ResolveLifestyle(lifecycle); container.Register(service, () => resolveCallback, lifestyle); } private static Lifestyle ResolveLifestyle(BindingLifecycle lifecycle) >>>>>>> /// <summary> /// Register a binding of a type to a callback that can resolve an instance of the type with a given lifecycle /// </summary> /// <param name="container"><see cref="global::SimpleInjector.Container"/> to register into</param> /// <param name="service"><see cref="Type"/> to register</param> /// <param name="resolveCallback"><see cref="Func{T}"/> that resolves the instance</param> /// <param name="lifecycle"><see cref="BindingLifecycle">Lifecycle</see> of the binding</param> public static void Register(this global::SimpleInjector.Container container, Type service, Func<Type, object> resolveCallback, BindingLifecycle lifecycle) { var lifestyle = ResolveLifestyle(lifecycle); container.Register(service, () => resolveCallback, lifestyle); } static Lifestyle ResolveLifestyle(BindingLifecycle lifecycle)
<<<<<<< public class PlainTextOutput : MarshalByRefObject { private readonly TextWriter _writer; public PlainTextOutput(TextWriter writer) { _writer = writer; } public void WriteLine(string text) { _writer.WriteLine(text); } public void WriteHeader() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); Version version = executingAssembly.GetName().Version; var copyrights = (AssemblyCopyrightAttribute[]) Attribute.GetCustomAttributes(executingAssembly, typeof(AssemblyCopyrightAttribute)); _writer.WriteLine("NBehave version {0}", version); foreach (AssemblyCopyrightAttribute copyrightAttribute in copyrights) { _writer.WriteLine(copyrightAttribute.Copyright); } if (copyrights.Length > 0) _writer.WriteLine("All Rights Reserved."); } public void WriteSeparator() { _writer.WriteLine(""); } public void WriteRuntimeEnvironment() { string runtimeEnv = string.Format("Runtime Environment -\r\n OS Version: {0}\r\n CLR Version: {1}", Environment.OSVersion, Environment.Version); _writer.WriteLine(runtimeEnv); } } ======= using System; using System.IO; using System.Reflection; public class PlainTextOutput { private readonly TextWriter _writer; public PlainTextOutput(TextWriter writer) { _writer = writer; } public void WriteLine(string text) { _writer.WriteLine(text); } public void WriteHeader() { var executingAssembly = Assembly.GetExecutingAssembly(); var version = executingAssembly.GetName().Version; var copyrights = (AssemblyCopyrightAttribute[]) Attribute.GetCustomAttributes(executingAssembly, typeof(AssemblyCopyrightAttribute)); _writer.WriteLine("NBehave version {0}", version); foreach (var copyrightAttribute in copyrights) { _writer.WriteLine(copyrightAttribute.Copyright); } if (copyrights.Length > 0) { _writer.WriteLine("All Rights Reserved."); } } public void WriteSeparator() { _writer.WriteLine(string.Empty); } public void WriteRuntimeEnvironment() { var runtimeEnv = string.Format( "Runtime Environment -\r\n OS Version: {0}\r\n CLR Version: {1}", Environment.OSVersion, Environment.Version); _writer.WriteLine(runtimeEnv); } } >>>>>>> using System; using System.IO; using System.Reflection; public class PlainTextOutput : MarshalByRefObject { private readonly TextWriter _writer; public PlainTextOutput(TextWriter writer) { _writer = writer; } public void WriteLine(string text) { _writer.WriteLine(text); } public void WriteHeader() { var executingAssembly = Assembly.GetExecutingAssembly(); var version = executingAssembly.GetName().Version; var copyrights = (AssemblyCopyrightAttribute[]) Attribute.GetCustomAttributes(executingAssembly, typeof(AssemblyCopyrightAttribute)); _writer.WriteLine("NBehave version {0}", version); foreach (var copyrightAttribute in copyrights) { _writer.WriteLine(copyrightAttribute.Copyright); } if (copyrights.Length > 0) { _writer.WriteLine("All Rights Reserved."); } } public void WriteSeparator() { _writer.WriteLine(string.Empty); } public void WriteRuntimeEnvironment() { var runtimeEnv = string.Format( "Runtime Environment -\r\n OS Version: {0}\r\n CLR Version: {1}", Environment.OSVersion, Environment.Version); _writer.WriteLine(runtimeEnv); } }
<<<<<<< using System.Reflection; using System.Text; using System.Xml; using NBehave.Console.Remoting; ======= using System.Threading; >>>>>>> using System.Linq; using System.Reflection; using System.Threading; using NBehave.Console.Remoting; <<<<<<< StoryResults results = SetupAndRunStories(options, output); ======= if (options.waitForDebugger) { int countdown = 5000; int waitTime = 200; while (!Debugger.IsAttached && countdown >= 0) { Thread.Sleep(waitTime); countdown -= waitTime; } if (!Debugger.IsAttached) { output.WriteLine("fatal error: timeout while waiting for debugger to attach"); return 2; } } IEventListener listener = CreateEventListener(options); var runner = new TextRunner(listener); runner.Load(options.scenarioFiles.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)); runner.IsDryRun = options.dryRun; foreach (string path in options.Parameters) { try { runner.LoadAssembly(path); } catch (FileNotFoundException e) { output.WriteLine(string.Format("File not found: {0}", path)); } } FeatureResults results = runner.Run(); PrintTimeTaken(t0); >>>>>>> if (options.waitForDebugger) { int countdown = 5000; int waitTime = 200; while (!Debugger.IsAttached && countdown >= 0) { Thread.Sleep(waitTime); countdown -= waitTime; } if (!Debugger.IsAttached) { output.WriteLine("fatal error: timeout while waiting for debugger to attach"); return 2; } } FeatureResults results = SetupAndRunStories(options, output); PrintTimeTaken(t0); <<<<<<< private static StoryResults SetupAndRunStories(ConsoleOptions options, PlainTextOutput output) { IEventListener listener = CreateEventListener(options); IEventListener remotableListener = new DelegatingListener(listener); string assemblyWithConfigFile = null; foreach (string path in options.Parameters) { if(File.Exists(path + ".config")) { assemblyWithConfigFile = path + ".config"; break; } } RemotableStoryRunner runner; if (assemblyWithConfigFile != null) { var configFileInfo = new FileInfo(assemblyWithConfigFile); AppDomainSetup ads = new AppDomainSetup { ConfigurationFile = configFileInfo.Name, ApplicationBase = configFileInfo.DirectoryName //Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) }; AppDomain ad = AppDomain.CreateDomain("NBehave story runner", null, ads); var bootstrapper = (AppDomainBootstrapper) ad.CreateInstanceFromAndUnwrap(typeof(AppDomainBootstrapper).Assembly.Location, typeof(AppDomainBootstrapper).FullName); bootstrapper.InitializeDomain(new[] { Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), configFileInfo.DirectoryName }); runner = (RemotableStoryRunner)ad.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(RemotableStoryRunner).FullName); } else { runner = new RemotableStoryRunner(); } return runner.SetupAndRunStories(remotableListener, options.scenarioFiles, options.Parameters, options.dryRun); } ======= private static void PrintTimeTaken(DateTime t0) { double timeTaken = DateTime.Now.Subtract(t0).TotalSeconds; if (timeTaken >= 60) { int totalMinutes = Convert.ToInt32(Math.Floor(timeTaken / 60)); System.Console.WriteLine("Time Taken {0}m {1:0.#}s", totalMinutes, timeTaken - 60); } else System.Console.WriteLine("Time Taken {0:0.#}s", timeTaken); } >>>>>>> private static FeatureResults SetupAndRunStories(ConsoleOptions options, PlainTextOutput output) { IEventListener listener = CreateEventListener(options); IEventListener remotableListener = new DelegatingListener(listener); string assemblyWithConfigFile = options.Parameters.Cast<string>() .Where(path => File.Exists(path + ".config")) .Select(path => path + ".config") .FirstOrDefault(); RemotableStoryRunner runner; if (assemblyWithConfigFile != null) { var configFileInfo = new FileInfo(assemblyWithConfigFile); var ads = new AppDomainSetup { ConfigurationFile = configFileInfo.Name, ApplicationBase = configFileInfo.DirectoryName //Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) }; AppDomain ad = AppDomain.CreateDomain("NBehave story runner", null, ads); var bootstrapper = (AppDomainBootstrapper)ad.CreateInstanceFromAndUnwrap(typeof(AppDomainBootstrapper).Assembly.Location, typeof(AppDomainBootstrapper).FullName); bootstrapper.InitializeDomain(new[] { Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), configFileInfo.DirectoryName }); runner = (RemotableStoryRunner)ad.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(RemotableStoryRunner).FullName); } else { runner = new RemotableStoryRunner(); } return runner.SetupAndRunStories(remotableListener, options.scenarioFiles, options.Parameters, options.dryRun, output); /*IEventListener listener = CreateEventListener(options); var runner = new TextRunner(listener); runner.Load(options.scenarioFiles.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)); runner.IsDryRun = options.dryRun; foreach (string path in options.Parameters) { try { runner.LoadAssembly(path); } catch (FileNotFoundException e) { output.WriteLine(string.Format("File not found: {0}", path)); } } return runner.Run();*/ } private static void PrintTimeTaken(DateTime t0) { double timeTaken = DateTime.Now.Subtract(t0).TotalSeconds; if (timeTaken >= 60) { int totalMinutes = Convert.ToInt32(Math.Floor(timeTaken / 60)); System.Console.WriteLine("Time Taken {0}m {1:0.#}s", totalMinutes, timeTaken - 60); } else System.Console.WriteLine("Time Taken {0:0.#}s", timeTaken); }
<<<<<<< Assert.Throws<DoesNotContainException>(() => "Lorem ipsum dolor sit amet".ShouldNotContain("ipsum")); ======= Assert.Throws<DoesNotContainException>(() => { "Lorem ipsum dolor sit amet".ShouldNotContain("ipsum"); }); >>>>>>> Assert.Throws<DoesNotContainException>(() => "Lorem ipsum dolor sit amet".ShouldNotContain("ipsum")); <<<<<<< Assert.Throws<ContainsException>(() => { var str = "Hello"; str.ShouldContain("Foo"); }); ======= Assert.Throws<ContainsException>(() => { var str = "Hello"; str.ShouldContain("Foo"); }); >>>>>>> Assert.Throws<ContainsException>(() => { var str = "Hello"; str.ShouldContain("Foo"); }); <<<<<<< Assert.Throws<ThrowsException>(() => (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); })); ======= Assert.Throws<ThrowsException>(() => { (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); }); }); >>>>>>> Assert.Throws<ThrowsException>(() => (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); })); <<<<<<< Assert.Throws<ThrowsException>(() => (typeof(ApplicationException)).ShouldBeThrownBy(() => { })); ======= Assert.Throws<ThrowsException>(() => { (typeof(ApplicationException)).ShouldBeThrownBy(() => { }); }); >>>>>>> Assert.Throws<ThrowsException>(() => (typeof(ApplicationException)).ShouldBeThrownBy(() => { })); <<<<<<< Assert.Throws<ThrowsException>(() => (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); })); ======= Assert.Throws<ThrowsException>(() => { (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); }); }); >>>>>>> Assert.Throws<ThrowsException>(() => (typeof(SystemException)).ShouldBeThrownBy(() => { throw new ApplicationException(); })); <<<<<<< var e = Assert.Throws<FalseException>(() => { Action action = () => { }; action.ShouldThrow<ArgumentException>(); }); Assert.That(e.Message, Is.EqualTo("Exception of type <System.ArgumentException> expected but no exception occurred")); ======= var ex = Assert.Throws(typeof(FalseException), () => { Action action = () => { }; action.ShouldThrow<ArgumentException>(); }); var expected = "Exception of type <System.ArgumentException> expected but no exception occurred" + Environment.NewLine + "Expected: False" + Environment.NewLine + "Actual: True"; Assert.AreEqual(expected, ex.Message); >>>>>>> var ex = Assert.Throws<FalseException>(() => { Action action = () => { }; action.ShouldThrow<ArgumentException>(); }); var expected = "Exception of type <System.ArgumentException> expected but no exception occurred" + Environment.NewLine + "Expected: False" + Environment.NewLine + "Actual: True"; Assert.AreEqual(expected, ex.Message); <<<<<<< Assert.Throws<IsTypeException>(() => { Action action = () => { throw new ApplicationException("blerg"); }; action.ShouldThrow<ArgumentException>(); }); ======= Assert.Throws<IsTypeException>(() => { Action action = () => { throw new ApplicationException("blerg"); }; action.ShouldThrow<ArgumentException>(); }); >>>>>>> Assert.Throws<IsTypeException>(() => { Action action = () => { throw new ApplicationException("blerg"); }; action.ShouldThrow<ArgumentException>(); });
<<<<<<< if (metadata.IsCollectionType) { validator = BuildCollectionValidator(prefix, metadata, validatorFactory); ======= validator = _validatorFactory.GetValidator(metadata.ModelType); if (validator == null && metadata.IsCollectionType) { validator = BuildCollectionValidator(prefix, metadata); >>>>>>> validator = _validatorFactory.GetValidator(metadata.ModelType); if (validator == null && metadata.IsCollectionType) { validator = BuildCollectionValidator(prefix, metadata); <<<<<<< else { validator = validatorFactory.GetValidator(metadata.ModelType); } ======= >>>>>>>
<<<<<<< object GetTheValue(Type propertyType, object value); ======= IDictionary<string, object> ToDictionary(Subaccount subaccount); >>>>>>> IDictionary<string, object> ToDictionary(Subaccount subaccount); object GetTheValue(Type propertyType, object value); <<<<<<< var valueMapper = valueMappers.FirstOrDefault(x => x.CanMap(propertyType, value)); return valueMapper == null ? value : valueMapper.Map(propertyType, value); ======= if (propertyType != typeof(int) && converters.ContainsKey(propertyType)) value = converters[propertyType].Invoke(this, BindingFlags.Default, null, new[] {value}, CultureInfo.CurrentCulture); else if (value != null && propertyType.Name.EndsWith("List`1") && propertyType.GetGenericArguments().Count() == 1 && converters.ContainsKey(propertyType.GetGenericArguments().First())) { var converter = converters[propertyType.GetGenericArguments().First()]; var list = (value as IEnumerable<object>).ToList(); if (list.Any()) value = list.Select(x => converter.Invoke(this, BindingFlags.Default, null, new[] {x}, CultureInfo.CurrentCulture)).ToList(); else value = null; } else if (value is bool?) value = value as bool? == true; else if (value is DateTimeOffset?) value = string.Format("{0:s}{0:zzz}", (DateTimeOffset?)value); else if (propertyType.IsEnum) value = value.ToString().ToLowerInvariant(); else if (value is IDictionary<string, object>) { var dictionary = (IDictionary<string, object>) value; var newDictionary = new Dictionary<string, object>(); foreach (var item in dictionary.Where(i => i.Value != null)) newDictionary[ToSnakeCase(item.Key)] = GetTheValue(item.Value.GetType(), item.Value); dictionary = newDictionary; value = dictionary.Count > 0 ? dictionary : null; } else if (value is IDictionary<string, string>) { var dictionary = (IDictionary<string, string>) value; value = dictionary.Count > 0 ? dictionary : null; } else if (value != null && value.GetType() != typeof(string) && value is IEnumerable) { var things = (from object thing in (IEnumerable) value select GetTheValue(thing.GetType(), thing)).ToList(); value = things.Count > 0 ? things : null; } else if (ThisIsAnAnonymousType(value)) { var newValue = new Dictionary<string, object>(); foreach (var property in value.GetType().GetProperties()) newValue[property.Name] = property.GetValue(value); value = GetTheValue(newValue.GetType(), newValue); } return value; } private static bool ThisIsAnAnonymousType(object value) { return value != null && (value.GetType().Name.Contains("AnonymousType") || value.GetType().Name.Contains("AnonType")); >>>>>>> var valueMapper = valueMappers.FirstOrDefault(x => x.CanMap(propertyType, value)); return valueMapper == null ? value : valueMapper.Map(propertyType, value);
<<<<<<< IDictionary<string, object> ToDictionary(RelayWebhook relayWebhook); IDictionary<string, object> ToDictionary(RelayWebhookMatch relayWebhookMatch); ======= IDictionary<string, object> ToDictionary(InboundDomain inboundDomain); >>>>>>> IDictionary<string, object> ToDictionary(RelayWebhook relayWebhook); IDictionary<string, object> ToDictionary(InboundDomain inboundDomain); IDictionary<string, object> ToDictionary(RelayWebhookMatch relayWebhookMatch); <<<<<<< public IDictionary<string, object> ToDictionary(RelayWebhook relayWebhook) { return WithCommonConventions(relayWebhook); } public IDictionary<string, object> ToDictionary(RelayWebhookMatch relayWebhookMatch) { return WithCommonConventions(relayWebhookMatch); } ======= public IDictionary<string, object> ToDictionary(InboundDomain inboundDomain) { return WithCommonConventions(inboundDomain); } >>>>>>> public IDictionary<string, object> ToDictionary(InboundDomain inboundDomain) { return WithCommonConventions(inboundDomain); } public IDictionary<string, object> ToDictionary(RelayWebhook relayWebhook) { return WithCommonConventions(relayWebhook); } public IDictionary<string, object> ToDictionary(RelayWebhookMatch relayWebhookMatch) { return WithCommonConventions(relayWebhookMatch); }
<<<<<<< public HtmlQuoteElement(Document owner) : this(owner, Tags.Quote) { } public HtmlQuoteElement(Document owner, String name, String prefix = null) : base(owner, name, prefix, name.Is(Tags.BlockQuote) ? NodeFlags.Special : NodeFlags.None) ======= public HtmlQuoteElement(Document owner, String name = null, String prefix = null) : base(owner, name ?? Tags.Quote, prefix, name.Equals(Tags.BlockQuote) ? NodeFlags.Special : NodeFlags.None) >>>>>>> public HtmlQuoteElement(Document owner, String name = null, String prefix = null) : base(owner, name ?? Tags.Quote, prefix, name.Is(Tags.BlockQuote) ? NodeFlags.Special : NodeFlags.None)
<<<<<<< if (medium == null || token.IsNot(CssTokenType.Comma, CssTokenType.EndOfFile)) ======= if (medium == null || token.IsNot(CssTokenType.Comma, CssTokenType.Eof)) { >>>>>>> if (medium == null || token.IsNot(CssTokenType.Comma, CssTokenType.EndOfFile)) {
<<<<<<< ======= using System.Collections.Generic; using System.Data; using System.IO; using System.Net; using System.Windows; using MySql.Data.MySqlClient; >>>>>>>
<<<<<<< logging.AddToLog("API - GetObjectProperty error: " + ex.Message, true); return dataset; ======= AddToLog("API - GetObjectProperty error: " + ex.Message, true); return props; >>>>>>> logging.AddToLog("API - GetObjectProperty error: " + ex.Message, true); return props; <<<<<<< ======= >>>>>>>
<<<<<<< if (value.Label == "Level") { OSAEObjectTypeManager.ObjectTypeMethodAdd("ON", "On", objType, "Level", "", "", ""); OSAEObjectTypeManager.ObjectTypePropertyAdd("Level", "Integer", "", objType, false); } else OSAEObjectTypeManager.ObjectTypeMethodAdd("ON", "On", objType, "", "", "", ""); ======= if(value.Label == "Level") OSAEObjectTypeManager.ObjectTypePropertyAdd("Level", "Integer", "", "", objType, false); >>>>>>> if (value.Label == "Level") { OSAEObjectTypeManager.ObjectTypeMethodAdd("ON", "On", objType, "Level", "", "", ""); } else OSAEObjectTypeManager.ObjectTypeMethodAdd("ON", "On", objType, "", "", "", ""); <<<<<<< Log.Debug("Adding property: " + value.Label); OSAEObjectTypeManager.ObjectTypePropertyAdd(value.Label, "Integer", "", objType, false); ======= OSAEObjectTypeManager.ObjectTypePropertyAdd(value.Label, "Integer", "", "", objType, false); >>>>>>> Log.Debug("Adding property: " + value.Label);
<<<<<<< public static void Html5Test() { //We require a custom configuration var config = new Configuration(); //Including a script engine config.Register(new JavaScriptEngine()); //And enabling scripting + styling (should be enabled anyway) config.IsScripting = true; config.IsStyling = true; var document = DocumentBuilder.Html(new Uri("http://html5test.com/"), config); var points = document.QuerySelector("#score > .pointsPanel > h2 > strong").TextContent; Console.WriteLine("AngleSharp received {0} points form HTML5Test.com", points); } ======= static void LegacyEventScriptingExample() { //We require a custom configuration var config = new Configuration(); //Including a script engine config.Register(new JavaScriptEngine()); //And enabling scripting config.IsScripting = true; //This is our sample source, we will trigger the load event var source = @"<!doctype html> <html> <head><title>Legacy event sample</title></head> <body> <script> console.log('Before setting the handler via onload!'); document.onload = function() { console.log('Document loaded (legacy way)!'); }; console.log('After setting the handler via onload!'); </script> </body>"; var document = DocumentBuilder.Html(source, config); //HTML should be output in the end Console.WriteLine(document.DocumentElement.OuterHtml); } >>>>>>> static void Html5Test() { //We require a custom configuration var config = new Configuration(); //Including a script engine config.Register(new JavaScriptEngine()); //And enabling scripting + styling (should be enabled anyway) config.IsScripting = true; config.IsStyling = true; var document = DocumentBuilder.Html(new Uri("http://html5test.com/"), config); var points = document.QuerySelector("#score > .pointsPanel > h2 > strong").TextContent; Console.WriteLine("AngleSharp received {0} points form HTML5Test.com", points); } static void LegacyEventScriptingExample() { //We require a custom configuration var config = new Configuration(); //Including a script engine config.Register(new JavaScriptEngine()); //And enabling scripting config.IsScripting = true; //This is our sample source, we will trigger the load event var source = @"<!doctype html> <html> <head><title>Legacy event sample</title></head> <body> <script> console.log('Before setting the handler via onload!'); document.onload = function() { console.log('Document loaded (legacy way)!'); }; console.log('After setting the handler via onload!'); </script> </body>"; var document = DocumentBuilder.Html(source, config); //HTML should be output in the end Console.WriteLine(document.DocumentElement.OuterHtml); }
<<<<<<< //System.Timers.Timer timer = new System.Timers.Timer(); System.Timers.Timer updates = new System.Timers.Timer(); //System.Timers.Timer checkPlugins = new System.Timers.Timer(); ======= private System.Timers.Timer timer = new System.Timers.Timer(); private System.Timers.Timer updates = new System.Timers.Timer(); private System.Timers.Timer checkPlugins = new System.Timers.Timer(); >>>>>>> //System.Timers.Timer timer = new System.Timers.Timer(); private System.Timers.Timer updates = new System.Timers.Timer(); //System.Timers.Timer checkPlugins = new System.Timers.Timer(); <<<<<<< //checkPlugins.Enabled = false; running = false; if (sHost.State == CommunicationState.Opened) sHost.Close(); serviceHost.Close(); osae.AddToLog("shutting down plugins", true); foreach (Plugin p in plugins) ======= // run the shutdown as a task so that the plugins don't prevent us from closing // as we can't guarantee the quality of a third party plugin var taskA = new Task(() => >>>>>>> // run the shutdown as a task so that the plugins don't prevent us from closing // as we can't guarantee the quality of a third party plugin var taskA = new Task(() => <<<<<<< sendMessageToClients(WCF.OSAEWCFMessageType.LOG, "found method in queue: " + method.ObjectName + ======= sendMessageToClients("log", "found method in queue: " + method.ObjectName + >>>>>>> sendMessageToClients(WCF.OSAEWCFMessageType.LOG, "found method in queue: " + method.ObjectName + <<<<<<< osae.AddToLog("Error in QueryCommandQueue: " + ex.Message, true); ======= logging.AddToLog("Error in QueryCommandQueue: " + ex.Message, true); //timer.Enabled = true; >>>>>>> logging.AddToLog("Error in QueryCommandQueue: " + ex.Message, true); <<<<<<< osae.AddToLog("Plugin added to DB: " + plugin.PluginName, true); sendMessageToClients(WCF.OSAEWCFMessageType.PLUGIN, plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Stopped | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); ======= logging.AddToLog("Plugin added to DB: " + plugin.PluginName, true); sendMessageToClients("plugin", plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Stopped | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); >>>>>>> logging.AddToLog("Plugin added to DB: " + plugin.PluginName, true); sendMessageToClients(WCF.OSAEWCFMessageType.PLUGIN, plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Stopped | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); <<<<<<< osae.AddToLog("received message: " + e.Message, false); if (e.Message.Type == WCF.OSAEWCFMessageType.CONNECT) ======= logging.AddToLog("received message: " + e.Message, false); if (e.Message == "connected") >>>>>>> logging.AddToLog("received message: " + e.Message, false); if (e.Message.Type == WCF.OSAEWCFMessageType.CONNECT) <<<<<<< osae.AddToLog("Sending message to clients: " + msgType + " - " + message, false); WCF.OSAEWCFMessage msg = new WCF.OSAEWCFMessage(); msg.Type = msgType; msg.Message = message; msg.From = osae.ComputerName; msg.TimeSent = DateTime.Now; Thread thread = new Thread(() => wcfService.SendMessageToClients(msg)); ======= logging.AddToLog("Sending message to clients: " + msgType + " - " + message, false); Thread thread = new Thread(() => wcfService.SendMessageToClients(msgType, message, osae.ComputerName)); >>>>>>> logging.AddToLog("Sending message to clients: " + msgType + " - " + message, false); WCF.OSAEWCFMessage msg = new WCF.OSAEWCFMessage(); msg.Type = msgType; msg.Message = message; msg.From = osae.ComputerName; msg.TimeSent = DateTime.Now; Thread thread = new Thread(() => wcfService.SendMessageToClients(msg)); <<<<<<< sendMessageToClients(WCF.OSAEWCFMessageType.PLUGIN, plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Running | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); osae.AddToLog("Plugin enabled: " + plugin.PluginName, true); ======= sendMessageToClients("plugin", plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Running | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); logging.AddToLog("Plugin enabled: " + plugin.PluginName, true); >>>>>>> sendMessageToClients(WCF.OSAEWCFMessageType.PLUGIN, plugin.PluginName + " | " + plugin.Enabled.ToString() + " | " + plugin.PluginVersion + " | Running | " + plugin.LatestAvailableVersion + " | " + plugin.PluginType + " | " + osae.ComputerName); logging.AddToLog("Plugin enabled: " + plugin.PluginName, true);
<<<<<<< ======= using System; using System.Linq; using System.Threading.Tasks; >>>>>>> using System; using System.Linq; using System.Threading.Tasks;
<<<<<<< public partial class StudentContactService : IStudentContactService { private readonly IStorageBroker storageBroker; private readonly ILoggingBroker loggingBroker; public StudentContactService( IStorageBroker storageBroker, ILoggingBroker loggingBroker) { this.storageBroker = storageBroker; this.loggingBroker = loggingBroker; } public ValueTask<StudentContact> AddStudentContactAsync(StudentContact studentContact) => TryCatch(async () => { ValidateStudentContactOnCreate(studentContact); return await this.storageBroker.InsertStudentContactAsync(studentContact); }); public IQueryable<StudentContact> RetrieveAllStudentContacts() => TryCatch(() => { IQueryable<StudentContact> storageStudentContacts = this.storageBroker.SelectAllStudentContacts(); ValidateStorageStudentContacts(storageStudentContacts); return storageStudentContacts; }); } ======= public partial class StudentContactService : IStudentContactService { private readonly IStorageBroker storageBroker; private readonly ILoggingBroker loggingBroker; public StudentContactService( IStorageBroker storageBroker, ILoggingBroker loggingBroker) { this.storageBroker = storageBroker; this.loggingBroker = loggingBroker; } public IQueryable<StudentContact> RetrieveAllStudentContacts() => TryCatch(() => { IQueryable<StudentContact> storageStudentContacts = this.storageBroker.SelectAllStudentContacts(); ValidateStorageStudentContacts(storageStudentContacts); return storageStudentContacts; }); public ValueTask<StudentContact> RetrieveStudentContactByIdAsync(Guid studentId, Guid contactId) => TryCatch(async () => { ValidateStudentContactIdIsNull(studentId, contactId); StudentContact storageStudentContact = await this.storageBroker.SelectStudentContactByIdAsync(studentId, contactId); ValidateStorageStudentContact(storageStudentContact, studentId, contactId); return storageStudentContact; }); } >>>>>>> public partial class StudentContactService : IStudentContactService { private readonly IStorageBroker storageBroker; private readonly ILoggingBroker loggingBroker; public StudentContactService( IStorageBroker storageBroker, ILoggingBroker loggingBroker) { this.storageBroker = storageBroker; this.loggingBroker = loggingBroker; } public ValueTask<StudentContact> AddStudentContactAsync(StudentContact studentContact) => TryCatch(async () => { ValidateStudentContactOnCreate(studentContact); return await this.storageBroker.InsertStudentContactAsync(studentContact); }); public IQueryable<StudentContact> RetrieveAllStudentContacts() => TryCatch(() => { IQueryable<StudentContact> storageStudentContacts = this.storageBroker.SelectAllStudentContacts(); ValidateStorageStudentContacts(storageStudentContacts); return storageStudentContacts; }); public ValueTask<StudentContact> RetrieveStudentContactByIdAsync(Guid studentId, Guid contactId) => TryCatch(async () => { ValidateStudentContactIdIsNull(studentId, contactId); StudentContact storageStudentContact = await this.storageBroker.SelectStudentContactByIdAsync(studentId, contactId); ValidateStorageStudentContact(storageStudentContact, studentId, contactId); return storageStudentContact; }); }
<<<<<<< [Fact] public void ShouldRetrieveAllStudentSemesterCourses() { //given IQueryable<StudentSemesterCourse> randomSemesterCourses = CreateRandomStudentSemesterCourses(); IQueryable<StudentSemesterCourse> storageStudentSemesterCourses = randomSemesterCourses; IQueryable<StudentSemesterCourse> expectedStudentSemesterCourses = storageStudentSemesterCourses; this.storageBrokerMock.Setup(broker => broker.SelectAllStudentSemesterCourses()) .Returns(storageStudentSemesterCourses); // when IQueryable<StudentSemesterCourse> actualStudentSemesterCourses = this.studentSemesterCourseService.RetrieveAllStudentSemesterCourses(); actualStudentSemesterCourses.Should().BeEquivalentTo(expectedStudentSemesterCourses); this.storageBrokerMock.Verify(broker => broker.SelectAllStudentSemesterCourses(), Times.Once); this.storageBrokerMock.VerifyNoOtherCalls(); this.loggingBrokerMock.VerifyNoOtherCalls(); this.dateTimeBrokerMock.VerifyNoOtherCalls(); } ======= [Fact] public async Task ShouldDeleteStudentSemesterCourseAsync() { // given DateTimeOffset dateTime = GetRandomDateTime(); StudentSemesterCourse randomStudentSemesterCourse = CreateRandomStudentSemesterCourse(dateTime); Guid inputSemesterCourseId = randomStudentSemesterCourse.SemesterCourseId; Guid inputStudentId = randomStudentSemesterCourse.StudentId; StudentSemesterCourse inputStudentSemesterCourse = randomStudentSemesterCourse; StudentSemesterCourse storageStudentSemesterCourse = inputStudentSemesterCourse; StudentSemesterCourse expectedStudentSemesterCourse = storageStudentSemesterCourse; this.storageBrokerMock.Setup(broker => broker.SelectStudentSemesterCourseByIdAsync(inputSemesterCourseId, inputStudentId)) .ReturnsAsync(inputStudentSemesterCourse); this.storageBrokerMock.Setup(broker => broker.DeleteStudentSemesterCourseAsync(inputStudentSemesterCourse)) .ReturnsAsync(storageStudentSemesterCourse); // when StudentSemesterCourse actualStudentSemesterCourse = await this.studentSemesterCourseService.DeleteStudentSemesterCourseAsync(inputSemesterCourseId, inputStudentId); actualStudentSemesterCourse.Should().BeEquivalentTo(expectedStudentSemesterCourse); this.storageBrokerMock.Verify(broker => broker.SelectStudentSemesterCourseByIdAsync(inputSemesterCourseId, inputStudentId), Times.Once); this.storageBrokerMock.Verify(broker => broker.DeleteStudentSemesterCourseAsync(inputStudentSemesterCourse), Times.Once); this.storageBrokerMock.VerifyNoOtherCalls(); this.loggingBrokerMock.VerifyNoOtherCalls(); this.dateTimeBrokerMock.VerifyNoOtherCalls(); } >>>>>>> [Fact] public void ShouldRetrieveAllStudentSemesterCourses() { //given IQueryable<StudentSemesterCourse> randomSemesterCourses = CreateRandomStudentSemesterCourses(); IQueryable<StudentSemesterCourse> storageStudentSemesterCourses = randomSemesterCourses; IQueryable<StudentSemesterCourse> expectedStudentSemesterCourses = storageStudentSemesterCourses; this.storageBrokerMock.Setup(broker => broker.SelectAllStudentSemesterCourses()) .Returns(storageStudentSemesterCourses); // when IQueryable<StudentSemesterCourse> actualStudentSemesterCourses = this.studentSemesterCourseService.RetrieveAllStudentSemesterCourses(); actualStudentSemesterCourses.Should().BeEquivalentTo(expectedStudentSemesterCourses); this.storageBrokerMock.Verify(broker => broker.SelectAllStudentSemesterCourses(), Times.Once); this.storageBrokerMock.VerifyNoOtherCalls(); this.loggingBrokerMock.VerifyNoOtherCalls(); this.dateTimeBrokerMock.VerifyNoOtherCalls(); } [Fact] public async Task ShouldDeleteStudentSemesterCourseAsync() { // given DateTimeOffset dateTime = GetRandomDateTime(); StudentSemesterCourse randomStudentSemesterCourse = CreateRandomStudentSemesterCourse(dateTime); Guid inputSemesterCourseId = randomStudentSemesterCourse.SemesterCourseId; Guid inputStudentId = randomStudentSemesterCourse.StudentId; StudentSemesterCourse inputStudentSemesterCourse = randomStudentSemesterCourse; StudentSemesterCourse storageStudentSemesterCourse = inputStudentSemesterCourse; StudentSemesterCourse expectedStudentSemesterCourse = storageStudentSemesterCourse; this.storageBrokerMock.Setup(broker => broker.SelectStudentSemesterCourseByIdAsync(inputSemesterCourseId, inputStudentId)) .ReturnsAsync(inputStudentSemesterCourse); this.storageBrokerMock.Setup(broker => broker.DeleteStudentSemesterCourseAsync(inputStudentSemesterCourse)) .ReturnsAsync(storageStudentSemesterCourse); // when StudentSemesterCourse actualStudentSemesterCourse = await this.studentSemesterCourseService.DeleteStudentSemesterCourseAsync(inputSemesterCourseId, inputStudentId); actualStudentSemesterCourse.Should().BeEquivalentTo(expectedStudentSemesterCourse); this.storageBrokerMock.Verify(broker => broker.SelectStudentSemesterCourseByIdAsync(inputSemesterCourseId, inputStudentId), Times.Once); this.storageBrokerMock.Verify(broker => broker.DeleteStudentSemesterCourseAsync(inputStudentSemesterCourse), Times.Once); this.storageBrokerMock.VerifyNoOtherCalls(); this.loggingBrokerMock.VerifyNoOtherCalls(); this.dateTimeBrokerMock.VerifyNoOtherCalls(); }
<<<<<<< [HttpGet] public ActionResult<IQueryable<SemesterCourse>> GetAllSemesterCourse() { try { IQueryable storageClassrooms = this.semesterCourseService.RetrieveAllSemesterCourse(); return Ok(storageClassrooms); } catch (SemesterCourseDependencyException semesterCourseDependencyException) { return Problem(semesterCourseDependencyException.Message); } catch (SemesterCourseServiceException semesterCourseServiceException) { return Problem(semesterCourseServiceException.Message); } } ======= [HttpPut] public async ValueTask<ActionResult<SemesterCourse>> PutSemesterCourseAsync(SemesterCourse semesterCourse) { try { SemesterCourse registeredSemesterCourse = await this.semesterCourseService.ModifySemesterCourseAsync(semesterCourse); return Ok(registeredSemesterCourse); } catch (SemesterCourseValidationException semesterCourseValidationException) when (semesterCourseValidationException.InnerException is NotFoundSemesterCourseException) { string innerMessage = GetInnerMessage(semesterCourseValidationException); return NotFound(innerMessage); } catch (SemesterCourseValidationException semesterCourseValidationException) { string innerMessage = GetInnerMessage(semesterCourseValidationException); return BadRequest(innerMessage); } catch (SemesterCourseDependencyException semesterCourseDependencyException) when (semesterCourseDependencyException.InnerException is LockedSemesterCourseException) { string innerMessage = GetInnerMessage(semesterCourseDependencyException); return Locked(innerMessage); } catch (SemesterCourseDependencyException semesterCourseDependencyException) { return Problem(semesterCourseDependencyException.Message); } catch (SemesterCourseServiceException semesterCourseServiceException) { return Problem(semesterCourseServiceException.Message); } } >>>>>>> [HttpGet] public ActionResult<IQueryable<SemesterCourse>> GetAllSemesterCourse() { try { IQueryable storageClassrooms = this.semesterCourseService.RetrieveAllSemesterCourse(); return Ok(storageClassrooms); } catch (SemesterCourseDependencyException semesterCourseDependencyException) { return Problem(semesterCourseDependencyException.Message); } catch (SemesterCourseServiceException semesterCourseServiceException) { return Problem(semesterCourseServiceException.Message); } } [HttpPut] public async ValueTask<ActionResult<SemesterCourse>> PutSemesterCourseAsync(SemesterCourse semesterCourse) { try { SemesterCourse registeredSemesterCourse = await this.semesterCourseService.ModifySemesterCourseAsync(semesterCourse); return Ok(registeredSemesterCourse); } catch (SemesterCourseValidationException semesterCourseValidationException) when (semesterCourseValidationException.InnerException is NotFoundSemesterCourseException) { string innerMessage = GetInnerMessage(semesterCourseValidationException); return NotFound(innerMessage); } catch (SemesterCourseValidationException semesterCourseValidationException) { string innerMessage = GetInnerMessage(semesterCourseValidationException); return BadRequest(innerMessage); } catch (SemesterCourseDependencyException semesterCourseDependencyException) when (semesterCourseDependencyException.InnerException is LockedSemesterCourseException) { string innerMessage = GetInnerMessage(semesterCourseDependencyException); return Locked(innerMessage); } }
<<<<<<< [HttpGet] public ActionResult<IQueryable<StudentSemesterCourse>> GetAllStudentSemesterCourse() { try { IQueryable storageStudentSemesterCourses = this.studentSemesterCourseService.RetrieveAllStudentSemesterCourses(); return Ok(storageStudentSemesterCourses); } catch (StudentSemesterCourseDependencyException studentSemesterCourseDependencyException) { return Problem(studentSemesterCourseDependencyException.Message); } catch (StudentSemesterCourseServiceException studentSemesterCourseServiceException) { return Problem(studentSemesterCourseServiceException.Message); } } ======= [HttpDelete("students/{studentId}/semesters/{semesterId}")] public async ValueTask<ActionResult<StudentSemesterCourse>> DeleteStudentSemesterCourseAsync(Guid semesterCourseId, Guid studentId) { try { StudentSemesterCourse storageStudentSemesterCourse = await this.studentSemesterCourseService.DeleteStudentSemesterCourseAsync(semesterCourseId, studentId); return Ok(storageStudentSemesterCourse); } catch (StudentSemesterCourseValidationException studentSemesterCourseValidationException) when (studentSemesterCourseValidationException.InnerException is NotFoundStudentSemesterCourseException) { string innerMessage = GetInnerMessage(studentSemesterCourseValidationException); return NotFound(innerMessage); } catch (StudentSemesterCourseValidationException studentSemesterCourseValidationException) { return BadRequest(studentSemesterCourseValidationException.Message); } catch (StudentSemesterCourseDependencyException studentSemesterCourseDependencyException) when (studentSemesterCourseDependencyException.InnerException is LockedStudentSemesterCourseException) { string innerMessage = GetInnerMessage(studentSemesterCourseDependencyException); return Locked(innerMessage); } catch (StudentSemesterCourseDependencyException studentSemesterCourseDependencyException) { return Problem(studentSemesterCourseDependencyException.Message); } catch (StudentSemesterCourseServiceException studentSemesterCourseServiceException) { return Problem(studentSemesterCourseServiceException.Message); } } >>>>>>> [HttpGet] public ActionResult<IQueryable<StudentSemesterCourse>> GetAllStudentSemesterCourse() { try { IQueryable storageStudentSemesterCourses = this.studentSemesterCourseService.RetrieveAllStudentSemesterCourses(); return Ok(storageStudentSemesterCourses); } catch (StudentSemesterCourseDependencyException studentSemesterCourseDependencyException) { return Problem(studentSemesterCourseDependencyException.Message); } catch (StudentSemesterCourseServiceException studentSemesterCourseServiceException) { return Problem(studentSemesterCourseServiceException.Message); } } [HttpDelete("students/{studentId}/semesters/{semesterId}")] public async ValueTask<ActionResult<StudentSemesterCourse>> DeleteStudentSemesterCourseAsync(Guid semesterCourseId, Guid studentId) { try { StudentSemesterCourse storageStudentSemesterCourse = await this.studentSemesterCourseService.DeleteStudentSemesterCourseAsync(semesterCourseId, studentId); return Ok(storageStudentSemesterCourse); } catch (StudentSemesterCourseValidationException studentSemesterCourseValidationException) when (studentSemesterCourseValidationException.InnerException is NotFoundStudentSemesterCourseException) { string innerMessage = GetInnerMessage(studentSemesterCourseValidationException); return NotFound(innerMessage); } catch (StudentSemesterCourseValidationException studentSemesterCourseValidationException) { return BadRequest(studentSemesterCourseValidationException.Message); } catch (StudentSemesterCourseDependencyException studentSemesterCourseDependencyException) when (studentSemesterCourseDependencyException.InnerException is LockedStudentSemesterCourseException) { string innerMessage = GetInnerMessage(studentSemesterCourseDependencyException); return Locked(innerMessage); } }
<<<<<<< using System.Collections.Generic; using System.Linq; ======= using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Runtime.Serialization; >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Runtime.Serialization; <<<<<<< ======= private static int GetRandomNumber() => new IntRange(min: 2, max: 10).GetValue(); private static DateTimeOffset GetRandomDateTime() => new DateTimeRange(earliestDate: new DateTime()).GetValue(); private Course CreateRandomCourse(DateTimeOffset dateTime) => CreateRandomCourseFiller(dateTime).Create(); >>>>>>> private static int GetRandomNumber() => new IntRange(min: 2, max: 10).GetValue(); <<<<<<< public static IEnumerable<object[]> InvalidMinuteCases() { int randomMoreThanMinuteFromNow = GetRandomNumber(); int randomMoreThanMinuteBeforeNow = GetNegativeRandomNumber(); ======= private static int GetNegativeRandomNumber() => -1 * GetRandomNumber(); public static IEnumerable<object[]> InvalidMinuteCases() { int randomMoreThanMinuteFromNow = GetRandomNumber(); int randomMoreThanMinuteBeforeNow = GetNegativeRandomNumber(); return new List<object[]> { new object[] { randomMoreThanMinuteFromNow }, new object[] { randomMoreThanMinuteBeforeNow } }; } private static SqlException GetSqlException() => (SqlException)FormatterServices.GetUninitializedObject(typeof(SqlException)); >>>>>>> public static IEnumerable<object[]> InvalidMinuteCases() { int randomMoreThanMinuteFromNow = GetRandomNumber(); int randomMoreThanMinuteBeforeNow = GetNegativeRandomNumber();