conflict_resolution
stringlengths
27
16k
<<<<<<< public bool waitDecline { get; set; } ======= public int MinimumDelay { get; set; } >>>>>>> public bool waitDecline { get; set; } public int MinimumDelay { get; set; } <<<<<<< minStandings = 10; ======= MinimumDelay = 0; >>>>>>> MinimumDelay = 0; minStandings = 10; <<<<<<< minStandings = (float?) xml.Element("minStandings") ?? 10; UseGatesInSalvage = (bool?)xml.Element("useGatesInSalvage") ?? false; ======= MinimumDelay = (int?)xml.Element("minimumDelay") ?? 0; BattleshipInvasionLimit = (int?)xml.Element("battleshipInvasionLimit") ?? 0; BattlecruiserInvasionLimit = (int?)xml.Element("battlecruiserInvasionLimit") ?? 0; CruiserInvasionLimit = (int?)xml.Element("cruiserInvasionLimit") ?? 0; FrigateInvasionLimit = (int?)xml.Element("frigateInvasionLimit") ?? 0; InvasionRandomDelay = (int?)xml.Element("invasionRandomDelay") ?? 0; InvasionMinimumDelay = (int?)xml.Element("invasionMinimumDelay") ?? 0; >>>>>>> MinimumDelay = (int?)xml.Element("minimumDelay") ?? 0; minStandings = (float?) xml.Element("minStandings") ?? 10; UseGatesInSalvage = (bool?)xml.Element("useGatesInSalvage") ?? false; BattleshipInvasionLimit = (int?)xml.Element("battleshipInvasionLimit") ?? 0; BattlecruiserInvasionLimit = (int?)xml.Element("battlecruiserInvasionLimit") ?? 0; CruiserInvasionLimit = (int?)xml.Element("cruiserInvasionLimit") ?? 0; FrigateInvasionLimit = (int?)xml.Element("frigateInvasionLimit") ?? 0; InvasionRandomDelay = (int?)xml.Element("invasionRandomDelay") ?? 0; InvasionMinimumDelay = (int?)xml.Element("invasionMinimumDelay") ?? 0;
<<<<<<< _questor = new Questor(this); ======= _questor = new Questor(); LavishScript.Commands.AddCommand("SetAutoStart", SetAutoStart); LavishScript.Commands.AddCommand("SetDisable3D", SetDisable3D); LavishScript.Commands.AddCommand("SetExitWhenIdle", SetExitWhenIdle); } private int SetAutoStart(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetAutoStart true|false"); return -1; } _questor.AutoStart = value; Logging.Log("AutoStart is turned " + (value ? "[on]" : "[off]")); return 0; } private int SetDisable3D(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetDisable3D true|false"); return -1; } _questor.Disable3D = value; Logging.Log("Disable3D is turned " + (value ? "[on]" : "[off]")); return 0; } private int SetExitWhenIdle(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetExitWhenIdle true|false"); Logging.Log("Note: AutoStart is automatically turned off when ExitWhenIdle is turned on"); return -1; } _questor.ExitWhenIdle = value; Logging.Log("ExitWhenIdle is turned " + (value ? "[on]" : "[off]")); if (value && _questor.AutoStart) { _questor.AutoStart = false; Logging.Log("AutoStart is turned [off]"); } return 0; >>>>>>> _questor = new Questor(this); LavishScript.Commands.AddCommand("SetAutoStart", SetAutoStart); LavishScript.Commands.AddCommand("SetDisable3D", SetDisable3D); LavishScript.Commands.AddCommand("SetExitWhenIdle", SetExitWhenIdle); } private int SetAutoStart(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetAutoStart true|false"); return -1; } _questor.AutoStart = value; Logging.Log("AutoStart is turned " + (value ? "[on]" : "[off]")); return 0; } private int SetDisable3D(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetDisable3D true|false"); return -1; } _questor.Disable3D = value; Logging.Log("Disable3D is turned " + (value ? "[on]" : "[off]")); return 0; } private int SetExitWhenIdle(string[] args) { bool value; if (args.Length != 2 || !bool.TryParse(args[1], out value)) { Logging.Log("SetExitWhenIdle true|false"); Logging.Log("Note: AutoStart is automatically turned off when ExitWhenIdle is turned on"); return -1; } _questor.ExitWhenIdle = value; Logging.Log("ExitWhenIdle is turned " + (value ? "[on]" : "[off]")); if (value && _questor.AutoStart) { _questor.AutoStart = false; Logging.Log("AutoStart is turned [off]"); } return 0;
<<<<<<< // // create HMAC signature using this registration key // var secretKeyBase64ByteArray = Convert.FromBase64String(base64key); // string signature = ""; // using ( HMACSHA256 hmac = new HMACSHA256(secretKeyBase64ByteArray)) { // byte[] authenticationKeyBytes = Encoding.UTF8.GetBytes(stringToSign); // byte[] authenticationHash = hmac.ComputeHash(authenticationKeyBytes); // signature = Convert.ToBase64String(authenticationHash); // } // // compare what node sent to what we made // string AuthToMatch = authorization.Replace("Shared ",""); // logger.LogDebug("Comparing keys:\nRcvd {0} \nMade {1}", AuthToMatch, signature ); // if (AuthToMatch == signature) { // logger.LogDebug("Node is authorized"); // Valid = true; // break; // } // } // // Because this is a PUT, we're only expected to return an HTTP status code // // TODO we also need to call Set-TugNodeRegistration if the node was valid // if (Valid) { // // TODO return HTTP 200 // return context.Response.WriteAsync($"Registering node {AgentId}"); // } else { // // TODO return HTTP 404(? check spec) // return context.Response.WriteAsync($"Registering node {AgentId}"); // } // } // ); // // with everything defined, kick it off // var routes = routeBuilder.Build(); // app.UseRouter(routes); ======= // create HMAC signature using this registration key var secretKeyBase64ByteArray = Convert.FromBase64String(base64key); string signature = ""; using ( HMACSHA256 hmac = new HMACSHA256(secretKeyBase64ByteArray)) { byte[] authenticationKeyBytes = Encoding.UTF8.GetBytes(stringToSign); byte[] authenticationHash = hmac.ComputeHash(authenticationKeyBytes); signature = Convert.ToBase64String(authenticationHash); } // compare what node sent to what we made string AuthToMatch = authorization.Replace("Shared ",""); logger.LogDebug("Comparing keys:\nRcvd {0} \nMade {1}", AuthToMatch, signature ); if (AuthToMatch == signature) { logger.LogDebug("Node is authorized"); Valid = true; break; } } // Because this is a PUT, we're only expected to return an HTTP status code // TODO we also need to call Set-TugNodeRegistration if the node was valid if (Valid) { // TODO return HTTP 200 return context.Response.WriteAsync($"Registering node {AgentId}"); } else { // TODO return HTTP 404(? check spec) return context.Response.WriteAsync($"Registering node {AgentId}"); } /* TODO: Run Register-TugNode to register this node, padding node details as paramaters. Note that the command must deal with duplicate registrations (e.g., update data or ignore or whatever) */ } ); // DSC Action routeBuilder.MapPost("Nodes(AgentId={AgentId})/DscAction", context => { logger.LogInformation("\n\n\nPOST: DSC action request"); string AgentId = context.GetRouteData().Values["AgentId"].ToString(); string Body = new StreamReader(context.Request.Body).ReadToEnd(); var Headers = context.Request.Headers; logger.LogDebug("AgentId {AgentId}, Request Body {Body}, Headers {Headers}",AgentId,Body,Headers); /* TODO: Run Get-TugDscAction, passing node information. Command is expected to return an action, which will be returned to the node. */ return context.Response.WriteAsync($"DSC action for node {AgentId}"); } ); // Asking for a MOF routeBuilder.MapPost("Nodes(AgentId={AgentId})/Configurations(ConfigurationName={ConfigurationName})/ConfigurationContent", context => { logger.LogInformation("\n\n\nPOST: MOF request"); string AgentId = context.GetRouteData().Values["AgentId"].ToString(); string ConfigurationName = context.GetRouteData().Values["ConfigurationName"].ToString(); string Body = new StreamReader(context.Request.Body).ReadToEnd(); var Headers = context.Request.Headers; logger.LogDebug("AgentId {AgentId}, Configuration {Config}, Request Body {Body}, Headers {Headers}",AgentId,ConfigurationName,Body,Headers); /* TODO: Call Get-TugDscMOF, passing agent information. Command is expected to return the MOF, encoded for transmission to the node. */ return context.Response.WriteAsync($"Request from node {AgentId} for configuration {ConfigurationName}"); } ); // Asking for a module routeBuilder.MapPost("Modules(ModuleName={ModuleName},ModuleVersion={ModuleVersion})/ModuleContent", context => { logger.LogInformation("\n\n\nPOST: Module request"); string ModuleName = context.GetRouteData().Values["ModuleName"].ToString(); string ModuleVersion = context.GetRouteData().Values["ModuleVersion"].ToString(); string Body = new StreamReader(context.Request.Body).ReadToEnd(); var Headers = context.Request.Headers; logger.LogDebug("Module name {ModuleName}, Version {Version}, Request Body {Body}, Headers {Headers}",ModuleName,ModuleVersion,Body,Headers); /* TODO: Call Get-TugDscModule, passing agent information. Command is expected to return the module ZIP file, encoded for transmission to the node. */ return context.Response.WriteAsync($"Module request for {ModuleName} version {ModuleVersion}"); } ); // Sending a report routeBuilder.MapPost("Nodes(AgentId={AgentId})/SendReport", context => { logger.LogInformation("\n\n\nPOST: Report delivery"); string AgentId = context.GetRouteData().Values["AgentId"].ToString(); string Body = new StreamReader(context.Request.Body).ReadToEnd(); var Headers = context.Request.Headers; logger.LogDebug("AgentId {AgentId}, Request Body {Body}, Headers {Headers}",AgentId,Body,Headers); /* TODO: Call Save-TugReport, passing report info. Command is expected to save the report info in whatever way it wants to. */ return context.Response.WriteAsync($"Report from node {AgentId}"); } ); // with everything defined, kick it off var routes = routeBuilder.Build(); app.UseRouter(routes); >>>>>>> // // create HMAC signature using this registration key // var secretKeyBase64ByteArray = Convert.FromBase64String(base64key); // string signature = ""; // using ( HMACSHA256 hmac = new HMACSHA256(secretKeyBase64ByteArray)) { // byte[] authenticationKeyBytes = Encoding.UTF8.GetBytes(stringToSign); // byte[] authenticationHash = hmac.ComputeHash(authenticationKeyBytes); // signature = Convert.ToBase64String(authenticationHash); // } // // // compare what node sent to what we made // string AuthToMatch = authorization.Replace("Shared ",""); // logger.LogDebug("Comparing keys:\nRcvd {0} \nMade {1}", AuthToMatch, signature ); // if (AuthToMatch == signature) { // logger.LogDebug("Node is authorized"); // Valid = true; // break; // } // } // // // Because this is a PUT, we're only expected to return an HTTP status code // // TODO we also need to call Set-TugNodeRegistration if the node was valid // if (Valid) { // // TODO return HTTP 200 // return context.Response.WriteAsync($"Registering node {AgentId}"); // } else { // // TODO return HTTP 404(? check spec) // return context.Response.WriteAsync($"Registering node {AgentId}"); // } // // /* // TODO: Run Register-TugNode to register this node, padding node details // as paramaters. Note that the command must deal with duplicate // registrations (e.g., update data or ignore or whatever) // */ // } // ); // // // DSC Action // routeBuilder.MapPost("Nodes(AgentId={AgentId})/DscAction", context => // { // logger.LogInformation("\n\n\nPOST: DSC action request"); // string AgentId = context.GetRouteData().Values["AgentId"].ToString(); // string Body = new StreamReader(context.Request.Body).ReadToEnd(); // var Headers = context.Request.Headers; // logger.LogDebug("AgentId {AgentId}, Request Body {Body}, Headers {Headers}",AgentId,Body,Headers); // // /* // TODO: Run Get-TugDscAction, passing node information. Command is expected // to return an action, which will be returned to the node. // */ // // return context.Response.WriteAsync($"DSC action for node {AgentId}"); // } // ); // // // Asking for a MOF // routeBuilder.MapPost("Nodes(AgentId={AgentId})/Configurations(ConfigurationName={ConfigurationName})/ConfigurationContent", context => // { // logger.LogInformation("\n\n\nPOST: MOF request"); // string AgentId = context.GetRouteData().Values["AgentId"].ToString(); // string ConfigurationName = context.GetRouteData().Values["ConfigurationName"].ToString(); // string Body = new StreamReader(context.Request.Body).ReadToEnd(); // var Headers = context.Request.Headers; // logger.LogDebug("AgentId {AgentId}, Configuration {Config}, Request Body {Body}, Headers {Headers}",AgentId,ConfigurationName,Body,Headers); // // /* // TODO: Call Get-TugDscMOF, passing agent information. Command is expected to // return the MOF, encoded for transmission to the node. // */ // // return context.Response.WriteAsync($"Request from node {AgentId} for configuration {ConfigurationName}"); // } // ); // // // // Asking for a module // routeBuilder.MapPost("Modules(ModuleName={ModuleName},ModuleVersion={ModuleVersion})/ModuleContent", context => // { // logger.LogInformation("\n\n\nPOST: Module request"); // string ModuleName = context.GetRouteData().Values["ModuleName"].ToString(); // string ModuleVersion = context.GetRouteData().Values["ModuleVersion"].ToString(); // string Body = new StreamReader(context.Request.Body).ReadToEnd(); // var Headers = context.Request.Headers; // logger.LogDebug("Module name {ModuleName}, Version {Version}, Request Body {Body}, Headers {Headers}",ModuleName,ModuleVersion,Body,Headers); // // /* // TODO: Call Get-TugDscModule, passing agent information. Command is expected to // return the module ZIP file, encoded for transmission to the node. // */ // // return context.Response.WriteAsync($"Module request for {ModuleName} version {ModuleVersion}"); // } // ); // // // Sending a report // routeBuilder.MapPost("Nodes(AgentId={AgentId})/SendReport", context => // { // logger.LogInformation("\n\n\nPOST: Report delivery"); // string AgentId = context.GetRouteData().Values["AgentId"].ToString(); // string Body = new StreamReader(context.Request.Body).ReadToEnd(); // var Headers = context.Request.Headers; // logger.LogDebug("AgentId {AgentId}, Request Body {Body}, Headers {Headers}",AgentId,Body,Headers); // // /* // TODO: Call Save-TugReport, passing report info. Command is expected to // save the report info in whatever way it wants to. // */ // // // return context.Response.WriteAsync($"Report from node {AgentId}"); // } // ); // // // with everything defined, kick it off // var routes = routeBuilder.Build(); // app.UseRouter(routes);
<<<<<<< Environment.SetEnvironmentVariable(EnvUtil.MsalEnabledEnvVar, string.Empty); ======= Environment.SetEnvironmentVariable(EnvUtil.PpeHostsEnvVar, string.Empty); >>>>>>> Environment.SetEnvironmentVariable(EnvUtil.MsalEnabledEnvVar, string.Empty); Environment.SetEnvironmentVariable(EnvUtil.PpeHostsEnvVar, string.Empty);
<<<<<<< private System.Windows.Forms.CheckBox chkLastSeenImage; ======= private System.Windows.Forms.CheckBox chkHorzCenterToolbarBtns; >>>>>>> private System.Windows.Forms.CheckBox chkLastSeenImage; private System.Windows.Forms.CheckBox chkHorzCenterToolbarBtns;
<<<<<<< private System.Windows.Forms.LinkLabel lnkConfigDir; ======= private System.Windows.Forms.CheckBox chkHorzCenterToolbarBtns; >>>>>>> private System.Windows.Forms.LinkLabel lnkConfigDir; private System.Windows.Forms.CheckBox chkHorzCenterToolbarBtns;
<<<<<<< NetApiBufferFree(intPtr); foreach (var sess in toReturn.Distinct()) ======= foreach (var user in users.Distinct()) >>>>>>> NetApiBufferFree(intPtr); foreach (var user in users.Distinct())
<<<<<<< this.tabPageTimeline = new System.Windows.Forms.TabPage(); this.timelineView1 = new AdamsLair.WinForms.TimelineControls.TimelineView(); ======= >>>>>>> this.tabPageTimeline = new System.Windows.Forms.TabPage(); this.timelineView1 = new AdamsLair.WinForms.TimelineControls.TimelineView(); <<<<<<< this.tiledView.Model = emptyListModel4; ======= this.tiledView.Model = emptyListModel1; this.tiledView.ModelItemEditProperty = "Name"; >>>>>>> this.tiledView.Model = emptyListModel4; this.tiledView.ModelItemEditProperty = "Name"; <<<<<<< // tabPageTimeline // this.tabPageTimeline.Controls.Add(this.timelineView1); this.tabPageTimeline.Location = new System.Drawing.Point(4, 22); this.tabPageTimeline.Name = "tabPageTimeline"; this.tabPageTimeline.Size = new System.Drawing.Size(427, 412); this.tabPageTimeline.TabIndex = 3; this.tabPageTimeline.Text = "Timeline"; this.tabPageTimeline.UseVisualStyleBackColor = true; // // timelineView1 // this.timelineView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.timelineView1.BackColor = System.Drawing.SystemColors.Control; this.timelineView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.timelineView1.Location = new System.Drawing.Point(23, 24); this.timelineView1.Name = "timelineView1"; this.timelineView1.Size = new System.Drawing.Size(379, 362); this.timelineView1.TabIndex = 0; // ======= >>>>>>> // tabPageTimeline // this.tabPageTimeline.Controls.Add(this.timelineView1); this.tabPageTimeline.Location = new System.Drawing.Point(4, 22); this.tabPageTimeline.Name = "tabPageTimeline"; this.tabPageTimeline.Size = new System.Drawing.Size(427, 412); this.tabPageTimeline.TabIndex = 3; this.tabPageTimeline.Text = "Timeline"; this.tabPageTimeline.UseVisualStyleBackColor = true; // // timelineView1 // this.timelineView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.timelineView1.BackColor = System.Drawing.SystemColors.Control; this.timelineView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.timelineView1.Location = new System.Drawing.Point(23, 24); this.timelineView1.Name = "timelineView1"; this.timelineView1.Size = new System.Drawing.Size(379, 362); this.timelineView1.TabIndex = 0; // <<<<<<< private System.Windows.Forms.TabPage tabPageTimeline; private TimelineControls.TimelineView timelineView1; ======= private System.Windows.Forms.TrackBar trackBarTileViewHeight; private System.Windows.Forms.CheckBox checkBoxTiledViewStyle; >>>>>>> private System.Windows.Forms.TrackBar trackBarTileViewHeight; private System.Windows.Forms.CheckBox checkBoxTiledViewStyle; private System.Windows.Forms.TabPage tabPageTimeline; private TimelineControls.TimelineView timelineView1;
<<<<<<< lbl_totalCommentsInGrid.Invoke((MethodInvoker)delegate { lbl_totalCommentsInGrid.Text = "Total Row Count: 0"; }); ProgressSpinner_LoadComments.Invoke((MethodInvoker)delegate { ProgressSpinner_LoadComments.Visible = true; }); if (string.IsNullOrEmpty(SelectedProfileORClan) || string.IsNullOrEmpty(txtBox_Comments2GetCount.Text)) { Console.WriteLine("Please select the profile/group."); InfoForm.InfoHelper.CustomMessageBox.Show("Error", "Please select the profile/group."); return; } GridCommentsData.Invoke((MethodInvoker)delegate { GridCommentsData.Rows.Clear(); }); btn_doTask.Invoke((MethodInvoker)delegate { btn_doTask.Enabled = false; }); try { string ProfileORGroupComments = "https://steamcommunity.com/comment/" + SelectedProfileORClan + "/render/" + CheckProfileGroupInfo + "/-1/?count=" + txtBox_Comments2GetCount.Text; var parser = new HtmlParser(); ======= //lbl_totalCommentsInGrid.Invoke((MethodInvoker)delegate //{ // lbl_totalCommentsInGrid.Text = "Total Row Count: 0"; //}); //lbl_totalComments.Invoke((MethodInvoker)delegate //{ // lbl_totalComments.Text = "Total Count: 0"; //}); //ProgressSpinner_LoadComments.Invoke((MethodInvoker)delegate //{ // ProgressSpinner_LoadComments.Visible = true; //}); //if (string.IsNullOrEmpty(SelectedProfileORClan) || string.IsNullOrEmpty(txtBox_Comments2GetCount.Text)) //{ // Console.WriteLine("Please select the profile/group."); // InfoForm.InfoHelper.CustomMessageBox.Show("Error", "Please select the profile/group."); // return; //} //GridCommentsData.Invoke((MethodInvoker)delegate //{ // GridCommentsData.Rows.Clear(); //}); //btn_doTask.Invoke((MethodInvoker)delegate //{ // btn_doTask.Enabled = false; //}); //try //{ // string ProfileORGroupComments = "https://steamcommunity.com/comment/" + SelectedProfileORClan + "/render/" + CheckProfileGroupInfo + "/-1/?count=" + txtBox_Comments2GetCount.Text; // var parser = new HtmlParser(); >>>>>>> lbl_totalCommentsInGrid.Invoke((MethodInvoker)delegate { lbl_totalCommentsInGrid.Text = "Total Row Count: 0"; }); ProgressSpinner_LoadComments.Invoke((MethodInvoker)delegate { ProgressSpinner_LoadComments.Visible = true; }); //if (string.IsNullOrEmpty(SelectedProfileORClan) || string.IsNullOrEmpty(txtBox_Comments2GetCount.Text)) //{ // Console.WriteLine("Please select the profile/group."); // InfoForm.InfoHelper.CustomMessageBox.Show("Error", "Please select the profile/group."); // return; //} //GridCommentsData.Invoke((MethodInvoker)delegate //{ // GridCommentsData.Rows.Clear(); //}); //btn_doTask.Invoke((MethodInvoker)delegate //{ // btn_doTask.Enabled = false; //}); try { string ProfileORGroupComments = "https://steamcommunity.com/comment/" + SelectedProfileORClan + "/render/" + CheckProfileGroupInfo + "/-1/?count=" + txtBox_Comments2GetCount.Text; var parser = new HtmlParser();
<<<<<<< class cmts { public string CommentContent { get; set; } public string Author { get; set; } public string Time { get; set; } } Dictionary<string, cmts> myList = new Dictionary<string, cmts>(); ======= >>>>>>> class cmts { public string CommentContent { get; set; } public string Author { get; set; } public string Time { get; set; } } Dictionary<string, cmts> myList = new Dictionary<string, cmts>(); <<<<<<< ======= //GridCommentsData.Invoke((MethodInvoker)delegate //{ // GridCommentsData.Rows.Add(row.Distinct().ToArray()); //}); >>>>>>> GridCommentsData.Invoke((MethodInvoker)delegate { GridCommentsData.Rows.Add(row.Distinct().ToArray()); }); <<<<<<< var d = new Dictionary<uint, Tuple<string, string, string>>(); int DELETEDcount = 0; ======= int DELETEDcount = 0; >>>>>>> var d = new Dictionary<uint, Tuple<string, string, string>>(); int DELETEDcount = 0; <<<<<<< var results = item.Contains(filterSelectedWords[0]); // test //filterSelectedWords.Contains(item, StringComparison.OrdinalIgnoreCase) if (chck_ignoreCase.Checked && results) { DELETEDcount++; Console.WriteLine("AnyCase - DELETED: " + CommentID + " | " + CommentContent + "\n"); // AccountLogin.DeleteSelectedComment(CommentID, ProfileOrClan); lbl_cDeletedLive.Invoke((MethodInvoker)delegate { lbl_cDeletedLive.Text = "Deleted: " + DELETEDcount; }); string[] row = { CommentID, CommentContent, Author, Time }; if (chck_ignoreCase.Checked && filterSelectedWords.Contains(item, StringComparison.OrdinalIgnoreCase)) ======= var results = item.Contains(filterSelectedWords[0]); // test //filterSelectedWords.Contains(item, StringComparison.OrdinalIgnoreCase) if (chck_ignoreCase.Checked && results) >>>>>>> var results = item.Contains(filterSelectedWords[0]); // test //filterSelectedWords.Contains(item, StringComparison.OrdinalIgnoreCase) if (chck_ignoreCase.Checked && results)
<<<<<<< var mapping = events.Expect<MappingStart>(); Load(mapping, state); ======= MappingStart mapping = parser.Expect<MappingStart>(); base.Load(mapping, state); >>>>>>> var mapping = parser.Expect<MappingStart>(); Load(mapping, state); <<<<<<< var key = ParseNode(events, state); var value = ParseNode(events, state); ======= YamlNode key = ParseNode(parser, state); YamlNode value = ParseNode(parser, state); >>>>>>> var key = ParseNode(parser, state); var value = ParseNode(parser, state);
<<<<<<< Assert.True(error, "Unexpected spec failure.\nExpected:\n" + expectedResult + "\nActual:\n[Writer Output]\n" + writer + "\n[Exception]\n" + ex); Debug.Assert(!(error && knownFalsePositives.Contains(name)), $"Spec test '{name}' passed but present in '{nameof(knownFalsePositives)}' list. Consider removing it from the list."); ======= Assert.True(error, $"Unexpected spec failure ({name}).\n{description}\nExpected:\n{expectedResult}\nActual:\n[Writer Output]\n{writer}\n[Exception]\n{ex}"); >>>>>>> Assert.True(error, $"Unexpected spec failure ({name}).\n{description}\nExpected:\n{expectedResult}\nActual:\n[Writer Output]\n{writer}\n[Exception]\n{ex}"); Debug.Assert(!(error && knownFalsePositives.Contains(name)), $"Spec test '{name}' passed but present in '{nameof(knownFalsePositives)}' list. Consider removing it from the list.");
<<<<<<< CollectionNodeDeserializer.DeserializeHelper(itemType, reader, nestedObjectDeserializer, items, true); ======= CollectionNodeDeserializer.DeserializeHelper(itemType, parser, expectedType, nestedObjectDeserializer, items, true); >>>>>>> CollectionNodeDeserializer.DeserializeHelper(itemType, parser, nestedObjectDeserializer, items, true);
<<<<<<< var sequence = events.Expect<SequenceStart>(); Load(sequence, state); ======= SequenceStart sequence = parser.Expect<SequenceStart>(); base.Load(sequence, state); >>>>>>> var sequence = parser.Expect<SequenceStart>(); Load(sequence, state); <<<<<<< var child = ParseNode(events, state); ======= YamlNode child = ParseNode(parser, state); >>>>>>> var child = ParseNode(parser, state);
<<<<<<< using YamlDotNet.Core; ======= using YamlDotNet.RepresentationModel.Serialization.NamingConventions; >>>>>>> using YamlDotNet.Core; using YamlDotNet.RepresentationModel.Serialization.NamingConventions; <<<<<<< ======= [Fact] public void DeserializeEnumerable() { Z[] z = new[] { new Z() { aaa = "Yo" }}; Serializer serializer = new Serializer(); StringWriter buffer = new StringWriter(); serializer.Serialize(buffer, z); YamlSerializer<IEnumerable<Z>> deserializer = new YamlSerializer<IEnumerable<Z>>(); IEnumerable<Z> result = deserializer.Deserialize(new StringReader(buffer.ToString())); Assert.Equal(1, result.Count()); Assert.Equal("Yo", result.First().aaa); } >>>>>>> [Fact] public void DeserializeEnumerable() { Z[] z = new[] { new Z() { aaa = "Yo" }}; Serializer serializer = new Serializer(); StringWriter buffer = new StringWriter(); serializer.Serialize(buffer, z); YamlSerializer<IEnumerable<Z>> deserializer = new YamlSerializer<IEnumerable<Z>>(); IEnumerable<Z> result = deserializer.Deserialize(new StringReader(buffer.ToString())); Assert.Equal(1, result.Count()); Assert.Equal("Yo", result.First().aaa); } <<<<<<< [CLSCompliant(false)] ======= >>>>>>> <<<<<<< public class Person { public string Name { get; set; } } [Fact] public void DeserializeTwoDocuments() { var yaml = @"--- Name: Andy --- Name: Brad ..."; var serializer = new YamlSerializer<Person>(); var reader = new EventReader(new Parser(new StringReader(yaml))); reader.Expect<StreamStart>(); var andy = serializer.Deserialize(reader); Assert.NotNull(andy); Assert.Equal("Andy", andy.Name); var brad = serializer.Deserialize(reader); Assert.NotNull(brad); Assert.Equal("Brad", brad.Name); } [Fact] public void DeserializeManyDocuments() { var yaml = @"--- Name: Andy --- Name: Brad --- Name: Charles ..."; var serializer = new YamlSerializer<Person>(); var reader = new EventReader(new Parser(new StringReader(yaml))); reader.Allow<StreamStart>(); var people = new List<Person>(); while (!reader.Accept<StreamEnd>()) { var person = serializer.Deserialize(reader); people.Add(person); } Assert.Equal(3, people.Count); Assert.Equal("Andy", people[0].Name); Assert.Equal("Brad", people[1].Name); Assert.Equal("Charles", people[2].Name); } ======= private class ConventionTest { public string FirstTest { get; set; } public string SecondTest { get; set; } public string ThirdTest { get; set; } [YamlAlias("fourthTest")] public string AliasTest { get; set; } } [Fact] public void DeserializeUsingConventions() { var serializer = new YamlSerializer<ConventionTest>(); var result = serializer.Deserialize(YamlFile("namingConvention.yaml")); Assert.Equal("First", result.FirstTest); Assert.Equal("Second", result.SecondTest); Assert.Equal("Third", result.ThirdTest); Assert.Equal("Fourth", result.AliasTest); } [Fact] public void RoundtripAlias() { var input = new ConventionTest { AliasTest = "Fourth" }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input, input.GetType()); string serialized = writer.ToString(); // Ensure serialisation is correct Assert.Equal("fourthTest: Fourth", serialized.TrimEnd('\r', '\n')); var deserializer = new YamlSerializer<ConventionTest>(); var output = deserializer.Deserialize(new StringReader(serialized)); // Ensure round-trip retains value Assert.Equal(input.AliasTest, output.AliasTest); } public class HasDefaults { public const string DefaultValue = "myDefault"; [DefaultValue(DefaultValue)] public string Value { get; set; } } [Fact] public void DefaultValueAttributeIsUsedWhenPresentWithoutEmitDefaults() { var input = new HasDefaults { Value = HasDefaults.DefaultValue }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.False(serialized.Contains("Value")); } [Fact] public void DefaultValueAttributeIsIgnoredWhenPresentWithEmitDefaults() { var input = new HasDefaults { Value = HasDefaults.DefaultValue }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input, SerializationOptions.EmitDefaults); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.True(serialized.Contains("Value")); } [Fact] public void DefaultValueAttributeIsIgnoredWhenValueIsDifferent() { var input = new HasDefaults { Value = "non-default" }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.True(serialized.Contains("Value")); } >>>>>>> private class ConventionTest { public string FirstTest { get; set; } public string SecondTest { get; set; } public string ThirdTest { get; set; } [YamlAlias("fourthTest")] public string AliasTest { get; set; } } [Fact] public void DeserializeUsingConventions() { var serializer = new YamlSerializer<ConventionTest>(); var result = serializer.Deserialize(YamlFile("namingConvention.yaml")); Assert.Equal("First", result.FirstTest); Assert.Equal("Second", result.SecondTest); Assert.Equal("Third", result.ThirdTest); Assert.Equal("Fourth", result.AliasTest); } [Fact] public void RoundtripAlias() { var input = new ConventionTest { AliasTest = "Fourth" }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input, input.GetType()); string serialized = writer.ToString(); // Ensure serialisation is correct Assert.Equal("fourthTest: Fourth", serialized.TrimEnd('\r', '\n')); var deserializer = new YamlSerializer<ConventionTest>(); var output = deserializer.Deserialize(new StringReader(serialized)); // Ensure round-trip retains value Assert.Equal(input.AliasTest, output.AliasTest); } public class HasDefaults { public const string DefaultValue = "myDefault"; [DefaultValue(DefaultValue)] public string Value { get; set; } } [Fact] public void DefaultValueAttributeIsUsedWhenPresentWithoutEmitDefaults() { var input = new HasDefaults { Value = HasDefaults.DefaultValue }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.False(serialized.Contains("Value")); } [Fact] public void DefaultValueAttributeIsIgnoredWhenPresentWithEmitDefaults() { var input = new HasDefaults { Value = HasDefaults.DefaultValue }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input, SerializationOptions.EmitDefaults); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.True(serialized.Contains("Value")); } [Fact] public void DefaultValueAttributeIsIgnoredWhenValueIsDifferent() { var input = new HasDefaults { Value = "non-default" }; var serializer = new Serializer(); var writer = new StringWriter(); serializer.Serialize(writer, input); var serialized = writer.ToString(); Console.WriteLine(serialized); Assert.True(serialized.Contains("Value")); } public class Person { public string Name { get; set; } } [Fact] public void DeserializeTwoDocuments() { var yaml = @"--- Name: Andy --- Name: Brad ..."; var serializer = new YamlSerializer<Person>(); var reader = new EventReader(new Parser(new StringReader(yaml))); reader.Expect<StreamStart>(); var andy = serializer.Deserialize(reader); Assert.NotNull(andy); Assert.Equal("Andy", andy.Name); var brad = serializer.Deserialize(reader); Assert.NotNull(brad); Assert.Equal("Brad", brad.Name); } [Fact] public void DeserializeManyDocuments() { var yaml = @"--- Name: Andy --- Name: Brad --- Name: Charles ..."; var serializer = new YamlSerializer<Person>(); var reader = new EventReader(new Parser(new StringReader(yaml))); reader.Allow<StreamStart>(); var people = new List<Person>(); while (!reader.Accept<StreamEnd>()) { var person = serializer.Deserialize(reader); people.Add(person); } Assert.Equal(3, people.Count); Assert.Equal("Andy", people[0].Name); Assert.Equal("Brad", people[1].Name); Assert.Equal("Charles", people[2].Name); }
<<<<<<< public int port = 2076; public int httpPort = 8081; public int maxClients = 8; public float updatesPerSecond = 60; public int screenshotInterval = 3000; public bool autoRestart = false; public bool autoHost = false; public bool saveScreenshots = false; public String joinMessage = String.Empty; public String serverInfo = String.Empty; public byte totalInactiveShips = 100; public ScreenshotSettings screenshotSettings = new ScreenshotSettings(); ======= public class ConfigStore { public int port = 2076; public int httpPort = 80; public int maxClients = 8; public float updatesPerSecond = 60; public int screenshotInterval = 3000; public bool autoRestart = false; public bool autoHost = false; public bool saveScreenshots = false; public String joinMessage = String.Empty; public String serverInfo = String.Empty; public byte totalInactiveShips = 100; private ScreenshotSettings _screenshotSettings = new ScreenshotSettings(); public ScreenshotSettings screenshotSettings { get { return _screenshotSettings; } } } >>>>>>> public class ConfigStore { public int port = 2076; public int httpPort = 8081; public int maxClients = 8; public float updatesPerSecond = 60; public int screenshotInterval = 3000; public bool autoRestart = false; public bool autoHost = false; public bool saveScreenshots = false; public String joinMessage = String.Empty; public String serverInfo = String.Empty; public byte totalInactiveShips = 100; private ScreenshotSettings _screenshotSettings = new ScreenshotSettings(); public ScreenshotSettings screenshotSettings { get { return _screenshotSettings; } } }
<<<<<<< var result = await client.Subscriptions.ListAsync().ConfigureAwait(false); subscriptions = result.Subscriptions.Select(sub => new Subscription { SubscriptionId = sub.SubscriptionId, DisplayName = sub.DisplayName }).ToList(); ======= var subscriptionsResult = await client.Subscriptions.ListAsync(); var subscriptions = subscriptionsResult.Subscriptions.Select(sub => new Subscription { SubscriptionId = sub.SubscriptionId, DisplayName = sub.DisplayName }).ToList(); return subscriptions; >>>>>>> var subscriptionsResult = await client.Subscriptions.ListAsync().ConfigureAwait(false); var subscriptions = subscriptionsResult.Subscriptions.Select(sub => new Subscription { SubscriptionId = sub.SubscriptionId, DisplayName = sub.DisplayName }).ToList(); return subscriptions; <<<<<<< var automationAccountsResult = await automationClient.AutomationAccounts.ListAsync(null).ConfigureAwait(false); automationAccounts = await Task.WhenAll( ======= var automationAccountsResult = await automationClient.AutomationAccounts.ListAsync(null); var automationAccounts = await Task.WhenAll( >>>>>>> var automationAccountsResult = await automationClient.AutomationAccounts.ListAsync(null).ConfigureAwait(false); var automationAccounts = await Task.WhenAll(
<<<<<<< Action<Socket> receiveClient; Socket listenSocket; ======= Action<Socket> receiveClient; Socket listener; >>>>>>> Action<Socket> receiveClient; Socket listenSocket; <<<<<<< listenSocket.Listen(100); // post accepts on the listening socket StartAccept(null); //Task.Run(() => //{ // try // { // listenSocket.Listen(100); // while (true) // { // // Set the event to nonsignaled state. // allDone.Reset(); // // Start an asynchronous socket to listen for connections. // _logerr.LogDebug($"Waiting for a connection {listenSocket.Handle}"); // listenSocket.BeginAccept(new AsyncCallback(AcceptCallback), listenSocket); // // Wait until a connection is made before continuing. // allDone.WaitOne(); // } // } // catch (Exception e) // { // Console.WriteLine(e.ToString()); // } //}); ======= Task.Run(() => { try { listener.Listen(100); while (true) { // Set the event to nonsignaled state. allDone.Reset(); // Start an asynchronous socket to listen for connections. _logerr.LogDebug($"Waiting for a connection {listener.Handle}"); listener.BeginAccept(new AsyncCallback(AcceptCallback), listener); // Wait until a connection is made before continuing. allDone.WaitOne(); } } catch (Exception e) { Console.WriteLine(e.ToString()); } }); >>>>>>> listenSocket.Listen(100); // post accepts on the listening socket StartAccept(null); <<<<<<< if (acceptEventArg == null) { acceptEventArg = new SocketAsyncEventArgs(); acceptEventArg.Completed += new EventHandler<SocketAsyncEventArgs>(AcceptEventArg_Completed); } else { // socket must be cleared since the context object is being reused acceptEventArg.AcceptSocket = null; } bool willRaiseEvent = listenSocket.AcceptAsync(acceptEventArg); if (!willRaiseEvent) { ProcessAccept(acceptEventArg); } } int m_numConnectedSockets; private void ProcessAccept(SocketAsyncEventArgs e) { Interlocked.Increment(ref m_numConnectedSockets); Console.WriteLine("Client connection accepted. There are {0} clients connected to the server", m_numConnectedSockets); var accept = e.AcceptSocket; // Accept the next connection request StartAccept(e); receiveClient.Invoke(accept); } private void AcceptEventArg_Completed(object sender, SocketAsyncEventArgs e) { ProcessAccept(e); } void AcceptCallback(IAsyncResult ar) { if (Shutdown) return; // Signal the main thread to continue. allDone.Set(); // Get the socket that handles the client request. Socket listener = (Socket)ar.AsyncState; Socket handler = listener.EndAccept(ar); receiveClient.Invoke(handler); ======= if (Shutdown) return; // Signal the main thread to continue. allDone.Set(); // Get the socket that handles the client request. Socket listener = (Socket)ar.AsyncState; Socket handler = listener.EndAccept(ar); receiveClient.Invoke(handler); >>>>>>> if (acceptEventArg == null) { acceptEventArg = new SocketAsyncEventArgs(); acceptEventArg.Completed += new EventHandler<SocketAsyncEventArgs>(AcceptEventArg_Completed); } else { // socket must be cleared since the context object is being reused acceptEventArg.AcceptSocket = null; } bool willRaiseEvent = listenSocket.AcceptAsync(acceptEventArg); if (!willRaiseEvent) { ProcessAccept(acceptEventArg); } } int m_numConnectedSockets; private void ProcessAccept(SocketAsyncEventArgs e) { Interlocked.Increment(ref m_numConnectedSockets); Console.WriteLine("Client connection accepted. There are {0} clients connected to the server", m_numConnectedSockets); var accept = e.AcceptSocket; // Accept the next connection request StartAccept(e); receiveClient.Invoke(accept); } private void AcceptEventArg_Completed(object sender, SocketAsyncEventArgs e) { ProcessAccept(e);
<<<<<<< public static EntityOperationSettings<T> GetEntitySettings<T>(IEntityOperationSymbolContainer<T> operation) where T : class, IEntity ======= public static void ReplaceSetting(OperationSettings setting) { Manager.Settings.GetOrAddDefinition(setting.OverridenType)[setting.OperationSymbol] = setting; Manager.Settings.ClearCache(); } public static EntityOperationSettings<T> GetEntitySettings<T>(IEntityOperationSymbolContainer<T> operation) where T : class, IIdentifiable >>>>>>> public static void ReplaceSetting(OperationSettings setting) { Manager.Settings.GetOrAddDefinition(setting.OverridenType)[setting.OperationSymbol] = setting; Manager.Settings.ClearCache(); } public static EntityOperationSettings<T> GetEntitySettings<T>(IEntityOperationSymbolContainer<T> operation) where T : class, IEntity
<<<<<<< #line 25 "..\..\Signum\Views\SearchControl.cshtml" Write(QueryUtils.GetKey(findOptions.QueryName)); ======= #line 28 "..\..\Signum\Views\SearchControl.cshtml" Write(QueryUtils.GetQueryUniqueKey(findOptions.QueryName)); >>>>>>> #line 28 "..\..\Signum\Views\SearchControl.cshtml" Write(QueryUtils.GetKey(findOptions.QueryName));
<<<<<<< public static int UnsafeDeleteChunks<T>(this IQueryable<T> query, int chunkSize = 10000) where T : Entity ======= public static int UnsafeDeleteChunks<T>(this IQueryable<T> query, int chunkSize = 10000, int maxQueries = int.MaxValue) where T : IdentifiableEntity >>>>>>> public static int UnsafeDeleteChunks<T>(this IQueryable<T> query, int chunkSize = 10000, int maxQueries = int.MaxValue) where T : Entity <<<<<<< public static int UnsafeDeleteMListChunks<E, V>(this IQueryable<MListElement<E, V>> mlistQuery, int chunkSize = 10000) where E : Entity ======= public static int UnsafeDeleteMListChunks<E, V>(this IQueryable<MListElement<E, V>> mlistQuery, int chunkSize = 10000, int maxQueries = int.MaxValue) where E : IdentifiableEntity >>>>>>> public static int UnsafeDeleteMListChunks<E, V>(this IQueryable<MListElement<E, V>> mlistQuery, int chunkSize = 10000, int maxQueries = int.MaxValue) where E : Entity
<<<<<<< public static string ToTsvFile<T>(this IEnumerable<T> collection, string fileName, Encoding? encoding = null, bool writeHeaders = true, bool autoFlush = false, bool append = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) ======= public static string ToTsvFile<T>(this IEnumerable<T> collection, string fileName, Encoding encoding = null, CultureInfo culture = null, bool writeHeaders = true, bool autoFlush = false, bool append = false, Func<TsvColumnInfo<T>, Func<object, string>> toStringFactory = null) >>>>>>> public static string ToTsvFile<T>(this IEnumerable<T> collection, string fileName, Encoding? encoding = null, CultureInfo? culture = null, bool writeHeaders = true, bool autoFlush = false, bool append = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) <<<<<<< public static byte[] ToTsvBytes<T>(this IEnumerable<T> collection, Encoding? encoding = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) ======= public static byte[] ToTsvBytes<T>(this IEnumerable<T> collection, Encoding encoding = null, CultureInfo culture = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>> toStringFactory = null) >>>>>>> public static byte[] ToTsvBytes<T>(this IEnumerable<T> collection, Encoding? encoding = null, CultureInfo? culture = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) <<<<<<< public static void ToTsv<T>(this IEnumerable<T> collection, Stream stream, Encoding? encoding = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) ======= public static void ToTsv<T>(this IEnumerable<T> collection, Stream stream, Encoding encoding = null, CultureInfo culture = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>> toStringFactory = null) >>>>>>> public static void ToTsv<T>(this IEnumerable<T> collection, Stream stream, Encoding? encoding = null, CultureInfo? culture = null, bool writeHeaders = true, bool autoFlush = false, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory = null) <<<<<<< private static Func<object, string> GetToString<T>(TsvColumnInfo<T> column, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory) ======= private static Func<object, string> GetToString<T>(TsvColumnInfo<T> column, CultureInfo culture, Func<TsvColumnInfo<T>, Func<object, string>> toStringFactory) >>>>>>> private static Func<object, string> GetToString<T>(TsvColumnInfo<T> column, CultureInfo? culture, Func<TsvColumnInfo<T>, Func<object, string>>? toStringFactory) <<<<<<< static string ConvertToString(object? obj) ======= static string ConvertToString(object obj, CultureInfo culture) >>>>>>> static string ConvertToString(object? obj, CultureInfo culture) <<<<<<< public static List<T> ReadFile<T>(string fileName, Encoding? encoding = null, int skipLines = 1, TsvReadOptions<T>? options = null) where T : class, new() ======= public static List<T> ReadFile<T>(string fileName, Encoding encoding = null, int skipLines = 1, CultureInfo culture = null, TsvReadOptions<T> options = null) where T : class, new() >>>>>>> public static List<T> ReadFile<T>(string fileName, Encoding? encoding = null, int skipLines = 1, CultureInfo? culture = null, TsvReadOptions<T>? options = null) where T : class, new() <<<<<<< public static List<T> ReadBytes<T>(byte[] data, Encoding? encoding = null, int skipLines = 1, TsvReadOptions<T>? options = null) where T : class, new() ======= public static List<T> ReadBytes<T>(byte[] data, Encoding encoding = null, int skipLines = 1, CultureInfo culture = null, TsvReadOptions<T> options = null) where T : class, new() >>>>>>> public static List<T> ReadBytes<T>(byte[] data, Encoding? encoding = null, int skipLines = 1, CultureInfo? culture = null, TsvReadOptions<T>? options = null) where T : class, new() <<<<<<< public static IEnumerable<T> ReadStream<T>(Stream stream, Encoding? encoding = null, int skipLines = 1, TsvReadOptions<T>? options = null) where T : class, new() ======= public static IEnumerable<T> ReadStream<T>(Stream stream, Encoding encoding = null, int skipLines = 1, CultureInfo culture = null, TsvReadOptions<T> options = null) where T : class, new() >>>>>>> public static IEnumerable<T> ReadStream<T>(Stream stream, Encoding? encoding = null, int skipLines = 1, CultureInfo? culture = null, TsvReadOptions<T>? options = null) where T : class, new() <<<<<<< var parsers = columns.Select(c => GetParser(c, defOptions.ParserFactory)).ToList(); ======= var parsers = columns.Select(c => GetParser(c, defCulture, options.ParserFactory)).ToList(); >>>>>>> var parsers = columns.Select(c => GetParser(c, defCulture, defOptions.ParserFactory)).ToList(); <<<<<<< public static T ReadLine<T>(string tsvLine, TsvReadOptions<T>? options = null) ======= public static T ReadLine<T>(string tsvLine, CultureInfo culture, TsvReadOptions<T> options = null) >>>>>>> public static T ReadLine<T>(string tsvLine, CultureInfo? culture = null, TsvReadOptions<T>? options = null) <<<<<<< static object? ConvertTo(string s, Type type, string format) ======= static object ConvertTo(string s, Type type, string format, CultureInfo culture) >>>>>>> static object? ConvertTo(string s, Type type, string format, CultureInfo culture)
<<<<<<< using(AvoidCache()) { SemiSymbol.SetSemiSymbolIds<T>(Database.RetrieveAll<T>().Where(a => a.Key.HasText()).ToDictionary(a => a.Key, a => a.Id)); return getSemiSymbols().ToDictionary(a => a.Key); } ======= SemiSymbol.SetSemiSymbolIdsAndNames<T>(Database.RetrieveAll<T>().Where(a => a.Key.HasText()).ToDictionary(a => a.Key, a => Tuple.Create(a.Id, a.Name))); return getSemiSymbols().ToDictionary(a => a.Key); >>>>>>> SemiSymbol.SetSemiSymbolIdsAndNames<T>(Database.RetrieveAll<T>().Where(a => a.Key.HasText()).ToDictionary(a => a.Key, a => Tuple.Create(a.Id, a.Name))); return getSemiSymbols().ToDictionary(a => a.Key); }
<<<<<<< return new SqlPreCommandSimple($"ALTER TABLE {table.Name} SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = {table.SystemVersioned!.TableName.OnDatabase(null)}))"); ======= return new SqlPreCommandSimple($"ALTER TABLE {table.Name} DROP PERIOD FOR SYSTEM_TIME;"); >>>>>>> return new SqlPreCommandSimple($"ALTER TABLE {table.Name} DROP PERIOD FOR SYSTEM_TIME;"); <<<<<<< return new SqlPreCommandSimple("ALTER TABLE {0} ADD {1}".FormatWith(table.Name, ColumnLine(column, tempDefault ?? GetDefaultConstaint(table, column), isChange: false))); ======= return new SqlPreCommandSimple("ALTER TABLE {0} DROP COLUMN {1};".FormatWith(table.Name, columnName.SqlEscape(isPostgres))); >>>>>>> return new SqlPreCommandSimple("ALTER TABLE {0} DROP COLUMN {1};".FormatWith(table.Name, columnName.SqlEscape(isPostgres))); <<<<<<< switch (sqlDbType) { case SqlDbType.NText: case SqlDbType.NVarChar: case SqlDbType.Text: case SqlDbType.VarChar: return true; } return false; } public static bool IsDate(SqlDbType sqlDbType) { switch (sqlDbType) { case SqlDbType.DateTime: case SqlDbType.DateTime2: case SqlDbType.DateTimeOffset: return true; } return false; } public static SqlPreCommand AlterTableAlterColumn(ITable table, IColumn column, string? defaultConstraintName = null, ObjectName? forceTableName = null) { var alterColumn = new SqlPreCommandSimple("ALTER TABLE {0} ALTER COLUMN {1}".FormatWith(forceTableName ?? table.Name, ColumnLine(column, null, isChange: true))); ======= var alterColumn = new SqlPreCommandSimple("ALTER TABLE {0} ALTER COLUMN {1};".FormatWith(forceTableName ?? table.Name, CreateColumn(column, null, isChange: true))); >>>>>>> var alterColumn = new SqlPreCommandSimple("ALTER TABLE {0} ALTER COLUMN {1};".FormatWith(forceTableName ?? table.Name, CreateColumn(column, null, isChange: true))); <<<<<<< c.Identity && !isChange && !forHistoryTable ? "IDENTITY " : null, ======= c.Identity && !isChange ? (isPostgres? "GENERATED ALWAYS AS IDENTITY": "IDENTITY") : null, >>>>>>> c.Identity && !isChange && !forHistoryTable ? (isPostgres? "GENERATED ALWAYS AS IDENTITY": "IDENTITY") : null, <<<<<<< public static SqlPreCommand RenameOrMove(DiffTable oldTable, ITable newTable, ObjectName newTableName) ======= public SqlPreCommand RenameOrMove(DiffTable oldTable, ITable newTable) >>>>>>> public SqlPreCommand RenameOrMove(DiffTable oldTable, ITable newTable, ObjectName newTableName) <<<<<<< public static SqlPreCommand MoveRows(ObjectName oldTable, ObjectName newTable, IEnumerable<string> columnNames, bool avoidIdentityInsert = false) ======= public SqlPreCommand MoveRows(ObjectName oldTable, ObjectName newTable, IEnumerable<string> columnNames) >>>>>>> public SqlPreCommand MoveRows(ObjectName oldTable, ObjectName newTable, IEnumerable<string> columnNames, bool avoidIdentityInsert = false)
<<<<<<< var expr = Expression.Lambda<Func<Entity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramPostfix); ======= var expr = Expression.Lambda<Func<IdentifiableEntity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramSuffix); >>>>>>> var expr = Expression.Lambda<Func<Entity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramSuffix); <<<<<<< var expr = Expression.Lambda<Func<Entity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramPostfix); ======= var expr = Expression.Lambda<Func<IdentifiableEntity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramSuffix); >>>>>>> var expr = Expression.Lambda<Func<Entity, Forbidden, string, List<DbParameter>>>( CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramForbidden, paramSuffix); <<<<<<< private bool SetToStrField(Entity entity) ======= internal bool SetToStrField(IdentifiableEntity entity) >>>>>>> internal bool SetToStrField(Entity entity) <<<<<<< if (table.HasTicks) update += " AND ticks = {0}".Formato(oldTicksParamName + post); ======= if (typeof(Entity).IsAssignableFrom(table.Type)) update += " AND ticks = {0}".Formato(oldTicksParamName + suffix); >>>>>>> if (table.HasTicks) update += " AND ticks = {0}".Formato(oldTicksParamName + suffix); <<<<<<< public SqlPreCommand InsertSqlSync(Entity ident, bool includeCollections = true, string comment = null) ======= public SqlPreCommand InsertSqlSync(IdentifiableEntity ident, bool includeCollections = true, string comment = null, string suffix = "") >>>>>>> public SqlPreCommand InsertSqlSync(Entity ident, bool includeCollections = true, string comment = null, string suffix = "") <<<<<<< RelationalCache<T> result = new RelationalCache<T>(); result.table = this; ======= TableMListCache<T> result = new TableMListCache<T>(); >>>>>>> TableMListCache<T> result = new TableMListCache<T>(); result.table = this; <<<<<<< result.sqlDelete = post => "DELETE {0} WHERE {1} = {2}".Formato(Name, BackReference.Name.SqlEscape(), ParameterBuilder.GetParameterName(BackReference.Name + post)); result.DeleteParameter = (ident, post) => pb.CreateReferenceParameter(ParameterBuilder.GetParameterName(BackReference.Name + post), ident.Id, this.PrimaryKey); ======= result.sqlDelete = suffix => "DELETE {0} WHERE {1} = {2}".Formato(Name, BackReference.Name.SqlEscape(), ParameterBuilder.GetParameterName(BackReference.Name + suffix)); result.DeleteParameter = (ident, suffix) => pb.CreateReferenceParameter(ParameterBuilder.GetParameterName(BackReference.Name + suffix), false, ident.Id); >>>>>>> result.sqlDelete = suffix => "DELETE {0} WHERE {1} = {2}".Formato(Name, BackReference.Name.SqlEscape(), ParameterBuilder.GetParameterName(BackReference.Name + suffix)); result.DeleteParameter = (ident, suffix) => pb.CreateReferenceParameter(ParameterBuilder.GetParameterName(BackReference.Name + suffix), ident.Id, this.PrimaryKey); <<<<<<< var expr = Expression.Lambda<Func<Entity, T, int, Forbidden, string, List<DbParameter>>>( Table.CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramItem, paramOrder, paramForbidden, paramPostfix); ======= var expr = Expression.Lambda<Func<IdentifiableEntity, T, int, Forbidden, string, List<DbParameter>>>( Table.CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramItem, paramOrder, paramForbidden, paramSuffix); >>>>>>> var expr = Expression.Lambda<Func<Entity, T, int, Forbidden, string, List<DbParameter>>>( Table.CreateBlock(trios.Select(a => a.ParameterBuilder), assigments), paramIdent, paramItem, paramOrder, paramForbidden, paramSuffix); <<<<<<< trios.Add(new Table.Trio(this, Expression.Field(Expression.Property(value, "Value"), "Object"), postfix)); ======= trios.Add(new Table.Trio(this, value, suffix)); >>>>>>> trios.Add(new Table.Trio(this, Expression.Field(Expression.Property(value, "Value"), "Object"), suffix)); <<<<<<< trios.Add(new Table.Trio(this, Expression.Call(miUnWrap, this.GetIdFactory(value, forbidden)), postfix)); ======= trios.Add(new Table.Trio(this, this.GetIdFactory(value, forbidden), suffix)); >>>>>>> trios.Add(new Table.Trio(this, Expression.Call(miUnWrap, this.GetIdFactory(value, forbidden)), suffix)); <<<<<<< ======= public partial class FieldImplementedBy { protected internal override void CreateParameter(List<Table.Trio> trios, List<Expression> assigments, Expression value, Expression forbidden, Expression suffix) { ParameterExpression ibType = Expression.Parameter(typeof(Type), "ibType"); ParameterExpression ibId = Expression.Parameter(typeof(int?), "ibId"); assigments.Add(Expression.Assign(ibType, Expression.Call(Expression.Constant(this), miCheckType, this.GetTypeFactory(value, forbidden)))); assigments.Add(Expression.Assign(ibId, this.GetIdFactory(value, forbidden))); var nullId = Expression.Constant(null, typeof(int?)); foreach (var imp in ImplementationColumns) { trios.Add(new Table.Trio(imp.Value, Expression.Condition(Expression.Equal(ibType, Expression.Constant(imp.Key)), ibId, Expression.Constant(null, typeof(int?))), suffix )); } } static MethodInfo miCheckType = ReflectionTools.GetMethodInfo((FieldImplementedBy fe) => fe.CheckType(null)); Type CheckType(Type type) { if (type != null && !ImplementationColumns.ContainsKey(type)) throw new InvalidOperationException("Type {0} is not in the list of ImplementedBy:\r\n{1}".Formato(type.Name, ImplementationColumns.ToString(kvp => "{0} -> {1}".Formato(kvp.Key.Name, kvp.Value.Name), "\r\n"))); return type; } } public partial class ImplementationColumn { } public partial class FieldImplementedByAll { protected internal override void CreateParameter(List<Table.Trio> trios, List<Expression> assigments, Expression value, Expression forbidden, Expression suffix) { trios.Add(new Table.Trio(Column, this.GetIdFactory(value, forbidden), suffix)); trios.Add(new Table.Trio(ColumnType, Expression.Call(Expression.Constant(this), miConvertType, this.GetTypeFactory(value, forbidden)), suffix)); } static MethodInfo miConvertType = ReflectionTools.GetMethodInfo((FieldImplementedByAll fe) => fe.ConvertType(null)); int? ConvertType(Type type) { if (type == null) return null; return TypeLogic.TypeToId.GetOrThrow(type, "{0} not registered in the schema"); } } >>>>>>>
<<<<<<< public ICoreTransaction Parent { get { return parent; } } ======= public event Action Rolledback { add { parent.Rolledback += value; } remove { parent.Rolledback -= value; } } >>>>>>> public ICoreTransaction Parent { get { return parent; } } public event Action Rolledback { add { parent.Rolledback += value; } remove { parent.Rolledback -= value; } } <<<<<<< public virtual void Finish() ======= public virtual ICoreTransaction Finish() >>>>>>> public virtual void Finish() <<<<<<< public ICoreTransaction Parent { get { return parent; } } ======= >>>>>>> public ICoreTransaction Parent { get { return parent; } }
<<<<<<< // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version; ======= private static readonly ILog log = LogManager.GetLogger(typeof(CkanModule)); // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version; >>>>>>> [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version;
<<<<<<< public abstract bool AllowsSetSnapshotIsolation { get; } public abstract void FixType(ref SqlDbType type, ref int? size, ref int? scale); public abstract bool AllowsIndexWithWhere(string where); public abstract SqlPreCommand ShringDatabase(string schemaName); public abstract bool AllowsConvertToDate { get; } public abstract bool AllowsConvertToTime { get; } public abstract bool SupportsSqlDependency { get; } ======= >>>>>>> public abstract bool AllowsSetSnapshotIsolation { get; } public abstract void FixType(ref SqlDbType type, ref int? size, ref int? scale); public abstract bool AllowsIndexWithWhere(string where); public abstract SqlPreCommand ShringDatabase(string schemaName); public abstract bool AllowsConvertToDate { get; } public abstract bool AllowsConvertToTime { get; } public abstract bool SupportsSqlDependency { get; }
<<<<<<< (i, dix) => dix.Columns.Any(removedColums.Contains) || dix.IsControlledIndex && SafeConsole.Ask(ref removeExtraControlledIndexes, "Remove extra controlled index {0} in {1}?".FormatWith(dix.IndexName, tab.Name)) ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex)?.ViewName != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null, ======= (i, dix) => dix.Columns.Any(removedColums.Contains) || dix.IsControlledIndex ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex).Try(u => u.ViewName) != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null, >>>>>>> (i, dix) => dix.Columns.Any(removedColums.Contains) || dix.IsControlledIndex ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex)?.ViewName != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null,
<<<<<<< (i, dix) => dix.IsControlledIndex && SafeConsole.Ask(ref removeExtraControlledIndexes, "Remove extra controlled index {0} in {1}?".FormatWith(dix.IndexName, tab.Name)) || dix.Columns.Any(removedColums.Contains) ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex)?.ViewName != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null, ======= (i, dix) => dix.Columns.Any(removedColums.Contains) || dix.IsControlledIndex && SafeConsole.Ask(ref removeExtraControlledIndexes, "Remove extra controlled index {0} in {1}?".FormatWith(dix.IndexName, tab.Name)) ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex).Try(u => u.ViewName) != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null, >>>>>>> (i, dix) => dix.Columns.Any(removedColums.Contains) || dix.IsControlledIndex && SafeConsole.Ask(ref removeExtraControlledIndexes, "Remove extra controlled index {0} in {1}?".FormatWith(dix.IndexName, tab.Name)) ? SqlBuilder.DropIndex(dif.Name, dix) : null, (i, mix, dix) => (mix as UniqueIndex)?.ViewName != dix.ViewName || columnsChanged(dif, dix, mix) ? SqlBuilder.DropIndex(dif.Name, dix) : null,
<<<<<<< static ConcurrentDictionary<Assembly, DateTime> CompilationDatesCache = new ConcurrentDictionary<Assembly, DateTime>(); public static DateTime CompilationDate(this Assembly assembly) { return CompilationDatesCache.GetOrAdd(assembly, a => { string filePath = a.Location; const int c_PeHeaderOffset = 60; const int c_LinkerTimestampOffset = 8; byte[] b = new byte[2048]; System.IO.Stream s = null; try { s = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read); s.Read(b, 0, 2048); } finally { if (s != null) { s.Close(); } } int i = System.BitConverter.ToInt32(b, c_PeHeaderOffset); int secondsSince1970 = System.BitConverter.ToInt32(b, i + c_LinkerTimestampOffset); DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); dt = dt.AddSeconds(secondsSince1970); dt = dt.ToLocalTime(); return dt; }); } ======= public static void PreserveStackTrace(this Exception ex) { Action savestack = Delegate.CreateDelegate(typeof(Action), ex, "InternalPreserveStackTrace", false, false) as Action; if (savestack != null) savestack(); } >>>>>>> static ConcurrentDictionary<Assembly, DateTime> CompilationDatesCache = new ConcurrentDictionary<Assembly, DateTime>(); public static DateTime CompilationDate(this Assembly assembly) { return CompilationDatesCache.GetOrAdd(assembly, a => { string filePath = a.Location; const int c_PeHeaderOffset = 60; const int c_LinkerTimestampOffset = 8; byte[] b = new byte[2048]; System.IO.Stream s = null; try { s = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read); s.Read(b, 0, 2048); } finally { if (s != null) { s.Close(); } } int i = System.BitConverter.ToInt32(b, c_PeHeaderOffset); int secondsSince1970 = System.BitConverter.ToInt32(b, i + c_LinkerTimestampOffset); DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); dt = dt.AddSeconds(secondsSince1970); dt = dt.ToLocalTime(); return dt; }); } public static void PreserveStackTrace(this Exception ex) { Action savestack = Delegate.CreateDelegate(typeof(Action), ex, "InternalPreserveStackTrace", false, false) as Action; if (savestack != null) savestack(); }
<<<<<<< DropTable(diffTable.Name), DropTable(diffTable.TemporalTableName) )!; ======= DropTable(diffTable.Name) //DropTable(diffTable.TemporalTableName) ); >>>>>>> DropTable(diffTable.Name) //DropTable(diffTable.TemporalTableName) )!;
<<<<<<< // 2. Protect against IFRAME attack // app.UseXFrame(); // 3. Migrate OpenId database. if (options.DataSource.IsOpenIdDataMigrated) { using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { var simpleIdentityServerContext = serviceScope.ServiceProvider.GetService<SimpleIdentityServerContext>(); simpleIdentityServerContext.Database.EnsureCreated(); simpleIdentityServerContext.EnsureSeedData(); } } ======= app.UseXFrame(); >>>>>>> // app.UseXFrame();
<<<<<<< private TelemetryDiagnosticSourceListener telemetryDiagnosticSourceListener; #endif ======= >>>>>>> private TelemetryDiagnosticSourceListener telemetryDiagnosticSourceListener; <<<<<<< this.telemetryDiagnosticSourceListener = new TelemetryDiagnosticSourceListener(configuration); #endif ======= >>>>>>> this.telemetryDiagnosticSourceListener = new TelemetryDiagnosticSourceListener(configuration); <<<<<<< if (this.telemetryDiagnosticSourceListener != null) { this.telemetryDiagnosticSourceListener.Dispose(); } #endif ======= >>>>>>> if (this.telemetryDiagnosticSourceListener != null) { this.telemetryDiagnosticSourceListener.Dispose(); }
<<<<<<< public PerformanceCounterStructure CreateCounter( ======= public void RemoveCounter(string perfCounter, string reportAs) { this.counters.RemoveAll( counter => string.Equals(counter.Item1.ReportAs, reportAs, StringComparison.Ordinal) && string.Equals(counter.Item1.OriginalString, perfCounter, StringComparison.OrdinalIgnoreCase)); } public PerformanceCounter CreateCounter( >>>>>>> public void RemoveCounter(string perfCounter, string reportAs) { this.counters.RemoveAll( counter => string.Equals(counter.Item1.ReportAs, reportAs, StringComparison.Ordinal) && string.Equals(counter.Item1.OriginalString, perfCounter, StringComparison.OrdinalIgnoreCase)); } public PerformanceCounterStructure CreateCounter(
<<<<<<< /// <summary> /// The default color mapping. /// </summary> private OxyColor defaultColorMapping(HistogramItem item) => ActualFillColor; ======= >>>>>>> /// <summary> /// The default color mapping. /// </summary> private OxyColor defaultColorMapping(HistogramItem item) => ActualFillColor; <<<<<<< ======= /// <summary> /// Gets or sets the color of the interior of the bars when the value is negative. /// </summary> /// <value>The color.</value> public OxyColor NegativeFillColor { get; set; } >>>>>>> /// <summary> /// Gets or sets the color of the interior of the bars when the value is negative. /// </summary> /// <value>The color.</value> public OxyColor NegativeFillColor { get; set; } <<<<<<< /// <summary> /// Gets or sets the delegate used to map from histogram item to color. /// </summary> public Func<HistogramItem, OxyColor> ColorMapping { get; set; } ======= >>>>>>> /// <summary> /// Gets or sets the delegate used to map from histogram item to color. /// </summary> public Func<HistogramItem, OxyColor> ColorMapping { get; set; }
<<<<<<< if ( (System.String.Compare (arg.ToUpperInvariant (), "--HELP", System.StringComparison.Ordinal) == 0) || (System.String.Compare (arg.ToUpperInvariant (), "-H", System.StringComparison.Ordinal) == 0)) { WriteHelpInfo(); return; } ======= if ( (System.String.Compare(arg.ToUpperInvariant(), "--NOEXCEPTION", System.StringComparison.Ordinal) == 0) || (System.String.Compare(arg.ToUpperInvariant(), "-N", System.StringComparison.Ordinal) == 0)) NoException = true; >>>>>>> if ( (System.String.Compare (arg.ToUpperInvariant (), "--HELP", System.StringComparison.Ordinal) == 0) || (System.String.Compare (arg.ToUpperInvariant (), "-H", System.StringComparison.Ordinal) == 0)) { WriteHelpInfo(); return; } if ( (System.String.Compare(arg.ToUpperInvariant(), "--NOEXCEPTION", System.StringComparison.Ordinal) == 0) || (System.String.Compare(arg.ToUpperInvariant(), "-N", System.StringComparison.Ordinal) == 0)) NoException = true;
<<<<<<< ======= >>>>>>> <<<<<<< private static T Deserialize<T>() where T : class ======= private static T Deserialize<T>() where T : class { return Deserialize<T>(10); } private static T Deserialize<T>(int version) where T : class >>>>>>> private static T Deserialize<T>() where T : class { return Deserialize<T>(10); } private static T Deserialize<T>(int version) where T : class
<<<<<<< int velocityResolution = 32; int angleOfAttackResolution = 32; int altitudeResolution = 32; ======= int velocityResolution = 64; int angleOfAttackResolution = 32; int altitudeResolution = 32; >>>>>>> int velocityResolution = 32; int angleOfAttackResolution = 32; int altitudeResolution = 32; <<<<<<< double maxAltitude = body_.maxAtmosphereAltitude; double currentAltitude = maxAltitude * (double)m / (double)(cachedFARForces.GetLength(2) - 1); double machNumber = useNEAR ? 0.0 : (double)FARAeroUtil_GetMachNumber.Invoke(null, new object[] { body_, currentAltitude, new Vector3d((float)vel, 0, 0) }); double pressure = FlightGlobals.getStaticPressure(currentAltitude, body_); double stockRho = FlightGlobals.getAtmDensity(pressure); double rho = useNEAR ? stockRho : (double)FARAeroUtil_GetCurrentDensity.Invoke(null, new object[] { body_, currentAltitude, false }); if (rho < 0.0000000001) return new Vector2(0, 0); double invScale = 1.0 / (rho * v2); // divide by v² and rho before storing the force, to increase accuracy (the reverse operation is performed when reading from the cache) ======= double maxAltitude = body_.atmosphereDepth; double currentAltitude = maxAltitude * (double)m / (double)(cachedFARForces.GetLength(2) - 1); double machNumber = useNEAR ? 0.0 : (double)FARAeroUtil_GetMachNumber.Invoke(null, new object[] { body_, currentAltitude, new Vector3d((float)vel, 0, 0) }); double pressure = FlightGlobals.getStaticPressure(currentAltitude, body_); double temperature = FlightGlobals.getExternalTemperature(currentAltitude, body_); double stockRho = FlightGlobals.getAtmDensity(pressure, temperature); double rho = useNEAR ? stockRho : (double)FARAeroUtil_GetCurrentDensity.Invoke(null, new object[] { body_, currentAltitude, false }); if (rho < 0.0000000001) return new Vector2(0, 0); double invRho = 1.0 / rho; >>>>>>> double maxAltitude = body_.atmosphereDepth; double currentAltitude = maxAltitude * (double)m / (double)(cachedFARForces.GetLength(2) - 1); double machNumber = useNEAR ? 0.0 : (double)FARAeroUtil_GetMachNumber.Invoke(null, new object[] { body_, currentAltitude, new Vector3d((float)vel, 0, 0) }); double pressure = FlightGlobals.getStaticPressure(currentAltitude, body_); double temperature = FlightGlobals.getExternalTemperature(currentAltitude, body_); double stockRho = FlightGlobals.getAtmDensity(pressure, temperature); double rho = useNEAR ? stockRho : (double)FARAeroUtil_GetCurrentDensity.Invoke(null, new object[] { body_, currentAltitude, false }); if (rho < 0.0000000001) return new Vector2(0, 0); double invScale = 1.0 / (rho * v2); // divide by v² and rho before storing the force, to increase accuracy (the reverse operation is performed when reading from the cache) <<<<<<< Vector3d force = computeForces_FAR(rho, machNumber, velocity, new Vector3(0, 1, 0), AoA, 0.25) * invScale; return cachedFARForces[v, a, m] = new Vector2((float)force.x, (float)force.y); ======= Vector3d force = computeForces_FAR(rho, machNumber, velocity, new Vector3(0, 1, 0), AoA, 0.25) * invRho; return cachedFARForces[v, a, m] = new Vector2((float)(force.x / v2), (float)(force.y / v2)); // divide by v² before storing the force, to increase accuracy (the reverse operation is performed when reading from the cache) >>>>>>> Vector3d force = computeForces_FAR(rho, machNumber, velocity, new Vector3(0, 1, 0), AoA, 0.25) * invScale; return cachedFARForces[v, a, m] = new Vector2((float)force.x, (float)force.y); <<<<<<< return cachedFARForces[v,a,m]; ======= return cachedFARForces[v,a,m] * (float)v2; >>>>>>> return cachedFARForces[v,a,m];
<<<<<<< if (KSPManager.CurrentInstance != null) { User.WriteLine("Using KSP installation at \"{0}\"", KSPManager.CurrentInstance.GameDir()); } ======= if (ksp == null) { User.WriteLine("I don't know where KSP is installed."); User.WriteLine("Use 'ckan ksp help' for assistance on setting this."); return Exit.ERROR; } else { log.InfoFormat("Using KSP install at {0}",ksp.GameDir()); } } >>>>>>> User.WriteLine("Using KSP installation at \"{0}\"", KSPManager.CurrentInstance.GameDir()); if (ksp == null) { User.WriteLine("I don't know where KSP is installed."); User.WriteLine("Use 'ckan ksp help' for assistance on setting this."); return Exit.ERROR; } else { log.InfoFormat("Using KSP install at {0}",ksp.GameDir()); } }
<<<<<<< using System.Collections.Generic; using System.Linq; ======= using System.ComponentModel.DataAnnotations; >>>>>>> using System.Collections.Generic; using System.Linq; using System.ComponentModel.DataAnnotations;
<<<<<<< ======= moduleSymbols.OpenSymbolTable(); Profiler.BeginSample("Visit"); >>>>>>> moduleSymbols.OpenSymbolTable();
<<<<<<< BindableProperty.Create(nameof(LowerValue), typeof(float), typeof(RangeSlider), 0f); ======= BindableProperty.Create(LowerValuePropertyName, typeof(float), typeof(RangeSlider), 0f, defaultBindingMode: BindingMode.TwoWay); >>>>>>> BindableProperty.Create(nameof(LowerValue), typeof(float), typeof(RangeSlider), 0f, defaultBindingMode: BindingMode.TwoWay); <<<<<<< BindableProperty.Create(nameof(UpperValue), typeof(float), typeof(RangeSlider), 0f); ======= BindableProperty.Create(UpperValuePropertyName, typeof(float), typeof(RangeSlider), 0f, defaultBindingMode: BindingMode.TwoWay); >>>>>>> BindableProperty.Create(nameof(UpperValue), typeof(float), typeof(RangeSlider), 0f, defaultBindingMode: BindingMode.TwoWay);
<<<<<<< public class NuggetLocalizerTests { LanguageItem[] languages = LanguageItem.ParseHttpLanguageHeader("en"); [TestMethod] public void NuggetLocalizer_can_process_nugget_singleline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[123]]] [[[456]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx123yyy xxx456yyy", post); } [TestMethod] public void NuggetLocalizer_can_process_nugget_multiline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[1\r\n2]]] [[[\r\n3]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx1\r\n2yyy xxx\r\n3yyy", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstempty_secondnonempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years||||||10///First variable is a month]]]"; // Value for first variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur every 10 years", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstnonempty_secondempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years|||April|||///First variable is a month]]]"; // Value for second variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur April every years", post); } [TestMethod] [Description("Issue #169: Translate parameter.")] public void NuggetLocalizer_can_translate_parameter() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("!", "!"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[%0 is required|||(((ZipCode)))]]]"; // Value for second variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("!!ZipCode! is required!", post); } } } ======= public class NuggetLocalizerTests { LanguageItem[] languages = LanguageItem.ParseHttpLanguageHeader("en"); [TestMethod] public void NuggetLocalizer_can_process_nugget_singleline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[123]]] [[[456]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx123yyy xxx456yyy", post); } [TestMethod] public void NuggetLocalizer_can_process_nugget_multiline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[1\r\n2]]] [[[\r\n3]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx1\r\n2yyy xxx\r\n3yyy", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstempty_secondnonempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years||||||10///First variable is a month]]]"; // Value for first variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur every 10 years", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstnonempty_secondempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years|||April|||///First variable is a month]]]"; // Value for second variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur April every years", post); } [TestMethod] public void NuggetLocalizer_can_visualize_nugget() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); var settings = new i18nSettings(new WebConfigSettingService(null)) { VisualizeMessages = true }; i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(settings, textLocalizer); string pre = "[[[123]]] [[[456]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("!xxx123yyy! !xxx456yyy!", post); } } } >>>>>>> public class NuggetLocalizerTests { LanguageItem[] languages = LanguageItem.ParseHttpLanguageHeader("en"); [TestMethod] public void NuggetLocalizer_can_process_nugget_singleline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[123]]] [[[456]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx123yyy xxx456yyy", post); } [TestMethod] public void NuggetLocalizer_can_process_nugget_multiline() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[1\r\n2]]] [[[\r\n3]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("xxx1\r\n2yyy xxx\r\n3yyy", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstempty_secondnonempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years||||||10///First variable is a month]]]"; // Value for first variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur every 10 years", post); } [TestMethod] [Description("Issue #165: Parsing a nugget with empty parameter in Response should not give format exception.")] public void NuggetLocalizer_can_process_formatted_nugget_with_two_variables_firstnonempty_secondempty() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup(); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[Will occur %0 every %1 years|||April|||///First variable is a month]]]"; // Value for second variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("Will occur April every years", post); } [TestMethod] [Description("Issue #169: Translate parameter.")] public void NuggetLocalizer_can_translate_parameter() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("!", "!"); i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(new i18nSettings(new WebConfigSettingService(null)), textLocalizer); string pre = "[[[%0 is required|||(((ZipCode)))]]]"; // Value for second variable is missing. string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("!!ZipCode! is required!", post); } [TestMethod] public void NuggetLocalizer_can_visualize_nugget() { ITextLocalizer textLocalizer = new TextLocalizer_Mockup("xxx", "yyy"); var settings = new i18nSettings(new WebConfigSettingService(null)) { VisualizeMessages = true }; i18n.NuggetLocalizer obj = new i18n.NuggetLocalizer(settings, textLocalizer); string pre = "[[[123]]] [[[456]]]"; string post = obj.ProcessNuggets(pre, languages); Assert.AreEqual("!xxx123yyy! !xxx456yyy!", post); } } }
<<<<<<< protected Uri _FoldersUri = new Uri(Constants.FoldersEndpointString); ======= protected Uri _FilesUri = new Uri(Constants.FilesEndpointString); >>>>>>> protected Uri _FoldersUri = new Uri(Constants.FoldersEndpointString); protected Uri _FilesUri = new Uri(Constants.FilesEndpointString); <<<<<<< _config.SetupGet(x => x.FoldersEndpointUri).Returns(_FoldersUri); ======= _config.SetupGet(x => x.FilesEndpointUri).Returns(_FilesUri); >>>>>>> _config.SetupGet(x => x.FoldersEndpointUri).Returns(_FoldersUri); _config.SetupGet(x => x.FilesEndpointUri).Returns(_FilesUri);
<<<<<<< [TestMethod] public async Task DeleteFile_ValidResponse_FileDeleted() { /*** Arrange ***/ string responseString = ""; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ bool result = await _filesManager.DeleteAsync("34122832467"); /*** Assert ***/ Assert.AreEqual(true, result); } ======= [TestMethod] public async Task GetEmbedLink_ValidResponse_ValidEmbedLink() { /*** Arrange ***/ string responseString = "{\"type\": \"file\",\"id\": \"34122832467\", \"etag\": \"1\", \"expiring_embed_link\": { \"url\": \"https://app.box.com/preview/expiring_embed/gvoct6FE!Qz2rDeyxCiHsYpvlnR7JJ0SCfFM2M4YiX9cIwrSo4LOYQgxyP3rzoYuMmXg96mTAidqjPuRH7HFXMWgXEEm5LTi1EDlfBocS-iRfHpc5ZeYrAZpA5B8C0Obzkr4bUoF6wGq8BZ1noN_txyZUU1nLDNuL_u0rsImWhPAZlvgt7662F9lZSQ8nw6zKaRWGyqmj06PnxewCx0EQD3padm6VYkfHE2N20gb5rw1D0a7aaRJZzEijb2ICLItqfMlZ5vBe7zGdEn3agDzZP7JlID3FYdPTITsegB10gKLgSp_AJJ9QAfDv8mzi0bGv1ZmAU1FoVLpGC0XI0UKy3N795rZBtjLlTNcuxapbHkUCoKcgdfmHEn5NRQ3tmw7hiBfnX8o-Au34ttW9ntPspdAQHL6xPzQC4OutWZDozsA5P9sGlI-sC3VC2-WXsbXSedemubVd5vWzpVZtKRlb0gpuXsnDPXnMxSH7_jT4KSLhC8b5kEMPNo33FjEJl5pwS_o_6K0awUdRpEQIxM9CC3pBUZK5ooAc5X5zxo_2FBr1xq1p_kSbt4TVnNeohiLIu38TQysSb7CMR7JRhDDZhMMwAUc0wdSszELgL053lJlPeoiaLA49rAGP_B3BVuwFAFEl696w7UMx5NKu1mA0IOn9pDebzbhTl5HuUvBAHROc1Ocjb28Svyotik1IkPIw_1R33ZyAMvEFyzIygqBj8WedQeSK38iXvF2UXvkAf9kevOdnpwsKYiJtcxeJhFm7LUVKDTufuzuGRw-T7cPtbg..\" } }"; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ Uri embedLinkUrl = await _filesManager.GetPreviewLinkAsync("fakeId"); /*** Assert ***/ Assert.IsNotNull(embedLinkUrl); } >>>>>>> [TestMethod] public async Task DeleteFile_ValidResponse_FileDeleted() { /*** Arrange ***/ string responseString = ""; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ bool result = await _filesManager.DeleteAsync("34122832467"); /*** Assert ***/ Assert.AreEqual(true, result); } [TestMethod] public async Task GetEmbedLink_ValidResponse_ValidEmbedLink() { /*** Arrange ***/ string responseString = "{\"type\": \"file\",\"id\": \"34122832467\", \"etag\": \"1\", \"expiring_embed_link\": { \"url\": \"https://app.box.com/preview/expiring_embed/gvoct6FE!Qz2rDeyxCiHsYpvlnR7JJ0SCfFM2M4YiX9cIwrSo4LOYQgxyP3rzoYuMmXg96mTAidqjPuRH7HFXMWgXEEm5LTi1EDlfBocS-iRfHpc5ZeYrAZpA5B8C0Obzkr4bUoF6wGq8BZ1noN_txyZUU1nLDNuL_u0rsImWhPAZlvgt7662F9lZSQ8nw6zKaRWGyqmj06PnxewCx0EQD3padm6VYkfHE2N20gb5rw1D0a7aaRJZzEijb2ICLItqfMlZ5vBe7zGdEn3agDzZP7JlID3FYdPTITsegB10gKLgSp_AJJ9QAfDv8mzi0bGv1ZmAU1FoVLpGC0XI0UKy3N795rZBtjLlTNcuxapbHkUCoKcgdfmHEn5NRQ3tmw7hiBfnX8o-Au34ttW9ntPspdAQHL6xPzQC4OutWZDozsA5P9sGlI-sC3VC2-WXsbXSedemubVd5vWzpVZtKRlb0gpuXsnDPXnMxSH7_jT4KSLhC8b5kEMPNo33FjEJl5pwS_o_6K0awUdRpEQIxM9CC3pBUZK5ooAc5X5zxo_2FBr1xq1p_kSbt4TVnNeohiLIu38TQysSb7CMR7JRhDDZhMMwAUc0wdSszELgL053lJlPeoiaLA49rAGP_B3BVuwFAFEl696w7UMx5NKu1mA0IOn9pDebzbhTl5HuUvBAHROc1Ocjb28Svyotik1IkPIw_1R33ZyAMvEFyzIygqBj8WedQeSK38iXvF2UXvkAf9kevOdnpwsKYiJtcxeJhFm7LUVKDTufuzuGRw-T7cPtbg..\" } }"; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ Uri embedLinkUrl = await _filesManager.GetPreviewLinkAsync("fakeId"); /*** Assert ***/ Assert.IsNotNull(embedLinkUrl); }
<<<<<<< [TestMethod] public async Task DownloadStream_ValidResponse_ValidStream() { using (FileStream exampleFile = new FileStream(string.Format(getSaveFolderPath(), "example.png"), FileMode.OpenOrCreate)) { /*** Arrange ***/ Uri location = new Uri("http://dl.boxcloud.com"); HttpResponseHeaders headers = CreateInstanceNonPublicConstructor<HttpResponseHeaders>(); headers.Location = location; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, Headers = headers })); IBoxRequest boxRequest = null; _handler.Setup(h => h.ExecuteAsync<Stream>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<Stream>>(new BoxResponse<Stream>() { Status = ResponseStatus.Success, ResponseObject = exampleFile })) .Callback<IBoxRequest>(r => boxRequest = r); ; /*** Act ***/ Stream result = await _filesManager.DownloadStreamAsync("34122832467"); /*** Assert ***/ Assert.IsNotNull(result, "Stream is Null"); } } private string getSaveFolderPath() { string pathUser = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); return Path.Combine(pathUser, "Downloads") + "\\{0}"; } ======= [TestMethod] public async Task GetEmbedLink_ValidResponse_ValidEmbedLink() { /*** Arrange ***/ string responseString = "{\"type\": \"file\",\"id\": \"34122832467\", \"etag\": \"1\", \"expiring_embed_link\": { \"url\": \"https://app.box.com/preview/expiring_embed/gvoct6FE!Qz2rDeyxCiHsYpvlnR7JJ0SCfFM2M4YiX9cIwrSo4LOYQgxyP3rzoYuMmXg96mTAidqjPuRH7HFXMWgXEEm5LTi1EDlfBocS-iRfHpc5ZeYrAZpA5B8C0Obzkr4bUoF6wGq8BZ1noN_txyZUU1nLDNuL_u0rsImWhPAZlvgt7662F9lZSQ8nw6zKaRWGyqmj06PnxewCx0EQD3padm6VYkfHE2N20gb5rw1D0a7aaRJZzEijb2ICLItqfMlZ5vBe7zGdEn3agDzZP7JlID3FYdPTITsegB10gKLgSp_AJJ9QAfDv8mzi0bGv1ZmAU1FoVLpGC0XI0UKy3N795rZBtjLlTNcuxapbHkUCoKcgdfmHEn5NRQ3tmw7hiBfnX8o-Au34ttW9ntPspdAQHL6xPzQC4OutWZDozsA5P9sGlI-sC3VC2-WXsbXSedemubVd5vWzpVZtKRlb0gpuXsnDPXnMxSH7_jT4KSLhC8b5kEMPNo33FjEJl5pwS_o_6K0awUdRpEQIxM9CC3pBUZK5ooAc5X5zxo_2FBr1xq1p_kSbt4TVnNeohiLIu38TQysSb7CMR7JRhDDZhMMwAUc0wdSszELgL053lJlPeoiaLA49rAGP_B3BVuwFAFEl696w7UMx5NKu1mA0IOn9pDebzbhTl5HuUvBAHROc1Ocjb28Svyotik1IkPIw_1R33ZyAMvEFyzIygqBj8WedQeSK38iXvF2UXvkAf9kevOdnpwsKYiJtcxeJhFm7LUVKDTufuzuGRw-T7cPtbg..\" } }"; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ Uri embedLinkUrl = await _filesManager.GetPreviewLinkAsync("fakeId"); /*** Assert ***/ Assert.IsNotNull(embedLinkUrl); } >>>>>>> [TestMethod] public async Task DownloadStream_ValidResponse_ValidStream() { using (FileStream exampleFile = new FileStream(string.Format(getSaveFolderPath(), "example.png"), FileMode.OpenOrCreate)) { /*** Arrange ***/ Uri location = new Uri("http://dl.boxcloud.com"); HttpResponseHeaders headers = CreateInstanceNonPublicConstructor<HttpResponseHeaders>(); headers.Location = location; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, Headers = headers })); IBoxRequest boxRequest = null; _handler.Setup(h => h.ExecuteAsync<Stream>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<Stream>>(new BoxResponse<Stream>() { Status = ResponseStatus.Success, ResponseObject = exampleFile })) .Callback<IBoxRequest>(r => boxRequest = r); ; /*** Act ***/ Stream result = await _filesManager.DownloadStreamAsync("34122832467"); /*** Assert ***/ Assert.IsNotNull(result, "Stream is Null"); } } private string getSaveFolderPath() { string pathUser = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); return Path.Combine(pathUser, "Downloads") + "\\{0}"; } [TestMethod] public async Task GetEmbedLink_ValidResponse_ValidEmbedLink() { /*** Arrange ***/ string responseString = "{\"type\": \"file\",\"id\": \"34122832467\", \"etag\": \"1\", \"expiring_embed_link\": { \"url\": \"https://app.box.com/preview/expiring_embed/gvoct6FE!Qz2rDeyxCiHsYpvlnR7JJ0SCfFM2M4YiX9cIwrSo4LOYQgxyP3rzoYuMmXg96mTAidqjPuRH7HFXMWgXEEm5LTi1EDlfBocS-iRfHpc5ZeYrAZpA5B8C0Obzkr4bUoF6wGq8BZ1noN_txyZUU1nLDNuL_u0rsImWhPAZlvgt7662F9lZSQ8nw6zKaRWGyqmj06PnxewCx0EQD3padm6VYkfHE2N20gb5rw1D0a7aaRJZzEijb2ICLItqfMlZ5vBe7zGdEn3agDzZP7JlID3FYdPTITsegB10gKLgSp_AJJ9QAfDv8mzi0bGv1ZmAU1FoVLpGC0XI0UKy3N795rZBtjLlTNcuxapbHkUCoKcgdfmHEn5NRQ3tmw7hiBfnX8o-Au34ttW9ntPspdAQHL6xPzQC4OutWZDozsA5P9sGlI-sC3VC2-WXsbXSedemubVd5vWzpVZtKRlb0gpuXsnDPXnMxSH7_jT4KSLhC8b5kEMPNo33FjEJl5pwS_o_6K0awUdRpEQIxM9CC3pBUZK5ooAc5X5zxo_2FBr1xq1p_kSbt4TVnNeohiLIu38TQysSb7CMR7JRhDDZhMMwAUc0wdSszELgL053lJlPeoiaLA49rAGP_B3BVuwFAFEl696w7UMx5NKu1mA0IOn9pDebzbhTl5HuUvBAHROc1Ocjb28Svyotik1IkPIw_1R33ZyAMvEFyzIygqBj8WedQeSK38iXvF2UXvkAf9kevOdnpwsKYiJtcxeJhFm7LUVKDTufuzuGRw-T7cPtbg..\" } }"; _handler.Setup(h => h.ExecuteAsync<BoxFile>(It.IsAny<IBoxRequest>())) .Returns(Task.FromResult<IBoxResponse<BoxFile>>(new BoxResponse<BoxFile>() { Status = ResponseStatus.Success, ContentString = responseString })); /*** Act ***/ Uri embedLinkUrl = await _filesManager.GetPreviewLinkAsync("fakeId"); /*** Assert ***/ Assert.IsNotNull(embedLinkUrl); }
<<<<<<< ======= protected Uri _FoldersUri = new Uri(Constants.FoldersEndpointString); >>>>>>> protected Uri _FoldersUri = new Uri(Constants.FoldersEndpointString); <<<<<<< _config.SetupGet(x => x.CollaborationsEndpointUri).Returns(new Uri(Constants.CollaborationsEndpointString)); ======= _config.SetupGet(x => x.FoldersEndpointUri).Returns(_FoldersUri); >>>>>>> _config.SetupGet(x => x.CollaborationsEndpointUri).Returns(new Uri(Constants.CollaborationsEndpointString)); _config.SetupGet(x => x.FoldersEndpointUri).Returns(_FoldersUri);
<<<<<<< // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version; ======= private static readonly ILog log = LogManager.GetLogger(typeof(CkanModule)); // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version; >>>>>>> [JsonProperty("install")] public ModuleInstallDescriptor[] install; [JsonProperty("spec_version", Required = Required.Always)] public Version spec_version;
<<<<<<< case Constants.TypeMetadataTemplate: return new BoxMetadataTemplate(); ======= case Constants.TypeTermsOfService: return new BoxTermsOfService(); case Constants.TypeTermsOfServiceUserStatuses: return new BoxTermsOfServiceUserStatuses(); >>>>>>> case Constants.TypeMetadataTemplate: return new BoxMetadataTemplate(); case Constants.TypeTermsOfService: return new BoxTermsOfService(); case Constants.TypeTermsOfServiceUserStatuses: return new BoxTermsOfServiceUserStatuses();
<<<<<<< /// <summary> /// min zoom /// </summary> [Category("GMap.NET")] [Description("minimum zoom level of map")] public int MinZoom { get { return Core.minZoom; } set { Core.minZoom = value; } } /// <summary> /// map zooming type for mouse wheel /// </summary> [Category("GMap.NET")] [Description("map zooming type for mouse wheel")] public MouseWheelZoomType MouseWheelZoomType { get { return Core.MouseWheelZoomType; } set { Core.MouseWheelZoomType = value; } } /// <summary> /// text on empty tiles /// </summary> public string EmptyTileText = "We are sorry, but we don't\nhave imagery at this zoom\nlevel for this region."; ======= /// <summary> /// enable map zoom on mouse wheel /// </summary> [Category("GMap.NET")] [Description("enable map zoom on mouse wheel")] public bool MouseWheelZoomEnabled { get { return Core.MouseWheelZoomEnabled; } set { Core.MouseWheelZoomEnabled = value; } } /// <summary> /// text on empty tiles /// </summary> public string EmptyTileText = "We are sorry, but we don't\nhave imagery at this zoom\nlevel for this region."; >>>>>>> /// <summary> /// min zoom /// </summary> [Category("GMap.NET")] [Description("minimum zoom level of map")] public int MinZoom { get { return Core.minZoom; } set { Core.minZoom = value; } } /// <summary> /// map zooming type for mouse wheel /// </summary> [Category("GMap.NET")] [Description("map zooming type for mouse wheel")] public MouseWheelZoomType MouseWheelZoomType { get { return Core.MouseWheelZoomType; } set { Core.MouseWheelZoomType = value; } } /// <summary> /// enable map zoom on mouse wheel /// </summary> [Category("GMap.NET")] [Description("enable map zoom on mouse wheel")] public bool MouseWheelZoomEnabled { get { return Core.MouseWheelZoomEnabled; } set { Core.MouseWheelZoomEnabled = value; } } /// <summary> /// text on empty tiles /// </summary> public string EmptyTileText = "We are sorry, but we don't\nhave imagery at this zoom\nlevel for this region.";
<<<<<<< if(map.ScaleMode == ScaleModes.Fractional && remainder != 0 && map.ActualWidth > 0) { ======= if(Math.Abs(remainder) > 0.00001 && map.ActualWidth > 0) { bool scaleDown; switch (GMaps.Instance.MapFloatScaleMode) { case GMaps.ScaleMapMode.ScaleDown: scaleDown = true; break; case GMaps.ScaleMapMode.Dynamic: scaleDown = remainder > 0.25; break; default: scaleDown = false; break; } if (scaleDown) remainder--; >>>>>>> if(map.ScaleMode == ScaleModes.Fractional && remainder != 0 && map.ActualWidth > 0) { bool scaleDown; switch (GMaps.Instance.MapFloatScaleMode) { case GMaps.ScaleMapMode.ScaleDown: scaleDown = true; break; case GMaps.ScaleMapMode.Dynamic: scaleDown = remainder > 0.25; break; default: scaleDown = false; break; } if (scaleDown) remainder--; <<<<<<< map.Core.Zoom = Convert.ToInt32(value - remainder); ======= map.Core.Zoom = Convert.ToInt32(scaleDown ? Math.Ceiling(value) : value - remainder); map.ForceUpdateOverlays(); map.InvalidateVisual(true); >>>>>>> map.Core.Zoom = Convert.ToInt32(scaleDown ? Math.Ceiling(value) : value - remainder); <<<<<<< map.Core.Zoom = (int)Math.Floor(value); } ======= map.Core.scaleX = 1; map.Core.scaleY = 1; >>>>>>> map.Core.scaleX = 1; map.Core.scaleY = 1; map.Core.Zoom = (int)Math.Floor(value); }
<<<<<<< // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("bundles")] public dynamic[] bundles; [JsonProperty("install")] public dynamic[] install; ======= private static JsonSchema metadata_schema; private static string metadata_schema_path = "CKAN.schema"; private static bool metadata_schema_missing_warning_fired; [JsonProperty("bundles")] public BundledModuleDescriptor[] bundles; [JsonProperty("install")] public ModuleInstallDescriptor[] install; >>>>>>> // private static JsonSchema metadata_schema; // private static string metadata_schema_path = "CKAN.schema"; // private static bool metadata_schema_missing_warning_fired; [JsonProperty("bundles")] public BundledModuleDescriptor[] bundles; [JsonProperty("install")] public ModuleInstallDescriptor[] install;
<<<<<<< [assembly:AssemblyVersion("14.0.0.9055")] // The assembly version for THE OSS BUILD [assembly:AssemblyFileVersion("14.0.0.9055")] ======= [assembly:AssemblyVersion("12.0.0.9055")] // The assembly version for THE OSS BUILD [assembly:AssemblyFileVersion("12.0.0.9055")] [assembly: CLSCompliant(true)] >>>>>>> [assembly:AssemblyVersion("14.0.0.9055")] // The assembly version for THE OSS BUILD [assembly:AssemblyFileVersion("14.0.0.9055")] [assembly: CLSCompliant(true)]
<<<<<<< using System.Threading.Tasks; using System.Windows; ======= using Cama.Application.Commands.Mutation.ExecuteMutations; >>>>>>> using System.Threading.Tasks; using Cama.Application.Commands.Mutation.ExecuteMutations; <<<<<<< await Task.Run(() => _commandDispatcher.ExecuteCommandAsync( new ExecuteMutationsCommand( _config, RunningDocuments.Select(r => r.Document).ToList(), MutationDocumentStarted, MutationDocumentCompleted))); ======= await _mediator.Send( new ExecuteMutationsCommand(_config, RunningDocuments.Select(r => r.Document).ToList(), MutationDocumentStarted, MutationDocumentCompleted)); >>>>>>> await _mediator.Send( new ExecuteMutationsCommand( _config, RunningDocuments.Select(r => r.Document).ToList(), MutationDocumentStarted, MutationDocumentCompleted)));
<<<<<<< CIRCULARIZE, PERIAPSIS, APOAPSIS, ELLIPTICIZE, SEMI_MAJOR, INCLINATION, PLANE, TRANSFER, MOON_RETURN, INTERPLANETARY_TRANSFER, COURSE_CORRECTION, LAMBERT, KILL_RELVEL, RESONANT_ORBIT ======= CIRCULARIZE, PERIAPSIS, APOAPSIS, ELLIPTICIZE, INCLINATION, PLANE, TRANSFER, MOON_RETURN, INTERPLANETARY_TRANSFER, COURSE_CORRECTION, LAMBERT, KILL_RELVEL, RESONANT_ORBIT, LAN >>>>>>> CIRCULARIZE, PERIAPSIS, APOAPSIS, ELLIPTICIZE, SEMI_MAJOR, INCLINATION, PLANE, TRANSFER, MOON_RETURN, INTERPLANETARY_TRANSFER, COURSE_CORRECTION, LAMBERT, KILL_RELVEL, RESONANT_ORBIT, LAN <<<<<<< case Operation.SEMI_MAJOR: GuiUtils.SimpleTextBox ("New Semi-Major Axis:", newSMA, "km"); GUILayout.Label ("Schedule the burn"); break; ======= case Operation.LAN: GUILayout.Label("Schedule the burn"); GUILayout.Label("New Longitude of Ascending Node:"); core.target.targetLongitude.DrawEditGUI(EditableAngle.Direction.EW); break; >>>>>>> case Operation.SEMI_MAJOR: GuiUtils.SimpleTextBox ("New Semi-Major Axis:", newSMA, "km"); GUILayout.Label ("Schedule the burn"); break; case Operation.LAN: GUILayout.Label("Schedule the burn"); GUILayout.Label("New Longitude of Ascending Node:"); core.target.targetLongitude.DrawEditGUI(EditableAngle.Direction.EW); break; <<<<<<< case Operation.SEMI_MAJOR: if(o.Radius(UT) > 2*newSMA) { error = true; errorMessage = "cannot make Semi-Major Axis less than twice the burn altitude plus the radius of " + o.referenceBody.theName + "(" + MuUtils.ToSI(o.referenceBody.Radius, 3) + "m)"; } else if (2*newSMA > o.Radius(UT) + o.referenceBody.sphereOfInfluence) { errorMessage = "Warning: new Semi-Major Axis is very large, and may result in a hyberbolic orbit"; } break; ======= case Operation.LAN: if (o.inclination < 10) { errorMessage = "Warning: orbital plane has a low inclination of " + o.inclination + "º (recommend > 10º) and so maneuver may not be accurate"; } break; >>>>>>> case Operation.SEMI_MAJOR: if(o.Radius(UT) > 2*newSMA) { error = true; errorMessage = "cannot make Semi-Major Axis less than twice the burn altitude plus the radius of " + o.referenceBody.theName + "(" + MuUtils.ToSI(o.referenceBody.Radius, 3) + "m)"; } else if (2*newSMA > o.Radius(UT) + o.referenceBody.sphereOfInfluence) { errorMessage = "Warning: new Semi-Major Axis is very large, and may result in a hyberbolic orbit"; } break; case Operation.LAN: if (o.inclination < 10) { errorMessage = "Warning: orbital plane has a low inclination of " + o.inclination + "º (recommend > 10º) and so maneuver may not be accurate"; } break; <<<<<<< case Operation.SEMI_MAJOR: dV = OrbitalManeuverCalculator.DeltaVForSemiMajorAxis (o, UT, newSMA); break; ======= case Operation.LAN: dV = OrbitalManeuverCalculator.DeltaVToShiftLAN(o, UT, core.target.targetLongitude); break; >>>>>>> case Operation.SEMI_MAJOR: dV = OrbitalManeuverCalculator.DeltaVForSemiMajorAxis (o, UT, newSMA); break; case Operation.LAN: dV = OrbitalManeuverCalculator.DeltaVToShiftLAN(o, UT, core.target.targetLongitude); break;
<<<<<<< protected InlineAutoDataAttribute(AutoDataAttribute autoDataAttribute, params object[] values) ======= /// <remarks> /// <para> /// This constructor overload exists to enable a derived attribute to /// supply a custom <see cref="AutoDataAttribute" /> that again may /// contain custom behavior. /// </para> /// </remarks> /// <example> /// In this example, TheAnswer is a Customization that changes all /// 32-bit integer values to 42. This behavior is encapsulated in /// MyCustomAutoDataAttribute, and transitively in /// MyCustomInlineAutoDataAttribute. A parameterized test demonstrates /// how it can be used. /// <code> /// [Theory] /// [MyCustomInlineAutoData(1337)] /// [MyCustomInlineAutoData(1337, 7)] /// [MyCustomInlineAutoData(1337, 7, 42)] /// public void CustomInlineDataSuppliesExtraValues(int x, int y, int z) /// { /// Assert.Equal(1337, x); /// // y can vary, so we can't express any meaningful assertion for it. /// Assert.Equal(42, z); /// } /// /// private class MyCustomInlineAutoDataAttribute : InlineAutoDataAttribute /// { /// public MyCustomInlineAutoDataAttribute(params object[] values) : /// base(new MyCustomAutoDataAttribute(), values) /// { /// } /// } /// /// private class MyCustomAutoDataAttribute : AutoDataAttribute /// { /// public MyCustomAutoDataAttribute() : /// base(new Fixture().Customize(new TheAnswer())) /// { /// } /// /// private class TheAnswer : ICustomization /// { /// public void Customize(IFixture fixture) /// { /// fixture.Inject(42); /// } /// } /// } /// </code> /// </example> public InlineAutoDataAttribute(AutoDataAttribute autoDataAttribute, params object[] values) >>>>>>> /// <remarks> /// <para> /// This constructor overload exists to enable a derived attribute to /// supply a custom <see cref="AutoDataAttribute" /> that again may /// contain custom behavior. /// </para> /// </remarks> /// <example> /// In this example, TheAnswer is a Customization that changes all /// 32-bit integer values to 42. This behavior is encapsulated in /// MyCustomAutoDataAttribute, and transitively in /// MyCustomInlineAutoDataAttribute. A parameterized test demonstrates /// how it can be used. /// <code> /// [Theory] /// [MyCustomInlineAutoData(1337)] /// [MyCustomInlineAutoData(1337, 7)] /// [MyCustomInlineAutoData(1337, 7, 42)] /// public void CustomInlineDataSuppliesExtraValues(int x, int y, int z) /// { /// Assert.Equal(1337, x); /// // y can vary, so we can't express any meaningful assertion for it. /// Assert.Equal(42, z); /// } /// /// private class MyCustomInlineAutoDataAttribute : InlineAutoDataAttribute /// { /// public MyCustomInlineAutoDataAttribute(params object[] values) : /// base(new MyCustomAutoDataAttribute(), values) /// { /// } /// } /// /// private class MyCustomAutoDataAttribute : AutoDataAttribute /// { /// public MyCustomAutoDataAttribute() : /// base(new Fixture().Customize(new TheAnswer())) /// { /// } /// /// private class TheAnswer : ICustomization /// { /// public void Customize(IFixture fixture) /// { /// fixture.Inject(42); /// } /// } /// } /// </code> /// </example> protected InlineAutoDataAttribute(AutoDataAttribute autoDataAttribute, params object[] values)
<<<<<<< ======= return version = DetectVersion(GameDir()); } internal static KSPVersion DetectVersion(string path) { string readme = ""; try { // Slurp our README into memory readme = File.ReadAllText(Path.Combine(path, "readme.txt")); } catch { log.Error("Could not open KSP readme.txt"); throw new BadVersionException(); } // And find the KSP version. Easy! :) Match match = Regex.Match(readme, @"^Version\s+(\d+\.\d+\.\d+)", RegexOptions.IgnoreCase | RegexOptions.Multiline); if (match.Success) { string version = match.Groups[1].Value; log.DebugFormat("Found version {0}", version); return new KSPVersion(version); } // Oh noes! We couldn't find the version! // (Suggestions for better exceptions welcome!) log.Error("Could not find KSP version in readme.txt"); throw new BadVersionException(); } /// <summary> /// Returns path relative to this KSP's GameDir. /// </summary> public string ToRelativeGameDir(string path) { return KSPPathUtils.ToRelative(path, this.GameDir()); } /// <summary> /// Given a path relative to this KSP's GameDir, returns the /// absolute path on the system. /// </summary> public string ToAbsoluteGameDir(string path) { return KSPPathUtils.ToAbsolute(path, this.GameDir()); } >>>>>>> /// <summary> /// Returns path relative to this KSP's GameDir. /// </summary> public string ToRelativeGameDir(string path) { return KSPPathUtils.ToRelative(path, this.GameDir()); } /// <summary> /// Given a path relative to this KSP's GameDir, returns the /// absolute path on the system. /// </summary> public string ToAbsoluteGameDir(string path) { return KSPPathUtils.ToAbsolute(path, this.GameDir()); }
<<<<<<< using Newtonsoft.Json.Tests.TestObjects.Organization; #if !(NETFX_CORE || DNXCORE50) ======= #if !(DNXCORE50) >>>>>>> using Newtonsoft.Json.Tests.TestObjects.Organization; #if !(DNXCORE50)
<<<<<<< ======= using System.Text.RegularExpressions; >>>>>>> using System.Text.RegularExpressions; <<<<<<< private bool cancelRequested; private object cancelLock = new object(); private bool dryRun; private bool cleanup = true; private string batchJournalPath; private bool continuous; private bool journalInitialized = false; private bool journalFinished; ======= private bool cancelRequested; private object cancelLock = new object(); private bool dryRun; private bool cleanup = true; private string batchJournalPath; private bool continuous; private bool journalInitialized = false; private bool journalFinished; private GroupingType groupingType; >>>>>>> private bool cancelRequested; private object cancelLock = new object(); private bool dryRun; private bool cleanup = true; private string batchJournalPath; private bool continuous; private bool journalInitialized = false; private bool journalFinished; private GroupingType groupingType; <<<<<<< /// <summary> /// A flag to allow cancellation. Cancellation will occur /// after the running test is completed. /// </summary> public bool CancelRequested { get { lock (cancelLock) { return cancelRequested; } } set { lock (cancelLock) { cancelRequested = value; } } } /// <summary> /// A flag which allows the setup of tests and the creation /// of an addin file without actually running the tests. /// </summary> public bool DryRun { get{ return dryRun; } set { dryRun = value; } } /// <summary> /// A flag which controls whether journal files and addins /// generated by RTF are cleaned up upon test completion. /// </summary> public bool CleanUp { get { return cleanup; } set { cleanup = value; } } /// <summary> /// A flag which specifies whether all tests should be /// run from the same journal file. /// </summary> public bool Continuous { get { return continuous; } set { continuous = value; } } ======= /// <summary> /// A flag to allow cancellation. Cancellation will occur /// after the running test is completed. /// </summary> public bool CancelRequested { get { lock (cancelLock) { return cancelRequested; } } set { lock (cancelLock) { cancelRequested = value; } } } /// <summary> /// A flag which allows the setup of tests and the creation /// of an addin file without actually running the tests. /// </summary> public bool DryRun { get{ return dryRun; } set { dryRun = value; } } /// <summary> /// A flag which controls whether journal files and addins /// generated by RTF are cleaned up upon test completion. /// </summary> public bool CleanUp { get { return cleanup; } set { cleanup = value; } } /// <summary> /// A flag which specifies whether all tests should be /// run from the same journal file. /// </summary> public bool Continuous { get { return continuous; } set { continuous = value; } } public GroupingType GroupingType { get { return groupingType; } set { groupingType = value; if (value == GroupingType.Category) { foreach (var asm in Assemblies) { asm.SortingGroup = asm.Categories; } } else if (value == GroupingType.Fixture) { foreach (var asm in Assemblies) { asm.SortingGroup = asm.Fixtures; } } } } >>>>>>> /// <summary> /// A flag to allow cancellation. Cancellation will occur /// after the running test is completed. /// </summary> public bool CancelRequested { get { lock (cancelLock) { return cancelRequested; } } set { lock (cancelLock) { cancelRequested = value; } } } /// <summary> /// A flag which allows the setup of tests and the creation /// of an addin file without actually running the tests. /// </summary> public bool DryRun { get{ return dryRun; } set { dryRun = value; } } /// <summary> /// A flag which controls whether journal files and addins /// generated by RTF are cleaned up upon test completion. /// </summary> public bool CleanUp { get { return cleanup; } set { cleanup = value; } } /// <summary> /// A flag which specifies whether all tests should be /// run from the same journal file. /// </summary> public bool Continuous { get { return continuous; } set { continuous = value; } } public GroupingType GroupingType { get { return groupingType; } set { groupingType = value; if (value == GroupingType.Category) { foreach (var asm in Assemblies) { asm.SortingGroup = asm.Categories; } } else if (value == GroupingType.Fixture) { foreach (var asm in Assemblies) { asm.SortingGroup = asm.Fixtures; } } } } <<<<<<< if (cancelRequested) { cancelRequested = false; break; } SetupFixtureTests(fix); ======= if (cancelRequested) { cancelRequested = false; break; } SetupFixtureTests(fix as IFixtureData); >>>>>>> if (cancelRequested) { cancelRequested = false; break; } SetupFixtureTests(fix as IFixtureData);
<<<<<<< using SqlKata.Compilers.Bindings; ======= using System.Reflection; using System.Text; >>>>>>> using SqlKata.Compilers.Bindings; using System.Text; <<<<<<< return ctx; } public virtual SqlResult Compile(Query query) { var ctx = CompileRaw(query); _sqlResultBinder.BindNamedParameters(ctx); ======= foreach (var cte in cteSearchResult) { var cteCtx = CompileCte(cte); cteBindings.AddRange(cteCtx.Bindings); rawSql.Append(cteCtx.RawSql.Trim()); rawSql.Append(",\n"); } rawSql.Length -= 2; // remove last comma rawSql.Append('\n'); rawSql.Append(ctx.RawSql); ctx.Bindings.InsertRange(0, cteBindings); ctx.RawSql = rawSql.ToString(); } >>>>>>> foreach (var cte in cteSearchResult) { var cteCtx = CompileCte(cte); cteBindings.AddRange(cteCtx.Bindings); rawSql.Append(cteCtx.RawSql.Trim()); rawSql.Append(",\n"); } rawSql.Length -= 2; // remove last comma rawSql.Append('\n'); rawSql.Append(ctx.RawSql); ctx.Bindings.InsertRange(0, cteBindings); ctx.RawSql = rawSql.ToString(); } return ctx; } public virtual SqlResult Compile(Query query) { var ctx = CompileRaw(query); _sqlResultBinder.BindNamedParameters(ctx);
<<<<<<< .ToDictionary(x => parameterPrefix + x.i, x => x.v); ======= .ToDictionary(x => { variable = GetVariableByName(withVarClauses, x.v); return (variable != null) ? x.v.ToString() : parameterPlaceholderPrefix + (currentIndexNonVariableParameter++); }, x => { return variable?.Value ?? x.v; }); >>>>>>> .ToDictionary(x => { variable = GetVariableByName(withVarClauses, x.v); return (variable != null) ? x.v.ToString() : parameterPrefix + (currentIndexNonVariableParameter++); }, x => { return variable?.Value ?? x.v; }); <<<<<<< ctx.NamedBindings = generateNamedBindings(ctx.Bindings.ToArray()); ctx.Sql = Helper.ReplaceAll(ctx.RawSql, parameterPlaceholder, i => parameterPrefix + i); ======= var variables = ctx.Query.GetComponents<WithVarClause>("withVar", EngineCode); ctx.NamedBindings = generateNamedBindings(ctx.Bindings.ToArray(), variables); ctx.Sql = Helper.ReplaceAll(ctx.RawSql, parameterPlaceholder, (i) => parameterPlaceholderPrefix + i); >>>>>>> var variables = ctx.Query.GetComponents<WithVarClause>("withVar", EngineCode); ctx.NamedBindings = generateNamedBindings(ctx.Bindings.ToArray(), variables); ctx.Sql = Helper.ReplaceAll(ctx.RawSql, parameterPlaceholder, (i) => parameterPrefix + i);
<<<<<<< string path = Path.GetDirectoryName(i.FilePath); string directory = path.Substring(path.LastIndexOf("\\", StringComparison.Ordinal) + 1); ======= string path = PathHelper.GetDirectoryName(i.FilePath); string directory = path.Substring(path.LastIndexOf("\\") + 1); >>>>>>> string path = PathHelper.GetDirectoryName(i.FilePath); string directory = path.Substring(path.LastIndexOf("\\", StringComparison.Ordinal) + 1); <<<<<<< if (dgv_PlayList.Rows.Count < 1) return; SetPlaylistIndex(dgv_PlayList.CurrentRow.Index); SetPlayStyling(); ======= if (dgv_PlayList.Rows.Count < 1 || dgv_PlayList.CurrentRow == null) return; if (File.Exists(Playlist[dgv_PlayList.CurrentRow.Index].FilePath)) { var f = new Font(dgv_PlayList.DefaultCellStyle.Font, FontStyle.Regular); dgv_PlayList.Rows[dgv_PlayList.CurrentRow.Index].DefaultCellStyle.Font = f; dgv_PlayList.Rows[dgv_PlayList.CurrentRow.Index].DefaultCellStyle.ForeColor = Color.Black; SetPlaylistIndex(dgv_PlayList.CurrentRow.Index); } else { var f = new Font(dgv_PlayList.DefaultCellStyle.Font, FontStyle.Strikeout); dgv_PlayList.Rows[dgv_PlayList.CurrentRow.Index].DefaultCellStyle.Font = f; dgv_PlayList.Rows[dgv_PlayList.CurrentRow.Index].DefaultCellStyle.ForeColor = Color.LightGray; } >>>>>>> if (dgv_PlayList.Rows.Count < 1 || dgv_PlayList.CurrentRow == null) return; SetPlaylistIndex(dgv_PlayList.CurrentRow.Index); SetPlayStyling(); <<<<<<< ClearPlaylist(); var media = playListUi.GetAllMediaFiles(fd.SelectedPath); if (media.ToArray().Length == 0) ======= var media = playListUi.GetAllMediaFiles(fd.SelectedPath).ToArray(); if (media.Length == 0) >>>>>>> ClearPlaylist(); var media = playListUi.GetAllMediaFiles(fd.SelectedPath).ToArray(); if (media.Length == 0) <<<<<<< if (dgv_PlayList.CurrentCell == null) return; if (dgv_PlayList.CurrentCell.RowIndex != currentPlayIndex) playToolStripMenuItem.Text = "Play"; ======= if (dgv_PlayList.CurrentCell == null || dgv_PlayList.CurrentCell.RowIndex != currentPlayIndex) playToolStripMenuItem.Text = "Play"; >>>>>>> if (dgv_PlayList.CurrentCell == null || dgv_PlayList.CurrentCell.RowIndex != currentPlayIndex) playToolStripMenuItem.Text = "Play"; <<<<<<< GuiThread.Do(() => ======= var index = i; GuiThread.DoAsync(() => >>>>>>> int idx = i; GuiThread.DoAsync(() => <<<<<<< //silently fails Player.HandleException(ex); ======= GuiThread.DoAsync(() =>Player.HandleException(ex)); >>>>>>> GuiThread.DoAsync(() => Player.HandleException(ex));
<<<<<<< this.RaiseSubscriptionAdding(remoteSubscriber, options); IWampClientProxy<TMessage> client = request.Client; ======= IWampClient<TMessage> client = request.Client; >>>>>>> IWampClientProxy<TMessage> client = request.Client; <<<<<<< mClient = client; IWampClientProxy casted = mClient as IWampClientProxy; mSessionId = casted.Session; ======= mRawTopic = rawTopic; >>>>>>> mRawTopic = rawTopic;
<<<<<<< private readonly IWampEventSerializer mEventSerializer; ======= private readonly ILogger mLogger; private readonly IWampEventSerializer<TMessage> mEventSerializer; >>>>>>> private readonly IWampEventSerializer mEventSerializer; private readonly ILogger mLogger;
<<<<<<< private readonly ActionBlock<WampMessage<object>> mSendBlock; ======= private readonly ActionBlock<WampMessage<TMessage>> mSendBlock; protected readonly ILogger mLogger; >>>>>>> private readonly ActionBlock<WampMessage<object>> mSendBlock; protected readonly ILogger mLogger; <<<<<<< mSendBlock = new ActionBlock<WampMessage<object>>(x => InnerSend(x)); ======= mLogger = WampLoggerFactory.Create(this.GetType()); mSendBlock = new ActionBlock<WampMessage<TMessage>>(x => InnerSend(x)); >>>>>>> mLogger = WampLoggerFactory.Create(this.GetType()); mSendBlock = new ActionBlock<WampMessage<object>>(x => InnerSend(x));
<<<<<<< using Newtonsoft.Json.Tests.TestObjects.Organization; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; #elif DNXCORE50 ======= #if DNXCORE50 >>>>>>> using Newtonsoft.Json.Tests.TestObjects.Organization; #if DNXCORE50
<<<<<<< using System.Buffers; using System.IO; using System.Net.Security; ======= >>>>>>> using System.IO; using System.Net.Security;
<<<<<<< else if (e.CommandType == typeof(PipeCommands.GetVirtualMotionTracker)) { await server.SendCommandAsync(new PipeCommands.SetVirtualMotionTracker { enable = vmtClient.GetEnable(), no = vmtClient.GetNo() }, e.RequestId); } else if (e.CommandType == typeof(PipeCommands.SetVirtualMotionTracker)) { var d = (PipeCommands.SetVirtualMotionTracker)e.Data; SetVMT(d.enable, d.no); } ======= else if (e.CommandType == typeof(PipeCommands.GetViveLipTrackingBlendShape)) { await server.SendCommandAsync(new PipeCommands.SetViveLipTrackingBlendShape { LipShapes = lipTracking_Vive.GetLipShapesStringList(), LipShapesToBlendShapeMap = CurrentSettings.LipShapesToBlendShapeMap, }, e.RequestId); } else if (e.CommandType == typeof(PipeCommands.SetViveLipTrackingBlendShape)) { var d = (PipeCommands.SetViveLipTrackingBlendShape)e.Data; CurrentSettings.LipShapesToBlendShapeMap = d.LipShapesToBlendShapeMap; lipTracking_Vive.SetLipShapeToBlendShapeStringMap(d.LipShapesToBlendShapeMap); } >>>>>>> else if (e.CommandType == typeof(PipeCommands.GetVirtualMotionTracker)) { await server.SendCommandAsync(new PipeCommands.SetVirtualMotionTracker { enable = vmtClient.GetEnable(), no = vmtClient.GetNo() }, e.RequestId); } else if (e.CommandType == typeof(PipeCommands.SetVirtualMotionTracker)) { var d = (PipeCommands.SetVirtualMotionTracker)e.Data; SetVMT(d.enable, d.no); } else if (e.CommandType == typeof(PipeCommands.GetViveLipTrackingBlendShape)) { await server.SendCommandAsync(new PipeCommands.SetViveLipTrackingBlendShape { LipShapes = lipTracking_Vive.GetLipShapesStringList(), LipShapesToBlendShapeMap = CurrentSettings.LipShapesToBlendShapeMap, }, e.RequestId); } else if (e.CommandType == typeof(PipeCommands.SetViveLipTrackingBlendShape)) { var d = (PipeCommands.SetViveLipTrackingBlendShape)e.Data; CurrentSettings.LipShapesToBlendShapeMap = d.LipShapesToBlendShapeMap; lipTracking_Vive.SetLipShapeToBlendShapeStringMap(d.LipShapesToBlendShapeMap); }
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> /// Throws exception if device is disconnected or not opened for operation. /// </exception> /// <since_tizen> 5 </since_tizen> public string InterfaceString { get ======= /// <returns></returns> /// <since_tizen> 4 </since_tizen> public string InterfaceString() >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> /// Throws exception if device is disconnected or not opened for operation. /// </exception> /// <since_tizen> 5 </since_tizen> public string InterfaceString { get <<<<<<< /// <param name="force">Set to true to auto detach kernel driver, false otherwise.</param> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> ======= /// <param name="force">Set to true to auto detach the kernel driver, false otherwise.</param> >>>>>>> /// <param name="force">Set to true to auto detach the kernel driver, false otherwise.</param> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> <<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation.</exception> /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected or not opened for an operation.</exception> /// <exception cref="UnauthorizedAccessException">Throws an exception if the user has insufficient permission on the device.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation.</exception> /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception> /// <since_tizen> 4 </since_tizen>
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen>
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> /// Throws exception if device is disconnected or not opened for operation or busy as its interfaces are currently claimed. /// </exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> /// Throws exception if device is disconnected or not opened for operation or busy as its interfaces are currently claimed. /// </exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> Throws exception if device is disconnected or not opened for operation. </exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="InvalidOperationException"> /// Throws an exception if the device is disconnected, or not opened for an operation, or busy as its interfaces are currently claimed. /// </exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> /// Throws an exception if the device is disconnected, or not opened for an operation, or busy as its interfaces are currently claimed. /// </exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object.</summary> /// <since_tizen> 5 </since_tizen> internal virtual void Dispose(bool disposing) ======= /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> protected virtual void Dispose(bool disposing) >>>>>>> /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> internal virtual void Dispose(bool disposing) <<<<<<< /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object.</summary> /// <since_tizen> 5 </since_tizen> ======= /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> >>>>>>> /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen>
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< internal readonly UsbInterface _parent; ======= /// <since_tizen> 4 </since_tizen> protected readonly UsbInterface _parent; >>>>>>> internal readonly UsbInterface _parent; <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< internal int TransferImpl(byte[] buffer, int length, uint timeout) ======= /// <since_tizen> 4 </since_tizen> protected int TransferImpl(byte[] buffer, int length, uint timeout) >>>>>>> internal int TransferImpl(byte[] buffer, int length, uint timeout)
<<<<<<< public async Task<List<ISchemaEntity>> GetSchemasAsync(DomainId appId, bool allowDeleted = false) ======= public async Task<List<ISchemaEntity>> GetSchemasAsync(Guid appId) >>>>>>> public async Task<List<ISchemaEntity>> GetSchemasAsync(DomainId appId) <<<<<<< public async Task<ISchemaEntity?> GetSchemaByNameAsync(DomainId appId, string name, bool allowDeleted = false) ======= public async Task<ISchemaEntity?> GetSchemaByNameAsync(Guid appId, string name, bool canCache) >>>>>>> public async Task<ISchemaEntity?> GetSchemaByNameAsync(DomainId appId, string name, bool canCache)
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="UnauthorizedAccessException">Throws an exception if the user has insufficient permission on the device.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation. </exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation. </exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> Throws exception if device is disconnected or not opened for operation. </exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException"> Throws exception if device is disconnected or not opened for operation. </exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="OutOfMemoryException">Throws exception in case of insufficient memory.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected.</exception> /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="OutOfMemoryException">Throws an exception in case of insufficient memory.</exception> /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected.</exception> /// <exception cref="UnauthorizedAccessException">Throws an exception if the user has insufficient permission on the device.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="OutOfMemoryException">Throws an exception in case of insufficient memory.</exception> /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected.</exception> /// <exception cref="UnauthorizedAccessException">Throws an exception if the user has insufficient permission on the device.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <exception cref="InvalidOperationException">Throws an exception if the device is not opened for an operation.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object.</summary> /// <since_tizen> 5 </since_tizen> internal virtual void Dispose(bool disposing) ======= /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> protected virtual void Dispose(bool disposing) >>>>>>> /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> internal virtual void Dispose(bool disposing) <<<<<<< /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object.</summary> /// <since_tizen> 5 </since_tizen> ======= /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen> >>>>>>> /// Releases all the resources used by the ConnectionProfile. /// It should be called after it has finished using the object.</summary> /// <since_tizen> 4 </since_tizen>
<<<<<<< using NodaTime; using Squidex.Infrastructure; ======= >>>>>>> using Squidex.Infrastructure; <<<<<<< Task LogAsync(DomainId appId, Instant timestamp, string? requestMethod, string? requestPath, string? userId, string? clientId, long elapsedMs, double costs); ======= Task LogAsync(Guid appId, RequestLog request); >>>>>>> Task LogAsync(DomainId appId, RequestLog request);
<<<<<<< /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5</since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <since_tizen> 4 </since_tizen> >>>>>>> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <since_tizen> 4 </since_tizen> <<<<<<< /// <returns>Transferred Number of transferred bytes.</returns> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation.</exception> /// <exception cref="TimeoutException">Throws exception if transfer timed-out.</exception> /// <since_tizen> 5 </since_tizen> ======= /// <returns>Transferred number of the transferred bytes.</returns> /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected or not opened for an operation.</exception> /// <exception cref="TimeoutException">Throws an exception if the transfer is timed out.</exception> /// <since_tizen> 4 </since_tizen> >>>>>>> /// <returns>Transferred number of the transferred bytes.</returns> /// <feature>http://tizen.org/feature/usb.host</feature> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="InvalidOperationException">Throws an exception if the device is disconnected or not opened for an operation.</exception> /// <exception cref="TimeoutException">Throws an exception if the transfer is timed out.</exception> /// <since_tizen> 4 </since_tizen>
<<<<<<< /// Enumeration for visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBarVisiblePolicy { /// <summary> /// Show scrollbars as needed /// </summary> Auto = 0, /// <summary> /// Always show scrollbars /// </summary> Visible, /// <summary> /// Never show scrollbars /// </summary> Invisible } /// <summary> /// Enumeration for visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBlock { /// <summary> /// Scrolling movement is allowed in both direction.(X axis and Y axis) /// </summary> None = 1, /// <summary> /// Scrolling movement is not allowed in Y axis direction. /// </summary> Vertical = 2, /// <summary> /// Scrolling movement is not allowed in X axis direction. /// </summary> Horizontal = 4 } /// <summary> /// Type that controls how the content is scrolled. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollSingleDirection { /// <summary> /// Scroll every direction. /// </summary> None, /// <summary> /// Scroll single direction if the direction is certain. /// </summary> Soft, /// <summary> /// Scroll only single direction. /// </summary> Hard, } /// <summary> ======= /// Enumeration for the visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBarVisiblePolicy { /// <summary> /// Show scrollbars as needed. /// </summary> Auto = 0, /// <summary> /// Always show scrollbars. /// </summary> Visible, /// <summary> /// Never show scrollbars. /// </summary> Invisible } /// <summary> /// Enumeration for the visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBlock { /// <summary> /// Scrolling movement is allowed in both the directions (X-axis and Y-axis). /// </summary> None = 1, /// <summary> /// Scrolling movement is not allowed in the Y-axis direction. /// </summary> Vertical = 2, /// <summary> /// Scrolling movement is not allowed in the X-axis direction. /// </summary> Horizontal = 4 } /// <summary> /// Type that controls how the content is scrolled. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollSingleDirection { /// <summary> /// Scroll in every direction. /// </summary> None, /// <summary> /// Scroll in single direction if the direction is certain. /// </summary> Soft, /// <summary> /// Scroll only in a single direction. /// </summary> Hard, } /// <summary> >>>>>>> /// Enumeration for the visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBarVisiblePolicy { /// <summary> /// Show scrollbars as needed. /// </summary> Auto = 0, /// <summary> /// Always show scrollbars. /// </summary> Visible, /// <summary> /// Never show scrollbars. /// </summary> Invisible } /// <summary> /// Enumeration for the visible type of scrollbar. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollBlock { /// <summary> /// Scrolling movement is allowed in both the directions (X-axis and Y-axis). /// </summary> None = 1, /// <summary> /// Scrolling movement is not allowed in the Y-axis direction. /// </summary> Vertical = 2, /// <summary> /// Scrolling movement is not allowed in the X-axis direction. /// </summary> Horizontal = 4 } /// <summary> /// Type that controls how the content is scrolled. /// </summary> /// <since_tizen> preview </since_tizen> public enum ScrollSingleDirection { /// <summary> /// Scroll in every direction. /// </summary> None, /// <summary> /// Scroll in single direction if the direction is certain. /// </summary> Soft, /// <summary> /// Scroll only in a single direction. /// </summary> Hard, } /// <summary> <<<<<<< SmartEvent _scroll; SmartEvent _scrollAnimationStart; SmartEvent _scrollAnimationStop; SmartEvent _dragStart; SmartEvent _dragStop; SmartEvent _scrollpage; ======= SmartEvent _scroll; SmartEvent _dragStart; SmartEvent _dragStop; SmartEvent _scrollpage; >>>>>>> SmartEvent _scroll; SmartEvent _scrollAnimationStart; SmartEvent _scrollAnimationStop; SmartEvent _dragStart; SmartEvent _dragStop; SmartEvent _scrollpage; <<<<<<< add { _scroll.On += value; } remove { _scroll.On -= value; } } /// <summary> /// ScrollAnimationStarted will be triggered when the content animation has been started. /// </summary> /// <since_tizen> preview </since_tizen> public event EventHandler ScrollAnimationStarted { add { _scrollAnimationStart.On += value; } remove { _scrollAnimationStart.On -= value; } } /// <summary> /// ScrollAnimationStopped will be triggered when the content animation has been stopped. /// </summary> /// <since_tizen> preview </since_tizen> public event EventHandler ScrollAnimationStopped { add { _scrollAnimationStop.On += value; } remove { _scrollAnimationStop.On -= value; } ======= add { _scroll.On += value; } remove { _scroll.On -= value; } >>>>>>> add { _scroll.On += value; } remove { _scroll.On -= value; } } /// <summary> /// ScrollAnimationStarted will be triggered when the content animation has been started. /// </summary> /// <since_tizen> preview </since_tizen> public event EventHandler ScrollAnimationStarted { add { _scrollAnimationStart.On += value; } remove { _scrollAnimationStart.On -= value; } } /// <summary> /// ScrollAnimationStopped will be triggered when the content animation has been stopped. /// </summary> /// <since_tizen> preview </since_tizen> public event EventHandler ScrollAnimationStopped { add { _scrollAnimationStop.On += value; } remove { _scrollAnimationStop.On -= value; } <<<<<<< /// <param name="horizontal">Enable limiting minimum size horizontally</param> /// <param name="vertical">Enable limiting minimum size vertically</param> /// <since_tizen> preview </since_tizen> ======= /// <param name="horizontal">Enable limiting minimum size horizontally.</param> /// <param name="vertical">Enable limiting minimum size vertically.</param> /// <since_tizen> preview </since_tizen> >>>>>>> /// <param name="horizontal">Enable limiting minimum size horizontally.</param> /// <param name="vertical">Enable limiting minimum size vertically.</param> /// <since_tizen> preview </since_tizen> <<<<<<< if (animated) { Interop.Elementary.elm_scroller_region_bring_in(RealHandle, region.X, region.Y, region.Width, region.Height); } else { Interop.Elementary.elm_scroller_region_show(RealHandle, region.X, region.Y, region.Width, region.Height); } } /// <summary> /// The callback of Realized Event /// </summary> /// <since_tizen> preview </since_tizen> protected override void OnRealized() { base.OnRealized(); _scroll = new SmartEvent(this, this.RealHandle, "scroll"); _scrollAnimationStart = new SmartEvent(this, this.RealHandle, "scroll,anim,start"); _scrollAnimationStop = new SmartEvent(this, this.RealHandle, "scroll,anim,stop"); _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start"); _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop"); _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed"); ======= if (animated) { Interop.Elementary.elm_scroller_region_bring_in(RealHandle, region.X, region.Y, region.Width, region.Height); } else { Interop.Elementary.elm_scroller_region_show(RealHandle, region.X, region.Y, region.Width, region.Height); } } /// <summary> /// The callback of the Realized event. /// </summary> /// <since_tizen> preview </since_tizen> protected override void OnRealized() { base.OnRealized(); _scroll = new SmartEvent(this, this.RealHandle, "scroll"); _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start"); _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop"); _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed"); >>>>>>> if (animated) { Interop.Elementary.elm_scroller_region_bring_in(RealHandle, region.X, region.Y, region.Width, region.Height); } else { Interop.Elementary.elm_scroller_region_show(RealHandle, region.X, region.Y, region.Width, region.Height); } } /// <summary> /// The callback of the Realized event. /// </summary> /// <since_tizen> preview </since_tizen> protected override void OnRealized() { base.OnRealized(); _scroll = new SmartEvent(this, this.RealHandle, "scroll"); _scrollAnimationStart = new SmartEvent(this, this.RealHandle, "scroll,anim,start"); _scrollAnimationStop = new SmartEvent(this, this.RealHandle, "scroll,anim,stop"); _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start"); _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop"); _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed"); <<<<<<< /// <param name="parent">Parent EvasObject</param> /// <returns>Handle IntPtr</returns> /// <since_tizen> preview </since_tizen> ======= /// <param name="parent">Parent EvasObject.</param> /// <returns>Handle IntPtr.</returns> /// <since_tizen> preview </since_tizen> >>>>>>> /// <param name="parent">Parent EvasObject.</param> /// <returns>Handle IntPtr.</returns> /// <since_tizen> preview </since_tizen>
<<<<<<< //get api key from header var headers = Request.Headers; string apikey = ""; IEnumerable<string> headerParams; if (headers.TryGetValues("Auth", out headerParams)) { string[] auth = headerParams.ToList()[0].Split(','); apikey = auth[0]; } // ToDo: In the next sprint related to business logic behind RESTful calls, need to split the ledgersIds comma // separated list object value = _orderQueryService.GetOpenOrders(new TraderId(int.Parse(Constants.GetTraderId(apikey))), ======= // ToDo: TraderId should be retreived after authorizing the API Key and getting the TraderId if API Key is valid object value = _orderQueryService.GetOpenOrders(new TraderId(int.Parse(Constants.GetTraderId("123456789"))), >>>>>>> //get api key from header var headers = Request.Headers; string apikey = ""; IEnumerable<string> headerParams; if (headers.TryGetValues("Auth", out headerParams)) { string[] auth = headerParams.ToList()[0].Split(','); apikey = auth[0]; } object value = _orderQueryService.GetOpenOrders(new TraderId(int.Parse(Constants.GetTraderId(apikey))),
<<<<<<< Description = "The id of the content (usually GUID).", DefaultValue = string.Empty, ResolvedType = AllTypes.NonNullDomainId ======= Description = "The id of the content (GUID).", DefaultValue = null, ResolvedType = AllTypes.NonNullGuid >>>>>>> Description = "The id of the content (usually GUID).", DefaultValue = null, ResolvedType = AllTypes.NonNullDomainId <<<<<<< Description = "The id of the content (usually GUID)", DefaultValue = string.Empty, ResolvedType = AllTypes.NonNullString ======= Description = "The id of the content (GUID)", DefaultValue = null, ResolvedType = AllTypes.NonNullGuid >>>>>>> Description = "The id of the content (usually GUID)", DefaultValue = null, ResolvedType = AllTypes.NonNullString <<<<<<< Description = "The id of the content (usually GUID)", DefaultValue = string.Empty, ======= Description = "The id of the content (GUID)", DefaultValue = null, >>>>>>> Description = "The id of the content (usually GUID)", DefaultValue = null,
<<<<<<< if (cancel.IsCancellationRequested) return false; await InstallArchives(); if (cancel.IsCancellationRequested) return false; await InstallIncludedFiles(); if (cancel.IsCancellationRequested) return false; await InstallSteamWorkshopItems(); ======= InstallArchives(); InstallIncludedFiles(); InstallManualGameFiles(); InstallSteamWorkshopItems(); >>>>>>> if (cancel.IsCancellationRequested) return false; await InstallArchives(); if (cancel.IsCancellationRequested) return false; await InstallIncludedFiles(); if (cancel.IsCancellationRequested) return false; await InstallManualGameFiles(); if (cancel.IsCancellationRequested) return false; await InstallSteamWorkshopItems(); <<<<<<< private async Task InstallSteamWorkshopItems() ======= private void InstallManualGameFiles() { if (!ModList.Directives.Any(d => d.To.StartsWith(Consts.ManualGameFilesDir))) return; var result = MessageBox.Show("Some mods from this ModList must be installed directly into " + "the game folder. Do you want to do this manually or do you want Wabbajack " + "to do this for you?", "Question", MessageBoxButton.YesNo); if (result != MessageBoxResult.Yes) return; var manualFilesDir = Path.Combine(OutputFolder, Consts.ManualGameFilesDir); var gameFolder = GameInfo.GameLocation(SteamHandler.Instance.Games.Any(g => g.Game == GameInfo.Game)); Info($"Copying files from {manualFilesDir} " + $"to the game folder at {gameFolder}"); if (!Directory.Exists(manualFilesDir)) { Info($"{manualFilesDir} does not exist!"); return; } Directory.EnumerateDirectories(manualFilesDir).PMap(Queue, dir => { var dirInfo = new DirectoryInfo(dir); dirInfo.GetDirectories("*", SearchOption.AllDirectories).Do(d => { var destPath = d.FullName.Replace(dir, gameFolder); Status($"Creating directory {destPath}"); Directory.CreateDirectory(destPath); }); dirInfo.GetFiles("*", SearchOption.AllDirectories).Do(f => { var destPath = f.FullName.Replace(dir, gameFolder); Status($"Copying file {f.FullName} to {destPath}"); try { File.Copy(f.FullName, destPath); } catch (Exception) { Info($"Could not copy file {f.FullName} to {destPath}. The file may already exist, skipping..."); } }); }); } private void InstallSteamWorkshopItems() >>>>>>> private async Task InstallManualGameFiles() { if (!ModList.Directives.Any(d => d.To.StartsWith(Consts.ManualGameFilesDir))) return; var result = MessageBox.Show("Some mods from this ModList must be installed directly into " + "the game folder. Do you want to do this manually or do you want Wabbajack " + "to do this for you?", "Question", MessageBoxButton.YesNo); if (result != MessageBoxResult.Yes) return; var manualFilesDir = Path.Combine(OutputFolder, Consts.ManualGameFilesDir); var gameFolder = GameInfo.GameLocation(SteamHandler.Instance.Games.Any(g => g.Game == GameInfo.Game)); Info($"Copying files from {manualFilesDir} " + $"to the game folder at {gameFolder}"); if (!Directory.Exists(manualFilesDir)) { Info($"{manualFilesDir} does not exist!"); return; } await Directory.EnumerateDirectories(manualFilesDir).PMap(Queue, dir => { var dirInfo = new DirectoryInfo(dir); dirInfo.GetDirectories("*", SearchOption.AllDirectories).Do(d => { var destPath = d.FullName.Replace(dir, gameFolder); Status($"Creating directory {destPath}"); Directory.CreateDirectory(destPath); }); dirInfo.GetFiles("*", SearchOption.AllDirectories).Do(f => { var destPath = f.FullName.Replace(dir, gameFolder); Status($"Copying file {f.FullName} to {destPath}"); try { File.Copy(f.FullName, destPath); } catch (Exception) { Info($"Could not copy file {f.FullName} to {destPath}. The file may already exist, skipping..."); } }); }); } private async Task InstallSteamWorkshopItems()
<<<<<<< [Reactive] public string ModlistLocation { get; set; } ======= public FilePickerVM Location { get; } >>>>>>> public FilePickerVM ModlistLocation { get; } <<<<<<< this.ModlistLocation = source; ======= this.Location = new FilePickerVM() { TargetPath = source, DoExistsCheck = false, PathType = FilePickerVM.PathTypeOptions.File, }; this.DownloadLocation = new FilePickerVM() { DoExistsCheck = false, PathType = FilePickerVM.PathTypeOptions.Folder, }; this.ImagePath = new FilePickerVM() { DoExistsCheck = false, PathType = FilePickerVM.PathTypeOptions.File, Filters = { new CommonFileDialogFilter("Banner image", "*.png") } }; this.ReadMeText = new FilePickerVM() { PathType = FilePickerVM.PathTypeOptions.File, DoExistsCheck = true, }; >>>>>>> this.ModlistLocation = new FilePickerVM() { TargetPath = source, DoExistsCheck = true, PathType = FilePickerVM.PathTypeOptions.File, PromptTitle = "Select Modlist" }; this.DownloadLocation = new FilePickerVM() { DoExistsCheck = true, PathType = FilePickerVM.PathTypeOptions.Folder, PromptTitle = "Select Download Location", }; this.ImagePath = new FilePickerVM() { DoExistsCheck = false, PathType = FilePickerVM.PathTypeOptions.File, Filters = { new CommonFileDialogFilter("Banner image", "*.png") } }; this.ReadMeText = new FilePickerVM() { PathType = FilePickerVM.PathTypeOptions.File, DoExistsCheck = true, }; <<<<<<< this.Description = settings.Description; this.ReadMeText = settings.Readme; this.ImagePath = settings.SplashScreen; ======= this.Summary = settings.Description; this.ReadMeText.TargetPath = settings.Readme; this.ImagePath.TargetPath = settings.SplashScreen; >>>>>>> this.Description = settings.Description; this.ReadMeText.TargetPath = settings.Readme; this.ImagePath.TargetPath = settings.SplashScreen; <<<<<<< this.ModlistLocation = settings.Location; ======= this.Location.TargetPath = settings.Location; >>>>>>> this.ModlistLocation.TargetPath = settings.Location; <<<<<<< settings.Description = this.Description; settings.Readme = this.ReadMeText; settings.SplashScreen = this.ImagePath; ======= settings.Description = this.Summary; settings.Readme = this.ReadMeText.TargetPath; settings.SplashScreen = this.ImagePath.TargetPath; >>>>>>> settings.Description = this.Description; settings.Readme = this.ReadMeText.TargetPath; settings.SplashScreen = this.ImagePath.TargetPath; <<<<<<< settings.Location = this.ModlistLocation; settings.DownloadLocation = this.DownloadLocation; ======= settings.Location = this.Location.TargetPath; settings.DownloadLocation = this.DownloadLocation.TargetPath; >>>>>>> settings.Location = this.ModlistLocation.TargetPath; settings.DownloadLocation = this.DownloadLocation.TargetPath; <<<<<<< ModListAuthor = this.AuthorText, ModListDescription = this.Description, ModListImage = this.ImagePath, ======= ModListAuthor = this.AuthorName, ModListDescription = this.Summary, ModListImage = this.ImagePath.TargetPath, >>>>>>> ModListAuthor = this.AuthorText, ModListDescription = this.Description, ModListImage = this.ImagePath.TargetPath,
<<<<<<< System.Windows.Application.Current.Dispatcher.Invoke(() => ======= if (UseSync) { _appState.dispatcher.Invoke(() => { using (var stream = new HttpClient().GetStreamSync(slide.ImageURL)) stream.CopyTo(ms); }); } else { using (Task<Stream> stream = new HttpClient().GetStreamAsync(slide.ImageURL)) { stream.Wait(); stream.Result.CopyTo(ms); } } ms.Seek(0, SeekOrigin.Begin); _appState.dispatcher.Invoke(() => >>>>>>> if (UseSync) { System.Windows.Application.Current.Dispatcher.Invoke(() => { using (var stream = new HttpClient().GetStreamSync(slide.ImageURL)) stream.CopyTo(ms); }); } else { using (Task<Stream> stream = new HttpClient().GetStreamAsync(slide.ImageURL)) { stream.Wait(); stream.Result.CopyTo(ms); } } ms.Seek(0, SeekOrigin.Begin); System.Windows.Application.Current.Dispatcher.Invoke(() => <<<<<<< ms.Seek(0, SeekOrigin.Begin); System.Windows.Application.Current.Dispatcher.Invoke(() => { var image = new BitmapImage(); image.BeginInit(); image.CacheOption = BitmapCacheOption.OnLoad; image.StreamSource = ms; image.EndInit(); image.Freeze(); slide.Image = image; }); ======= >>>>>>>
<<<<<<< using Cassette.Utilities; #if NET35 using Iesi.Collections.Generic; #endif ======= >>>>>>> #if NET35 using Iesi.Collections.Generic; #endif <<<<<<< class ExternalBundleGenerator : IBundleVisitor { readonly CassetteSettings settings; readonly HashedSet<string> existingUrls; readonly List<Bundle> bundles = new List<Bundle>(); Bundle currentBundle; public ExternalBundleGenerator(IEnumerable<string> existingUrls, CassetteSettings settings) { this.settings = settings; this.existingUrls = new HashedSet<string>(new List<string>(existingUrls)); // TODO: use case-insensitive string comparer? } public IEnumerable<Bundle> ExternalBundles { get { return bundles; } } public void Visit(Bundle bundle) { currentBundle = bundle; foreach (var reference in bundle.References) { if (reference.IsUrl() == false) continue; if (existingUrls.Contains(reference)) continue; existingUrls.Add(reference); bundles.Add(CreateExternalBundle(reference, currentBundle)); } } public void Visit(IAsset asset) { foreach (var assetReference in asset.References) { if (assetReference.Type != AssetReferenceType.Url) continue; if (existingUrls.Contains(assetReference.Path)) continue; existingUrls.Add(assetReference.Path); bundles.Add(CreateExternalBundle(assetReference.Path, currentBundle)); } } Bundle CreateExternalBundle(string url, Bundle referencer) { var bundleFactory = GetBundleFactory(referencer.GetType()); var externalBundle = bundleFactory.CreateExternalBundle(url); externalBundle.Process(settings); return externalBundle; } IBundleFactory<Bundle> GetBundleFactory(Type bundleType) { IBundleFactory<Bundle> factory; if (settings.BundleFactories.TryGetValue(bundleType, out factory)) { return factory; } throw new ArgumentException(string.Format("Cannot find bundle factory for {0}", bundleType.FullName)); } } ======= >>>>>>>
<<<<<<< SetupEnricher(); A.CallTo(() => queryParser.ParseQueryAsync(requestContext, A<Q>._)) ======= A.CallTo(() => queryParser.ParseAsync(requestContext, A<Q>._)) >>>>>>> SetupEnricher(); A.CallTo(() => queryParser.ParseAsync(requestContext, A<Q>._))
<<<<<<< assetUrls.Select(createLink).ToArray() )); if (hasCondition) { html.AppendLine(); html.Append(HtmlConstants.ConditionalCommentEnd); } return html.ToString(); ======= assetUrls.Select(createLink) ); var conditionalRenderer = new ConditionalRenderer(); return conditionalRenderer.Render(bundle.Condition, html => html.Append(content)); >>>>>>> assetUrls.Select(createLink).ToArray() ); var conditionalRenderer = new ConditionalRenderer(); return conditionalRenderer.Render(bundle.Condition, html => html.Append(content));
<<<<<<< using System; using System.Collections.Generic; ======= >>>>>>> using System; using System.Collections.Generic; <<<<<<< public abstract Project UnderlyingProject { get; } public abstract IReadOnlyList<TagHelperDescriptor> TagHelpers { get; } ======= public abstract string FilePath { get; } public abstract bool IsInitialized { get; } public abstract VersionStamp Version { get; } public abstract Project WorkspaceProject { get; } >>>>>>> public abstract string FilePath { get; } public abstract bool IsInitialized { get; } public abstract IReadOnlyList<TagHelperDescriptor> TagHelpers { get; } public abstract VersionStamp Version { get; } public abstract Project WorkspaceProject { get; } public abstract HostProject HostProject { get; }
<<<<<<< var outputKind = SpanKindInternal.Markup; ======= >>>>>>> <<<<<<< outputKind = SpanKindInternal.Code; ======= >>>>>>> <<<<<<< outputKind = SpanKindInternal.Code; ======= >>>>>>> <<<<<<< outputKind = SpanKindInternal.Code; ======= >>>>>>> <<<<<<< Output(outputKind, AcceptedCharactersInternal.NonWhiteSpace); ======= Output(SpanKind.Code, AcceptedCharacters.NonWhiteSpace); >>>>>>> Output(SpanKindInternal.Code, AcceptedCharactersInternal.NonWhiteSpace);
<<<<<<< using System; using System.Collections.Generic; using System.Globalization; using System.Web.UI; using System.Web.UI.HtmlControls; ======= using System.Collections.Generic; >>>>>>> using System.Collections.Generic; using System.Web.UI; using System.Web.UI.HtmlControls; <<<<<<< using Xpand.ExpressApp.Web.Layout; using System.Linq; using Xpand.ExpressApp.Web.Layout; ======= >>>>>>> using System.Linq; using Xpand.ExpressApp.Web.Layout;
<<<<<<< Total = result.Contents.Total, Items = result.Contents.Take(200).Select(item => { var itemModel = SimpleMapper.Map(item, new ContentDto()); if (item.Data != null) { itemModel.Data = item.Data.ToApiModel(result.Schema.SchemaDef, App.LanguagesConfig, !isFrontendClient); } if (item.PendingData != null && isFrontendClient) { itemModel.PendingData = item.PendingData.ToApiModel(result.Schema.SchemaDef, App.LanguagesConfig, !isFrontendClient); } return itemModel; }).ToArray() ======= Total = result.Total, Items = result.Take(200).Select(item => SimpleMapper.Map(item, new ContentDto { Data = item.Data })).ToArray() >>>>>>> Total = result.Total, Items = result.Take(200).Select(item => SimpleMapper.Map(item, new ContentDto { Data = item.Data })).ToArray() <<<<<<< if (entity.Data != null) { response.Data = entity.Data.ToApiModel(schema.SchemaDef, App.LanguagesConfig, !isFrontendClient); } if (entity.PendingData != null && isFrontendClient) { response.PendingData = entity.PendingData.ToApiModel(schema.SchemaDef, App.LanguagesConfig, !isFrontendClient); } } Response.Headers["ETag"] = entity.Version.ToString(); Response.Headers["Surrogate-Key"] = entity.Id.ToString(); ======= Response.Headers["ETag"] = content.Version.ToString(); Response.Headers["Surrogate-Key"] = content.Id.ToString(); >>>>>>> Response.Headers["ETag"] = entity.Version.ToString(); Response.Headers["Surrogate-Key"] = entity.Id.ToString(); <<<<<<< var command = new UpdateContent { ContentId = id, Data = request.ToCleaned(), AsProposal = asProposal }; ======= var command = new UpdateContent { ContentId = id, Data = request.ToCleaned() }; >>>>>>> var command = new UpdateContent { ContentId = id, Data = request.ToCleaned(), AsProposal = asProposal }; <<<<<<< var command = new PatchContent { ContentId = id, Data = request.ToCleaned(), AsProposal = asProposal }; ======= var command = new PatchContent { ContentId = id, Data = request.ToCleaned() }; >>>>>>> var command = new PatchContent { ContentId = id, Data = request.ToCleaned(), AsProposal = asProposal };
<<<<<<< openMEditRegex = true; } if (ImGui.MenuItem("Export CSV (Slow!)", null, false, _selection.paramSelectionExists())) { openMEditCSVExport = true; } if (ImGui.MenuItem("Import CSV", null, false, _selection.paramSelectionExists())) { openMEditCSVImport = true; ======= if (ImGui.MenuItem("Mass Edit", null, false, true)) { openMEditRegex = true; } if (ImGui.MenuItem("Export CSV (Slow!)", null, false, _activeParam != null)) { openMEditCSVExport = true; } if (ImGui.MenuItem("Import CSV", null, false, _activeParam != null)) { openMEditCSVImport = true; } >>>>>>> if (ImGui.MenuItem("Mass Edit", null, false, true)) { openMEditRegex = true; } if (ImGui.MenuItem("Export CSV (Slow!)", null, false, _selection.paramSelectionExists())) { openMEditCSVExport = true; } if (ImGui.MenuItem("Import CSV", null, false, _selection.paramSelectionExists())) { openMEditCSVImport = true; } <<<<<<< Match m = new Regex(MassParamEditRegex.rowfilterRx).Match(_selection.getCurrentSearchString()); if (!m.Success) p = para.Rows; ======= if (FeatureFlags.EnableEnhancedParamEditor) { Match m = new Regex(MassParamEditRegex.rowfilterRx).Match(_currentSearchString); if (!m.Success) { p = para.Rows; } else { p = MassParamEditRegex.GetMatchingParamRows(para, m, true, true); } } >>>>>>> if (FeatureFlags.EnableEnhancedParamEditor) { Match m = new Regex(MassParamEditRegex.rowfilterRx).Match(_selection.getCurrentSearchString()); if (!m.Success) { p = para.Rows; } else { p = MassParamEditRegex.GetMatchingParamRows(para, m, true, true); } }
<<<<<<< using Google.Apis.Util; ======= using Google.Api.Gax; using Google.Api.Gax.Rest; >>>>>>> using Google.Api.Gax; using Google.Apis.Util;
<<<<<<< /// <summary> /// Disposes a lazy-initialized object if the object has already been created. /// </summary> /// <param name="lazy">The lazy initializer containing a disposable object.</param> /// <typeparam name="T">Type of the object that needs to be disposed.</typeparam> public static void DisposeIfCreated<T>(this Lazy<T> lazy) where T : IDisposable { if (lazy.IsValueCreated) { lazy.Value.Dispose(); } } ======= /// <summary> /// Creates a shallow copy of a collection of key-value pairs. /// </summary> public static IReadOnlyDictionary<TKey, TValue> Copy<TKey, TValue>( this IEnumerable<KeyValuePair<TKey, TValue>> source) { var copy = new Dictionary<TKey, TValue>(); foreach (var entry in source) { copy[entry.Key] = entry.Value; } return copy; } >>>>>>> /// <summary> /// Disposes a lazy-initialized object if the object has already been created. /// </summary> /// <param name="lazy">The lazy initializer containing a disposable object.</param> /// <typeparam name="T">Type of the object that needs to be disposed.</typeparam> public static void DisposeIfCreated<T>(this Lazy<T> lazy) where T : IDisposable { if (lazy.IsValueCreated) { lazy.Value.Dispose(); } } /// <summary> /// Creates a shallow copy of a collection of key-value pairs. /// </summary> public static IReadOnlyDictionary<TKey, TValue> Copy<TKey, TValue>( this IEnumerable<KeyValuePair<TKey, TValue>> source) { var copy = new Dictionary<TKey, TValue>(); foreach (var entry in source) { copy[entry.Key] = entry.Value; } return copy; }
<<<<<<< [Fact] public void Query_ForPocoGivenDbColumPocoOverlapSqlStringAndParameters_ShouldReturnValidPocoCollection() { DB.Insert(new PocoOverlapPoco1 { Column1 = "A", Column2 = "B" }); DB.Insert(new PocoOverlapPoco2 { Column1 = "B", Column2 = "A" }); var sql = @"FROM BugInvestigation_10R9LZYK JOIN BugInvestigation_5TN5C4U4 ON BugInvestigation_10R9LZYK.[ColumnA] = BugInvestigation_5TN5C4U4.[Column2]"; var poco1 = DB.Query<PocoOverlapPoco1>(sql).ToList().Single(); sql = @"FROM BugInvestigation_5TN5C4U4 JOIN BugInvestigation_10R9LZYK ON BugInvestigation_10R9LZYK.[ColumnA] = BugInvestigation_5TN5C4U4.[Column2]"; var poco2 = DB.Query<PocoOverlapPoco2>(sql).ToList().Single(); poco1.Column1.ShouldBe("A"); poco1.Column2.ShouldBe("B"); poco2.Column1.ShouldBe("B"); poco2.Column2.ShouldBe("A"); } [ExplicitColumns] [TableName("BugInvestigation_10R9LZYK")] public class PocoOverlapPoco1 { [Column("ColumnA")] public string Column1 { get; set; } [Column] public string Column2 { get; set; } } [ExplicitColumns] [TableName("BugInvestigation_5TN5C4U4")] public class PocoOverlapPoco2 { [Column("ColumnA")] public string Column1 { get; set; } [Column] public string Column2 { get; set; } } ======= [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithSet__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var sql = "SET CONCAT_NULL_YIELDS_NULL ON;" + $"SELECT * FROM [{pd.TableInfo.TableName}] WHERE [{pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName}] = @0"; var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); } [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithDeclare__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var sql = "DECLARE @@v INT;" + "SET @@v = 1;" + $"SELECT * FROM [{pd.TableInfo.TableName}] WHERE [{pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName}] = @0"; var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); } [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithWith__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var columns = string.Join(", ", pd.Columns.Select(c => DB.Provider.EscapeSqlIdentifier(c.Value.ColumnName))); var sql = string.Format(@"WITH [{0}_CTE] ({1}) AS ( SELECT {1} FROM {0} ) SELECT * FROM [{0}_CTE] WHERE [{2}] = @0;", pd.TableInfo.TableName, columns, pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName); var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); } >>>>>>> [Fact] public void Query_ForPocoGivenDbColumPocoOverlapSqlStringAndParameters_ShouldReturnValidPocoCollection() { DB.Insert(new PocoOverlapPoco1 { Column1 = "A", Column2 = "B" }); DB.Insert(new PocoOverlapPoco2 { Column1 = "B", Column2 = "A" }); var sql = @"FROM BugInvestigation_10R9LZYK JOIN BugInvestigation_5TN5C4U4 ON BugInvestigation_10R9LZYK.[ColumnA] = BugInvestigation_5TN5C4U4.[Column2]"; var poco1 = DB.Query<PocoOverlapPoco1>(sql).ToList().Single(); sql = @"FROM BugInvestigation_5TN5C4U4 JOIN BugInvestigation_10R9LZYK ON BugInvestigation_10R9LZYK.[ColumnA] = BugInvestigation_5TN5C4U4.[Column2]"; var poco2 = DB.Query<PocoOverlapPoco2>(sql).ToList().Single(); poco1.Column1.ShouldBe("A"); poco1.Column2.ShouldBe("B"); poco2.Column1.ShouldBe("B"); poco2.Column2.ShouldBe("A"); } [ExplicitColumns] [TableName("BugInvestigation_10R9LZYK")] public class PocoOverlapPoco1 { [Column("ColumnA")] public string Column1 { get; set; } [Column] public string Column2 { get; set; } } [ExplicitColumns] [TableName("BugInvestigation_5TN5C4U4")] public class PocoOverlapPoco2 { [Column("ColumnA")] public string Column1 { get; set; } [Column] public string Column2 { get; set; } } [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithSet__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var sql = "SET CONCAT_NULL_YIELDS_NULL ON;" + $"SELECT * FROM [{pd.TableInfo.TableName}] WHERE [{pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName}] = @0"; var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); } [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithDeclare__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var sql = "DECLARE @@v INT;" + "SET @@v = 1;" + $"SELECT * FROM [{pd.TableInfo.TableName}] WHERE [{pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName}] = @0"; var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); } [Fact] public void Query_ForPocoGivenSqlString_GivenSqlStartingWithWith__ShouldReturnValidPocoCollection() { AddOrders(12); var pd = PocoData.ForType(typeof(Order), DB.DefaultMapper); var columns = string.Join(", ", pd.Columns.Select(c => DB.Provider.EscapeSqlIdentifier(c.Value.ColumnName))); var sql = string.Format(@"WITH [{0}_CTE] ({1}) AS ( SELECT {1} FROM {0} ) SELECT * FROM [{0}_CTE] WHERE [{2}] = @0;", pd.TableInfo.TableName, columns, pd.Columns.Values.First(c => c.PropertyInfo.Name == "Status").ColumnName); var results = DB.Query<Order>(sql, OrderStatus.Pending).ToList(); results.Count.ShouldBe(3); results.ForEach(o => { o.PoNumber.ShouldStartWith("PO"); o.Status.ShouldBeOneOf(Enum.GetValues(typeof(OrderStatus)).Cast<OrderStatus>().ToArray()); o.PersonId.ShouldNotBe(Guid.Empty); o.CreatedOn.ShouldBeLessThanOrEqualTo(new DateTime(1990, 1, 1, 0, 0, 0, DateTimeKind.Utc)); o.CreatedBy.ShouldStartWith("Harry"); }); }
<<<<<<< ======= using System.Collections.Generic; using System.Reflection; using Newtonsoft.Json; using Newtonsoft.Json.Linq; >>>>>>> using System.Reflection; <<<<<<< return objectType == _baseType; ======= return objectType == _baseType || _supportedTypes.ContainsKey(objectType) || ToTypeInfo(_baseType).IsAssignableFrom(ToTypeInfo(objectType)); } public override bool CanWrite { get { if (!_serializeDiscriminatorProperty) return false; if (!_isInsideWrite) return true; if (_allowNextWrite) { _allowNextWrite = false; return true; } _allowNextWrite = true; return false; } } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { JObject jsonObj; _isInsideWrite = true; _allowNextWrite = false; try { jsonObj = JObject.FromObject(value, serializer); } finally { _isInsideWrite = false; } if (!_supportedTypes.TryGetValue(value.GetType(), out var supportedType)) { throw new JsonSerializationException("Impossible to serialize type: " + value.GetType().FullName + " because there is no registered mapping for the discriminator property"); } var typeMappingPropertyValue = JToken.FromObject(supportedType, serializer); if (_addDiscriminatorFirst) { jsonObj.AddFirst(new JProperty(JsonDiscriminatorPropertyName, typeMappingPropertyValue)); } else { jsonObj.Add(JsonDiscriminatorPropertyName, typeMappingPropertyValue); } jsonObj.WriteTo(writer); >>>>>>> return objectType == _baseType || ToTypeInfo(_baseType).IsAssignableFrom(ToTypeInfo(objectType));
<<<<<<< public static readonly IGraphType DomainId = new StringGraphType(); ======= public static readonly IGraphType Long = new LongGraphType(); public static readonly IGraphType Guid = new GuidGraphType(); >>>>>>> public static readonly IGraphType DomainId = new StringGraphType(); public static readonly IGraphType Long = new LongGraphType(); public static readonly IGraphType Guid = new GuidGraphType(); <<<<<<< public static readonly IGraphType NonNullDomainId = new NonNullGraphType(DomainId); ======= public static readonly IGraphType NonNullLong = new NonNullGraphType(Long); public static readonly IGraphType NonNullGuid = new NonNullGraphType(Guid); >>>>>>> public static readonly IGraphType NonNullDomainId = new NonNullGraphType(DomainId); public static readonly IGraphType NonNullLong = new NonNullGraphType(Long); public static readonly IGraphType NonNullGuid = new NonNullGraphType(Guid);
<<<<<<< using Terraria_Server.Collections; ======= using Terraria_Server.Definitions; >>>>>>> using Terraria_Server.Collections; using Terraria_Server.Definitions;
<<<<<<< LoginEvent Event = new LoginEvent(); Event.Socket = Netplay.serverSock[i]; Event.Sender = Main.player[i]; ======= PlayerLoginEvent Event = new PlayerLoginEvent(); Event.setSocket(Netplay.serverSock[i]); Event.setSender(Main.player[i]); >>>>>>> PlayerLoginEvent Event = new PlayerLoginEvent(); Event.Socket = Netplay.serverSock[i]; Event.Sender = Main.player[i]; <<<<<<< LogoutEvent Event = new LogoutEvent(); Event.Socket = Netplay.serverSock[i]; Event.Sender = Main.player[i]; ======= PlayerLogoutEvent Event = new PlayerLogoutEvent(); Event.setSocket(Netplay.serverSock[i]); Event.setSender(Main.player[i]); >>>>>>> PlayerLogoutEvent Event = new PlayerLogoutEvent(); Event.Socket = Netplay.serverSock[i]; Event.Sender = Main.player[i];
<<<<<<< private void ShowDamage(double damage, float hitDirection, int goreStart, double lifeModifier = 100d, int type = 5, int alpha = 0, Color color = default(Color)) { if (this.life > 0) { for (int i = 0; (double)i < (damage / (double)this.lifeMax * lifeModifier); i++) { Dust.NewDust(new Vector2(Position.X, Position.Y), width, height, 5, hitDirection, -1f, alpha, default(Color), 1f); } return; } for (int num43 = 0; num43 < 50; num43++) { float speedX = 2.5f * (float)hitDirection; Dust.NewDust(new Vector2(Position.X, Position.Y), width, height, type, speedX, -2.5f, 0, default(Color), 1f); } SetGore(goreStart++); Gore.NewGore(new Vector2(this.Position.X, this.Position.Y + 20f), this.Velocity, goreStart); Gore.NewGore(new Vector2(this.Position.X, this.Position.Y + 20f), this.Velocity, goreStart++); Gore.NewGore(new Vector2(this.Position.X, this.Position.Y + 34f), this.Velocity, goreStart); Gore.NewGore(new Vector2(this.Position.X, this.Position.Y + 34f), this.Velocity, goreStart); } public override object Clone() ======= public object Clone() >>>>>>> public override object Clone()
<<<<<<< using Terraria_Server.Collections; ======= using Terraria_Server.Definitions; >>>>>>> using Terraria_Server.Collections; using Terraria_Server.Definitions; <<<<<<< public int Release; public float Scale; public int Shoot; ======= public ProjectileType Shoot; >>>>>>> public int Release; public float Scale; public ProjectileType Shoot; <<<<<<< public bool Social; public int SpawnTime; public int Stack; public int TileBoost; public String ToolTip; public int Type { get; set; } public int UseAmmo; public int UseAnimation; public int UseSound; public int UseStyle; public int UseTime; public bool UseTurn; ======= public ProjectileType Ammo; public ProjectileType UseAmmo; public int LifeRegen; public int ManaRegen; public int Mana; public bool NoUseGraphic; public bool NoMelee; public int Release; >>>>>>> public int SpawnTime; public int Stack; public int TileBoost; public String ToolTip; public int Type { get; set; } public ProjectileType UseAmmo; public int UseAnimation; public int UseSound; public int UseStyle; public int UseTime; public bool UseTurn; <<<<<<< if (Main.netMode == 2 && !noBroadcast) ======= Main.item[num].Stack = Stack; if (!noBroadcast) >>>>>>> if (!noBroadcast)