conflict_resolution
stringlengths
27
16k
<<<<<<< ======= doc.Root.SetAttributeValue("TraitorsEnabled", TraitorsEnabled.ToString()); doc.Root.SetAttributeValue("MaxFileTransferDuration", FileStreamSender.MaxTransferDuration.TotalSeconds); if (GameMain.NetLobbyScreen != null && GameMain.NetLobbyScreen.ServerMessage != null) { doc.Root.SetAttributeValue("ServerMessage", GameMain.NetLobbyScreen.ServerMessage.Text); } >>>>>>> doc.Root.SetAttributeValue("TraitorsEnabled", TraitorsEnabled.ToString()); if (GameMain.NetLobbyScreen != null && GameMain.NetLobbyScreen.ServerMessage != null) { doc.Root.SetAttributeValue("ServerMessage", GameMain.NetLobbyScreen.ServerMessage); } <<<<<<< ======= FileStreamSender.MaxTransferDuration = new TimeSpan(0,0,ToolBox.GetAttributeInt(doc.Root, "MaxFileTransferDuration", 150)); if (GameMain.NetLobbyScreen != null && GameMain.NetLobbyScreen.ServerMessage != null) { GameMain.NetLobbyScreen.ServerMessage.Text = ToolBox.GetAttributeString(doc.Root, "ServerMessage", ""); } >>>>>>> if (GameMain.NetLobbyScreen != null && GameMain.NetLobbyScreen.ServerMessage != null) { GameMain.NetLobbyScreen.ServerMessage.Text = ToolBox.GetAttributeString(doc.Root, "ServerMessage", ""); }
<<<<<<< ======= //public static Action<LoginCancelledEvent> OnLoginCancelled = delegate {}; >>>>>>> //public static Action<LoginCancelledEvent> OnLoginCancelled = delegate {}; <<<<<<< public static Action<Provider> OnLogoutFinished = delegate {}; ======= //public static Action<LogoutFailedEvent> OnLogoutFailed = delegate {}; public static Action<Provider> OnLogoutFinished = delegate {}; //public static Action<LogoutFinishedEvent> OnLogoutFinished = delegate {}; >>>>>>> //public static Action<LogoutFailedEvent> OnLogoutFailed = delegate {}; public static Action<Provider> OnLogoutFinished = delegate {}; //public static Action<LogoutFinishedEvent> OnLogoutFinished = delegate {}; <<<<<<< ======= //public static Action<GetContactsFailedEvent> OnGetContactsFailed = delegate {}; >>>>>>> //public static Action<GetContactsFailedEvent> OnGetContactsFailed = delegate {}; <<<<<<< ======= //public static Action<GetContactsFinishedEvent> OnGetContactsFinished = delegate {}; >>>>>>> //public static Action<GetContactsFinishedEvent> OnGetContactsFinished = delegate {}; <<<<<<< ======= //public static Action<GetFeedFailedEvent> OnGetFeedFailed = delegate {}; >>>>>>> //public static Action<GetFeedFailedEvent> OnGetFeedFailed = delegate {}; <<<<<<< ======= //public static Action<GetFeedFinishedEvent> OnGetFeedFinished = delegate {}; >>>>>>> //public static Action<GetFeedFinishedEvent> OnGetFeedFinished = delegate {}; <<<<<<< protected virtual void _pushEventGetLeaderboardsStarted(Provider provider, string payload) {} protected virtual void _pushEventGetLeaderboardsFinished(Provider provider, SocialPageData<Leaderboard> leaderboards, string payload) {} protected virtual void _pushEventGetLeaderboardsFailed(Provider provider, string message, string payload) {} protected virtual void _pushEventGetScoresStarted(Provider provider, Leaderboard from, bool fromStart, string payload) {} protected virtual void _pushEventGetScoresFinished(Provider provider, Leaderboard from, SocialPageData<Score> scores, string payload) {} protected virtual void _pushEventGetScoresFailed(Provider provider, Leaderboard from, string message, bool fromStart, string payload) {} protected virtual void _pushEventReportScoreStarted(Provider provider, Leaderboard owner, string payload) {} protected virtual void _pushEventReportScoreFinished(Provider provider, Leaderboard owner, Score score, string payload) {} protected virtual void _pushEventReportScoreFailed(Provider provider, Leaderboard owner, string message, string payload) {} ======= >>>>>>> protected virtual void _pushEventGetLeaderboardsStarted(Provider provider, string payload) {} protected virtual void _pushEventGetLeaderboardsFinished(Provider provider, SocialPageData<Leaderboard> leaderboards, string payload) {} protected virtual void _pushEventGetLeaderboardsFailed(Provider provider, string message, string payload) {} protected virtual void _pushEventGetScoresStarted(Provider provider, Leaderboard from, bool fromStart, string payload) {} protected virtual void _pushEventGetScoresFinished(Provider provider, Leaderboard from, SocialPageData<Score> scores, string payload) {} protected virtual void _pushEventGetScoresFailed(Provider provider, Leaderboard from, string message, bool fromStart, string payload) {} protected virtual void _pushEventReportScoreStarted(Provider provider, Leaderboard owner, string payload) {} protected virtual void _pushEventReportScoreFinished(Provider provider, Leaderboard owner, Score score, string payload) {} protected virtual void _pushEventReportScoreFailed(Provider provider, Leaderboard owner, string message, string payload) {}
<<<<<<< public void GetMemPoolEntryThrows() { using (var builder = NodeBuilderEx.Create()) { var node = builder.CreateNode(); var rpc = node.CreateRPCClient(); builder.StartAll(); Assert.Throws<RPCException>(() => rpc.GetMempoolEntry(uint256.One, throwIfNotFound: true)); } } [Fact] public void GetMemPoolEntryDoesntThrow() { using (var builder = NodeBuilderEx.Create()) { var node = builder.CreateNode(); var rpc = node.CreateRPCClient(); builder.StartAll(); var mempoolEntry = rpc.GetMempoolEntry(uint256.One, throwIfNotFound: false); Assert.Null(mempoolEntry); } } [Fact] ======= public void DoubleSpendThrows() { using (var builder = NodeBuilderEx.Create()) { var node = builder.CreateNode(); var rpc = node.CreateRPCClient(); builder.StartAll(); var network = node.Network; var key = new Key(); var blockId = rpc.GenerateToAddress(1, key.PubKey.WitHash.GetAddress(network)); var block = rpc.GetBlock(blockId[0]); var coinBaseTx = block.Transactions[0]; var tx = Transaction.Create(network); tx.Inputs.Add(coinBaseTx, 0); tx.Outputs.Add(Money.Coins(49.9999m), new Key().PubKey.WitHash.GetAddress(network)); tx.Sign(key.GetBitcoinSecret(network), coinBaseTx.Outputs.AsCoins().First()); var valid = tx.Check(); var doubleSpend = Transaction.Create(network); doubleSpend.Inputs.Add(coinBaseTx, 0); doubleSpend.Outputs.Add(Money.Coins(49.998m), new Key().PubKey.WitHash.GetAddress(network)); doubleSpend.Sign(key.GetBitcoinSecret(network), coinBaseTx.Outputs.AsCoins().First()); valid = doubleSpend.Check(); rpc.Generate(101); var txId = rpc.SendRawTransaction(tx); Assert.Throws<RPCException>(() => rpc.SendRawTransaction(doubleSpend)); } } [Fact] >>>>>>> public void GetMemPoolEntryThrows() { using (var builder = NodeBuilderEx.Create()) { var node = builder.CreateNode(); var rpc = node.CreateRPCClient(); builder.StartAll(); Assert.Throws<RPCException>(() => rpc.GetMempoolEntry(uint256.One, throwIfNotFound: true)); } } [Fact] public void DoubleSpendThrows() { using (var builder = NodeBuilderEx.Create()) { var node = builder.CreateNode(); var rpc = node.CreateRPCClient(); builder.StartAll(); var network = node.Network; var key = new Key(); var blockId = rpc.GenerateToAddress(1, key.PubKey.WitHash.GetAddress(network)); var block = rpc.GetBlock(blockId[0]); var coinBaseTx = block.Transactions[0]; var tx = Transaction.Create(network); tx.Inputs.Add(coinBaseTx, 0); tx.Outputs.Add(Money.Coins(49.9999m), new Key().PubKey.WitHash.GetAddress(network)); tx.Sign(key.GetBitcoinSecret(network), coinBaseTx.Outputs.AsCoins().First()); var valid = tx.Check(); var doubleSpend = Transaction.Create(network); doubleSpend.Inputs.Add(coinBaseTx, 0); doubleSpend.Outputs.Add(Money.Coins(49.998m), new Key().PubKey.WitHash.GetAddress(network)); doubleSpend.Sign(key.GetBitcoinSecret(network), coinBaseTx.Outputs.AsCoins().First()); valid = doubleSpend.Check(); rpc.Generate(101); var txId = rpc.SendRawTransaction(tx); Assert.Throws<RPCException>(() => rpc.SendRawTransaction(doubleSpend)); } } [Fact]
<<<<<<< [TestMethod] public void TestTerm1Parser() { BuildMLParser(); var r = Term1.Parse("fred"); Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.GetType().Name.Contains("VarTerm")); } [TestMethod] public void TestLetTermParser() { BuildMLParser(); var r = Term.Parse("let fred=1"); if (r.IsFaulted) { throw new Exception(r.Errors.First().Message); } Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.GetType().Name.Contains("LetTerm")); } [TestMethod] ======= [Test] >>>>>>> [Test] public void TestTerm1Parser() { BuildMLParser(); var r = Term1.Parse("fred"); Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.GetType().Name.Contains("VarTerm")); } [Test] public void TestLetTermParser() { BuildMLParser(); var r = Term.Parse("let fred=1"); if (r.IsFaulted) { throw new Exception(r.Errors.First().Message); } Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.GetType().Name.Contains("LetTerm")); } [Test] <<<<<<< [TestMethod] public void TestInIdParser() { BuildMLParser(); var r = InId.Parse("in"); Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.AsString() == "in"); } [TestMethod] ======= [Test] >>>>>>> [Test] public void TestInIdParser() { BuildMLParser(); var r = InId.Parse("in"); Assert.IsTrue(!r.IsFaulted); Assert.IsTrue(r.Value.First().Item1.AsString() == "in"); } [Test]
<<<<<<< public virtual IList<WidgetCategory> Categories { get; set; } ======= public const string CategorizableItemKeyForWidgets = "Widgets"; public virtual Category Category { get; set; } >>>>>>> public virtual IList<WidgetCategory> Categories { get; set; } public const string CategorizableItemKeyForWidgets = "Widgets";
<<<<<<< // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. using Microsoft.Azure.Mobile.Unity.Analytics; ======= using System.Collections; >>>>>>> // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. using System.Collections;
<<<<<<< using Autofac; ======= using BetterCms.Api; >>>>>>> using Autofac; using BetterCms.Api; <<<<<<< using BetterCms.Core.Modules.Registration; ======= using BetterCms.Core.Exceptions; using BetterCms.Core.Modules.Projections; using BetterCms.Module.Root.Projections; using Common.Logging; >>>>>>> using BetterCms.Core.Modules.Registration; using BetterCms.Core.Modules.Projections; using Common.Logging; <<<<<<< public const string UserRolesKey = "UserRoles"; ======= private static readonly ILog Log = LogManager.GetCurrentClassLogger(); >>>>>>> public const string UserRolesKey = "UserRoles"; private static readonly ILog Log = LogManager.GetCurrentClassLogger(); <<<<<<< var container = ContextScopeProvider.CreateChildContainer(); var modulesRegistration = container.Resolve<IModulesRegistration>(); var userRoles = new List<string> { "User", "Admin" }; var roles = modulesRegistration.GetUserAccessRoles().Select(m => m.Name).ToList(); userRoles.AddRange(roles); Application[UserRolesKey] = userRoles; cmsHost.OnApplicationStart(this); ======= cmsHost.OnApplicationStart(this); AddPageEvents(); AddRedirectEvents(); AddTagEvents(); AddCategoryEvents(); AddWidgetEvents(); AddBlogPostEvents(); AddBlogAuthorEvents(); AddMediaManagerEvents(); } private void AddMediaManagerEvents() { MediaManagerApiContext.Events.MediaFileUploaded += args => { Log.Info("MediaFileUploaded:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFileUpdated += args => { Log.Info("MediaFileUpdated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFileDeleted += args => { Log.Info("MediaFileDeleted:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderCreated += args => { Log.Info("MediaFolderCreated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderUpdated += args => { Log.Info("MediaFolderUpdated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderDeleted += args => { Log.Info("MediaFolderDeleted:" + args.Item.ToString()); }; } private void AddBlogPostEvents() { BlogsApiContext.Events.BlogCreated += args => { Log.Info("BlogCreated:" + args.Item.ToString()); }; BlogsApiContext.Events.BlogUpdated += args => { Log.Info("BlogUpdated:" + args.Item.ToString()); }; BlogsApiContext.Events.BlogDeleted += args => { Log.Info("BlogDeleted:" + args.Item.ToString()); }; } private void AddBlogAuthorEvents() { BlogsApiContext.Events.AuthorCreated += args => { Log.Info("AuthorCreated:" + args.Item.ToString()); }; BlogsApiContext.Events.AuthorUpdated += args => { Log.Info("AuthorUpdated:" + args.Item.ToString()); }; BlogsApiContext.Events.AuthorDeleted += args => { Log.Info("AuthorDeleted:" + args.Item.ToString()); }; } private void AddWidgetEvents() { PagesApiContext.Events.WidgetCreated += args => { Log.Info("WidgetCreated:" + args.Item.ToString()); }; PagesApiContext.Events.WidgetUpdated += args => { Log.Info("WidgetUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.WidgetDeleted += args => { Log.Info("WidgetDeleted:" + args.Item.ToString()); }; } private void AddCategoryEvents() { PagesApiContext.Events.CategoryCreated += args => { Log.Info("CategoryCreated:" + args.Item.ToString()); }; PagesApiContext.Events.CategoryUpdated += args => { Log.Info("CategoryUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.CategoryDeleted += args => { Log.Info("CategoryDeleted:" + args.Item.ToString()); }; } private void AddTagEvents() { PagesApiContext.Events.TagCreated += args => { Log.Info("TagCreated:" + args.Item.ToString()); }; PagesApiContext.Events.TagUpdated += args => { Log.Info("TagUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.TagDeleted += args => { Log.Info("TagDeleted:" + args.Item.ToString()); }; } private void AddRedirectEvents() { PagesApiContext.Events.RedirectCreated += args => { Log.Info("RedirectCreated:" + args.Item.ToString()); }; PagesApiContext.Events.RedirectUpdated += args => { Log.Info("RedirectUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.RedirectDeleted += args => { Log.Info("RedirectDeleted:" + args.Item.ToString()); }; } private void AddPageEvents() { RootApiContext.Events.PageRendering += Events_PageRendering; PagesApiContext.Events.PageCreated += args => { Log.Info("PageCreated: " + args.Item.ToString()); }; PagesApiContext.Events.PageCloned += args => { Log.Info("PageCloned: " + args.Item.ToString()); }; PagesApiContext.Events.PageDeleted += args => { Log.Info("PageDeleted: " + args.Item.ToString()); }; PagesApiContext.Events.PageContentInserted += args => { Log.Info("PageContentInserted: " + args.Item.ToString()); }; PagesApiContext.Events.PagePropertiesChanged += args => { Log.Info("PagePropertiesChanged: " + args.Item.ToString()); }; PagesApiContext.Events.PagePublishStatusChanged += args => { Log.Info("PagePublishStatusChanged: " + args.Item.ToString()); }; PagesApiContext.Events.PageSeoStatusChanged += args => { Log.Info("PageSeoStatusChanged: " + args.Item.ToString()); }; } void Events_PageRendering(Module.Root.Api.Events.PageRenderingEventArgs args) { args.RenderPageData.Metadata.Add(new MetaDataProjection("test-metadata", "hello world!")); >>>>>>> var container = ContextScopeProvider.CreateChildContainer(); var modulesRegistration = container.Resolve<IModulesRegistration>(); var userRoles = new List<string> { "User", "Admin" }; var roles = modulesRegistration.GetUserAccessRoles().Select(m => m.Name).ToList(); userRoles.AddRange(roles); Application[UserRolesKey] = userRoles; cmsHost.OnApplicationStart(this); AddPageEvents(); AddRedirectEvents(); AddTagEvents(); AddCategoryEvents(); AddWidgetEvents(); AddBlogPostEvents(); AddBlogAuthorEvents(); AddMediaManagerEvents(); } private void AddMediaManagerEvents() { MediaManagerApiContext.Events.MediaFileUploaded += args => { Log.Info("MediaFileUploaded:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFileUpdated += args => { Log.Info("MediaFileUpdated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFileDeleted += args => { Log.Info("MediaFileDeleted:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderCreated += args => { Log.Info("MediaFolderCreated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderUpdated += args => { Log.Info("MediaFolderUpdated:" + args.Item.ToString()); }; MediaManagerApiContext.Events.MediaFolderDeleted += args => { Log.Info("MediaFolderDeleted:" + args.Item.ToString()); }; } private void AddBlogPostEvents() { BlogsApiContext.Events.BlogCreated += args => { Log.Info("BlogCreated:" + args.Item.ToString()); }; BlogsApiContext.Events.BlogUpdated += args => { Log.Info("BlogUpdated:" + args.Item.ToString()); }; BlogsApiContext.Events.BlogDeleted += args => { Log.Info("BlogDeleted:" + args.Item.ToString()); }; } private void AddBlogAuthorEvents() { BlogsApiContext.Events.AuthorCreated += args => { Log.Info("AuthorCreated:" + args.Item.ToString()); }; BlogsApiContext.Events.AuthorUpdated += args => { Log.Info("AuthorUpdated:" + args.Item.ToString()); }; BlogsApiContext.Events.AuthorDeleted += args => { Log.Info("AuthorDeleted:" + args.Item.ToString()); }; } private void AddWidgetEvents() { PagesApiContext.Events.WidgetCreated += args => { Log.Info("WidgetCreated:" + args.Item.ToString()); }; PagesApiContext.Events.WidgetUpdated += args => { Log.Info("WidgetUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.WidgetDeleted += args => { Log.Info("WidgetDeleted:" + args.Item.ToString()); }; } private void AddCategoryEvents() { PagesApiContext.Events.CategoryCreated += args => { Log.Info("CategoryCreated:" + args.Item.ToString()); }; PagesApiContext.Events.CategoryUpdated += args => { Log.Info("CategoryUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.CategoryDeleted += args => { Log.Info("CategoryDeleted:" + args.Item.ToString()); }; } private void AddTagEvents() { PagesApiContext.Events.TagCreated += args => { Log.Info("TagCreated:" + args.Item.ToString()); }; PagesApiContext.Events.TagUpdated += args => { Log.Info("TagUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.TagDeleted += args => { Log.Info("TagDeleted:" + args.Item.ToString()); }; } private void AddRedirectEvents() { PagesApiContext.Events.RedirectCreated += args => { Log.Info("RedirectCreated:" + args.Item.ToString()); }; PagesApiContext.Events.RedirectUpdated += args => { Log.Info("RedirectUpdated:" + args.Item.ToString()); }; PagesApiContext.Events.RedirectDeleted += args => { Log.Info("RedirectDeleted:" + args.Item.ToString()); }; } private void AddPageEvents() { RootApiContext.Events.PageRendering += Events_PageRendering; PagesApiContext.Events.PageCreated += args => { Log.Info("PageCreated: " + args.Item.ToString()); }; PagesApiContext.Events.PageCloned += args => { Log.Info("PageCloned: " + args.Item.ToString()); }; PagesApiContext.Events.PageDeleted += args => { Log.Info("PageDeleted: " + args.Item.ToString()); }; PagesApiContext.Events.PageContentInserted += args => { Log.Info("PageContentInserted: " + args.Item.ToString()); }; PagesApiContext.Events.PagePropertiesChanged += args => { Log.Info("PagePropertiesChanged: " + args.Item.ToString()); }; PagesApiContext.Events.PagePublishStatusChanged += args => { Log.Info("PagePublishStatusChanged: " + args.Item.ToString()); }; PagesApiContext.Events.PageSeoStatusChanged += args => { Log.Info("PageSeoStatusChanged: " + args.Item.ToString()); }; } void Events_PageRendering(Module.Root.Api.Events.PageRenderingEventArgs args) { args.RenderPageData.Metadata.Add(new MetaDataProjection("test-metadata", "hello world!"));
<<<<<<< using System.Collections.Generic; using System.Linq; using BetterCms.Module.MediaManager.Models; ======= using BetterCms.Core.Mvc.Commands; using BetterCms.Module.MediaManager.Services; >>>>>>> using BetterCms.Module.MediaManager.Services;
<<<<<<< // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. ======= using System.Collections; >>>>>>> // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. using System.Collections;
<<<<<<< /// Looks up a localized string similar to Create redirects. /// </summary> public static string ImportBlogPosts_CreateRedirects_Title { get { return ResourceManager.GetString("ImportBlogPosts_CreateRedirects_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import blog posts. /// </summary> public static string ImportBlogPosts_Dialog_Title { get { return ResourceManager.GetString("ImportBlogPosts_Dialog_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Upload XML file from computer. /// </summary> public static string ImportBlogPosts_File_ButtonTitle { get { return ResourceManager.GetString("ImportBlogPosts_File_ButtonTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to File to be imported in blog ML format. /// </summary> public static string ImportBlogPosts_File_Description { get { return ResourceManager.GetString("ImportBlogPosts_File_Description", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import. /// </summary> public static string ImportBlogPosts_ImportButton_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportButton_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Created. /// </summary> public static string ImportBlogPosts_ImportResults_Created_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Created_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Failed. /// </summary> public static string ImportBlogPosts_ImportResults_Failed_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Failed_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Total. /// </summary> public static string ImportBlogPosts_ImportResults_Total_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Total_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please select a file!. /// </summary> public static string ImportBlogPosts_PleaseSelectAFile_message { get { return ResourceManager.GetString("ImportBlogPosts_PleaseSelectAFile_message", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Use Original URLs . /// </summary> public static string ImportBlogPosts_UseOriginalUrls_Title { get { return ResourceManager.GetString("ImportBlogPosts_UseOriginalUrls_Title", resourceCulture); } } /// <summary> ======= /// Looks up a localized string similar to Cannot save blog post. Master page, which is selected as default blog post layout is inaccessible.. /// </summary> public static string SaveBlogPost_FailedToSave_InaccessibleMasterPage { get { return ResourceManager.GetString("SaveBlogPost_FailedToSave_InaccessibleMasterPage", resourceCulture); } } /// <summary> >>>>>>> /// Looks up a localized string similar to Create redirects. /// </summary> public static string ImportBlogPosts_CreateRedirects_Title { get { return ResourceManager.GetString("ImportBlogPosts_CreateRedirects_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import blog posts. /// </summary> public static string ImportBlogPosts_Dialog_Title { get { return ResourceManager.GetString("ImportBlogPosts_Dialog_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Upload XML file from computer. /// </summary> public static string ImportBlogPosts_File_ButtonTitle { get { return ResourceManager.GetString("ImportBlogPosts_File_ButtonTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to File to be imported in blog ML format. /// </summary> public static string ImportBlogPosts_File_Description { get { return ResourceManager.GetString("ImportBlogPosts_File_Description", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Import. /// </summary> public static string ImportBlogPosts_ImportButton_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportButton_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Created. /// </summary> public static string ImportBlogPosts_ImportResults_Created_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Created_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Failed. /// </summary> public static string ImportBlogPosts_ImportResults_Failed_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Failed_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Total. /// </summary> public static string ImportBlogPosts_ImportResults_Total_Title { get { return ResourceManager.GetString("ImportBlogPosts_ImportResults_Total_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Please select a file!. /// </summary> public static string ImportBlogPosts_PleaseSelectAFile_message { get { return ResourceManager.GetString("ImportBlogPosts_PleaseSelectAFile_message", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Use Original URLs . /// </summary> public static string ImportBlogPosts_UseOriginalUrls_Title { get { return ResourceManager.GetString("ImportBlogPosts_UseOriginalUrls_Title", resourceCulture); } } /// <summary> /// Looks up a localized string similar to Cannot save blog post. Master page, which is selected as default blog post layout is inaccessible.. /// </summary> public static string SaveBlogPost_FailedToSave_InaccessibleMasterPage { get { return ResourceManager.GetString("SaveBlogPost_FailedToSave_InaccessibleMasterPage", resourceCulture); } } /// <summary>
<<<<<<< ======= using BetterCms.Core.DataAccess; using BetterCms.Core.Mvc.Commands; using BetterCms.Module.Root.Accessors; >>>>>>> using BetterCms.Module.Root.Accessors; <<<<<<< using BetterModules.Core.Web.Mvc.Commands; ======= using NHibernate; >>>>>>> using BetterModules.Core.DataAccess; using BetterModules.Core.Web.Mvc.Commands; using NHibernate;
<<<<<<< public virtual IList<MediaTag> MediaTags { get; set; } ======= public virtual MediaImage Image { get; set; } >>>>>>> public virtual IList<MediaTag> MediaTags { get; set; } public virtual MediaImage Image { get; set; }
<<<<<<< WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(); transmissionTarget.IsEnabledAsync().ContinueWith(task => { TransmissionEnabled.isOn = task.Result; }); ======= WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); transmissionTarget.IsEnabledAsync().ContinueWith(task => { TransmissionEnabled.isOn = task.Result; }); >>>>>>> WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); transmissionTarget.IsEnabledAsync().ContinueWith(task => { TransmissionEnabled.isOn = task.Result; }); <<<<<<< private IEnumerator SetTransmissionEnabledCoroutine(bool enabled) { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(); yield return transmissionTarget.SetEnabledAsync(enabled); var isEnabled = transmissionTarget.IsEnabledAsync(); yield return isEnabled; TransmissionEnabled.isOn = isEnabled.Result; } ======= private IEnumerator SetTransmissionEnabledCoroutine(bool enabled) { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); yield return transmissionTarget.SetEnabledAsync(enabled); var isEnabled = transmissionTarget.IsEnabledAsync(); yield return isEnabled; TransmissionEnabled.isOn = isEnabled.Result; } >>>>>>> private IEnumerator SetTransmissionEnabledCoroutine(bool enabled) { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); yield return transmissionTarget.SetEnabledAsync(enabled); var isEnabled = transmissionTarget.IsEnabledAsync(); yield return isEnabled; TransmissionEnabled.isOn = isEnabled.Result; } <<<<<<< public void TrackEventTransmission() { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(); Dictionary<string, string> properties = GetProperties(); if (properties == null) { transmissionTarget.TrackEvent(EventName.text); } else { transmissionTarget.TrackEventWithProperties(EventName.text, GetProperties()); } } public void TrackEventChildTransmission() { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(); WrapperTransmissionTarget childTransmissionTarget = transmissionTarget.GetTransmissionTarget(); Dictionary<string, string> properties = GetProperties(); if (properties == null) { childTransmissionTarget.TrackEvent(EventName.text); } else { childTransmissionTarget.TrackEventWithProperties(EventName.text, GetProperties()); } } ======= public void TrackEventTransmission() { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); Dictionary<string, string> properties = GetProperties(); if (properties == null) { transmissionTarget.TrackEvent(EventName.text); } else { transmissionTarget.TrackEventWithProperties(EventName.text, properties); } } >>>>>>> public void TrackEventChildTransmission() { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(); WrapperTransmissionTarget childTransmissionTarget = transmissionTarget.GetTransmissionTarget(); Dictionary<string, string> properties = GetProperties(); if (properties == null) { childTransmissionTarget.TrackEvent(EventName.text); } else { childTransmissionTarget.TrackEventWithProperties(EventName.text, GetProperties()); } } public void TrackEventTransmission() { WrapperTransmissionTarget transmissionTarget = Analytics.GetTransmissionTarget(ResolveToken()); Dictionary<string, string> properties = GetProperties(); if (properties == null) { transmissionTarget.TrackEvent(EventName.text); } else { transmissionTarget.TrackEventWithProperties(EventName.text, properties); } }
<<<<<<< // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. using Microsoft.Azure.Mobile.Unity; ======= using System.Collections; using Microsoft.Azure.Mobile.Unity; >>>>>>> // Copyright (c) Microsoft Corporation. All rights reserved. // // Licensed under the MIT license. using System.Collections; using Microsoft.Azure.Mobile.Unity;
<<<<<<< private static string MobileCenterResourcesFolderPath = "Assets/Plugins/Android/mobile-center/res/values/"; private static string MobileCenterResourcesPath = MobileCenterResourcesFolderPath + "mobile-center-settings.xml"; private static string MobileCenterManifestPath = "Assets/Plugins/Android/mobile-center/AndroidManifest.xml"; private static string MobileCenterManifestPlaceholderPath = "Assets/MobileCenter/Plugins/Android/AndroidManifestPlaceholder.xml"; private static readonly string ManifestAppIdPlaceholder = "${mobile-center-app-id-placeholder}"; private static readonly string AppSecretKey = "mobile_center_app_secret"; private static readonly string CustomLogUrlKey = "mobile_center_custom_log_url"; private static readonly string UseCustomLogUrlKey = "mobile_center_use_custom_log_url"; private static readonly string InitialLogLevelKey = "mobile_center_initial_log_level"; private static readonly string UsePushKey = "mobile_center_use_push"; private static readonly string UseAnalyticsKey = "mobile_center_use_analytics"; private static readonly string UseDistributeKey = "mobile_center_use_distribute"; private static readonly string CustomApiUrlKey = "mobile_center_custom_api_url"; private static readonly string UseCustomApiUrlKey = "mobile_center_use_custom_api_url"; private static readonly string CustomInstallUrlKey = "mobile_center_custom_install_url"; private static readonly string UseCustomInstallUrlKey = "mobile_center_use_custom_install_url"; ======= private const string MobileCenterResourcesFolderPath = "Assets/Plugins/Android/mobile-center/res/values/"; private const string MobileCenterResourcesPath = MobileCenterResourcesFolderPath + "mobile-center-settings.xml"; private const string MobileCenterManifestPath = "Assets/Plugins/Android/mobile-center/AndroidManifest.xml"; private const string ManifestAppIdPlaceholder = "${mobile-center-app-id-placeholder}"; private const string AppSecretKey = "mobile_center_app_secret"; private const string CustomLogUrlKey = "mobile_center_custom_log_url"; private const string UseCustomLogUrlKey = "mobile_center_use_custom_log_url"; private const string InitialLogLevelKey = "mobile_center_initial_log_level"; private const string UsePushKey = "mobile_center_use_push"; private const string UseAnalyticsKey = "mobile_center_use_analytics"; private const string UseDistributeKey = "mobile_center_use_distribute"; private const string CustomApiUrlKey = "mobile_center_custom_api_url"; private const string UseCustomApiUrlKey = "mobile_center_use_custom_api_url"; private const string CustomInstallUrlKey = "mobile_center_custom_install_url"; private const string UseCustomInstallUrlKey = "mobile_center_use_custom_install_url"; >>>>>>> private const string MobileCenterResourcesFolderPath = "Assets/Plugins/Android/mobile-center/res/values/"; private const string MobileCenterResourcesPath = MobileCenterResourcesFolderPath + "mobile-center-settings.xml"; private const string MobileCenterManifestPath = "Assets/Plugins/Android/mobile-center/AndroidManifest.xml"; private const string MobileCenterManifestPlaceholderPath = "Assets/MobileCenter/Plugins/Android/AndroidManifestPlaceholder.xml"; private const string ManifestAppIdPlaceholder = "${mobile-center-app-id-placeholder}"; private const string AppSecretKey = "mobile_center_app_secret"; private const string CustomLogUrlKey = "mobile_center_custom_log_url"; private const string UseCustomLogUrlKey = "mobile_center_use_custom_log_url"; private const string InitialLogLevelKey = "mobile_center_initial_log_level"; private const string UsePushKey = "mobile_center_use_push"; private const string UseAnalyticsKey = "mobile_center_use_analytics"; private const string UseDistributeKey = "mobile_center_use_distribute"; private const string CustomApiUrlKey = "mobile_center_custom_api_url"; private const string UseCustomApiUrlKey = "mobile_center_use_custom_api_url"; private const string CustomInstallUrlKey = "mobile_center_custom_install_url"; private const string UseCustomInstallUrlKey = "mobile_center_use_custom_install_url";
<<<<<<< using BetterCms.Module.Pages.ViewModels.Option; using BetterCms.Module.Root.ViewModels.Option; ======= using BetterCms.Module.Root.ViewModels.Security; >>>>>>> using BetterCms.Module.Pages.ViewModels.Option; using BetterCms.Module.Root.ViewModels.Security; using BetterCms.Module.Root.ViewModels.Option; <<<<<<< /// Gets or sets the page option values. /// </summary> /// <value> /// The page option values. /// </value> public IList<OptionValueEditViewModel> OptionValues { get; set; } /// <summary> ======= /// Gets or sets the user access list. /// </summary> /// <value> /// The user access list. /// </value> public List<UserAccessViewModel> UserAccessList { get; set; } /// <summary> /// Gets or sets a value indicating whether [access control enabled]. /// </summary> /// <value> /// <c>true</c> if [access control enabled]; otherwise, <c>false</c>. /// </value> public bool AccessControlEnabled { get; set; } /// <summary> /// Initializes a new instance of the <see cref="AddNewPageViewModel"/> class. /// </summary> public AddNewPageViewModel() { UserAccessList = new List<UserAccessViewModel>(); } /// <summary> >>>>>>> /// Gets or sets the page option values. /// </summary> /// <value> /// The page option values. /// </value> public IList<OptionValueEditViewModel> OptionValues { get; set; } /// <summary> /// Gets or sets the user access list. /// </summary> /// <value> /// The user access list. /// </value> public List<UserAccessViewModel> UserAccessList { get; set; } /// <summary> /// Gets or sets a value indicating whether access control is enabled. /// </summary> /// <value> /// <c>true</c> if access control is enabled; otherwise, <c>false</c>. /// </value> public bool AccessControlEnabled { get; set; } /// <summary> /// Initializes a new instance of the <see cref="AddNewPageViewModel"/> class. /// </summary> public AddNewPageViewModel() { UserAccessList = new List<UserAccessViewModel>(); } /// <summary>
<<<<<<< var request = new GetPagesRequest(page => page.PageUrl == Urls.Page404, includeUnpublished: true); ======= var request = new GetPagesRequest(page => page.PageUrl.TrimEnd('/') == Urls.Page404.TrimEnd('/'), includeUnpublished: true, includePrivate: true); >>>>>>> var request = new GetPagesRequest(page => page.PageUrl.TrimEnd('/') == Urls.Page404.TrimEnd('/'), includeUnpublished: true); <<<<<<< request = new GetPagesRequest(page => page.PageUrl == Urls.Page500, includeUnpublished: true); ======= request = new GetPagesRequest(page => page.PageUrl.TrimEnd('/') == Urls.Page500.TrimEnd('/'), includeUnpublished: true, includePrivate: true); >>>>>>> request = new GetPagesRequest(page => page.PageUrl.TrimEnd('/') == Urls.Page500.TrimEnd('/'), includeUnpublished: true);
<<<<<<< ======= using System.Linq; using BetterCms.Core.DataContracts; using BetterCms.Core.Models; >>>>>>>
<<<<<<< ======= using BetterCms.Core.Exceptions.DataTier; using BetterCms.Core.Models; using BetterCms.Core.Security; using BetterCms.Core.Services; using BetterCms.Module.Root.Helpers; >>>>>>> using BetterCms.Core.Services;
<<<<<<< WriteLiteral("></span>\r\n </span>\r\n <!-- /ko -->\r\n" + " </div>\r\n </div>\r\n\r\n <div"); ======= WriteLiteral("></span>\r\n </span>\r\n <!-- /ko -->\r\n" + " </div>\n </div>\n\n <div"); >>>>>>> WriteLiteral("></span>\r\n </span>\r\n <!-- /ko -->\r\n" + " </div>\r\n </div>\r\n\r\n <div"); <<<<<<< WriteLiteral(" type=\"hidden\""); ======= WriteLiteral(" type=\"text\""); WriteLiteral(" class=\"bcms-field-text\""); WriteLiteral(@" data-bind="" css: { 'bcms-tag-validation-error': newItem.hasError() }, value: newItem, valueUpdate: 'afterkeydown', escPress: clearItem, autocompleteList: 'onlyExisting'"""); WriteLiteral(" />\r\n <!-- ko if: newItem.hasError() -->\r\n " + " <span"); WriteLiteral(" class=\"bcms-tag-field-validation-error\""); WriteLiteral(">\r\n <span"); >>>>>>> WriteLiteral(" type=\"hidden\""); <<<<<<< WriteLiteral(" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n " + " <div"); ======= WriteLiteral("></span>\r\n </span>\r\n <!-- /ko -->\r\n" + " </div>\n </div>\n </div>\n\n " + " <div"); >>>>>>> WriteLiteral(" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n " + " <div"); <<<<<<< #line 75 "..\..\Views\Shared\Partial\MediaManagerFilterTemplate.cshtml" Write(RootGlobalization.Button_Filter_Search); ======= #line 85 "..\..\Views\Shared\Partial\MediaManagerFilterTemplate.cshtml" Write(RootGlobalization.Button_Filter_Clear); >>>>>>> #line 75 "..\..\Views\Shared\Partial\MediaManagerFilterTemplate.cshtml" Write(RootGlobalization.Button_Filter_Clear);
<<<<<<< using BetterModules.Core.DataAccess.DataContext; ======= using BetterCms.Core.DataAccess.DataContext; using BetterCms.Core.Services; >>>>>>> using BetterModules.Core.DataAccess.DataContext; using BetterCms.Core.Services;
<<<<<<< Filter isPublishedFilter = null; if (!RetrieveUnpublishedPages()) { var isPublishedQuery = new TermQuery(new Term(LuceneIndexDocumentKeys.IsPublished, "true")); isPublishedFilter = new QueryWrapperFilter(isPublishedQuery); } if (LuceneSearchHelper.Search != null) { collector = LuceneSearchHelper.Search(query, isPublishedFilter, collector); } else { query = LuceneEvents.Instance.OnSearchQueryExecuting(query, searchQuery).Query; if (isPublishedFilter != null) { // Exclude unpublished pages searcher.Search(query, isPublishedFilter, collector); } else { // Search within all the pages searcher.Search(query, collector); } } ScoreDoc[] hits = collector.TopDocs(skip, take).ScoreDocs; List<Document> hitDocuments = new List<Document>(); for (int i = 0; i < hits.Length; i++) { int docId = hits[i].Doc; Document d = searcher.Doc(docId); hitDocuments.Add(d); result.Add(new SearchResultItem { FormattedUrl = d.Get(LuceneIndexDocumentKeys.Path), Link = d.Get(LuceneIndexDocumentKeys.Path), Title = d.Get(LuceneIndexDocumentKeys.Title), Snippet = GetSnippet(d.Get(LuceneIndexDocumentKeys.Content), request.Query) }); } ======= if (!RetrieveUnpublishedPages()) { // Exclude unpublished pages var isPublishedQuery = new TermQuery(new Term(LuceneIndexDocumentKeys.IsPublished, "true")); Filter isPublishedFilter = new QueryWrapperFilter(isPublishedQuery); searcher.Search(query, isPublishedFilter, collector); } else { // Search within all the pages searcher.Search(query, collector); } ScoreDoc[] hits = collector.TopDocs(skip, take).ScoreDocs; >>>>>>> Filter isPublishedFilter = null; if (!RetrieveUnpublishedPages()) { var isPublishedQuery = new TermQuery(new Term(LuceneIndexDocumentKeys.IsPublished, "true")); isPublishedFilter = new QueryWrapperFilter(isPublishedQuery); } if (LuceneSearchHelper.Search != null) { collector = LuceneSearchHelper.Search(query, isPublishedFilter, collector); } else { query = LuceneEvents.Instance.OnSearchQueryExecuting(query, searchQuery).Query; if (isPublishedFilter != null) { // Exclude unpublished pages searcher.Search(query, isPublishedFilter, collector); } else { // Search within all the pages searcher.Search(query, collector); } } ScoreDoc[] hits = collector.TopDocs(skip, take).ScoreDocs; List<Document> hitDocuments = new List<Document>();
<<<<<<< public AppBackendService(IConfiguration configuration, IBasicAuthenticationConfig basicAuthConfig) ======= public AppBackendService(IConfiguration configuration, IBasicAuthenticationConfig basicAuthConfig) >>>>>>> public AppBackendService(IConfiguration configuration, IBasicAuthenticationConfig basicAuthConfig) <<<<<<< _Prefix = configuration.GetSection("AppBackendConfig:Prefix").Value.ToString(); ======= >>>>>>> _Prefix = configuration.GetSection("AppBackendConfig:Prefix").Value.ToString(); <<<<<<< var basicAuthToken = $"{basicAuthConfig.UserName}:{basicAuthConfig.Password}"; var basicAuthTokenBytes = Encoding.UTF8.GetBytes(basicAuthToken.ToArray()); var base64BasicAuthToken = System.Convert.ToBase64String(basicAuthTokenBytes); _HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64BasicAuthToken); ======= var basicAuthToken = $"{basicAuthConfig.UserName}:{basicAuthConfig.Password}"; var basicAuthTokenBytes = Encoding.UTF8.GetBytes(basicAuthToken.ToArray()); var base64BasicAuthToken = System.Convert.ToBase64String(basicAuthTokenBytes); _HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64BasicAuthToken); >>>>>>> var basicAuthToken = $"{basicAuthConfig.UserName}:{basicAuthConfig.Password}"; var basicAuthTokenBytes = Encoding.UTF8.GetBytes(basicAuthToken.ToArray()); var base64BasicAuthToken = System.Convert.ToBase64String(basicAuthTokenBytes); _HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64BasicAuthToken); var basicAuthToken = $"{basicAuthConfig.UserName}:{basicAuthConfig.Password}"; var basicAuthTokenBytes = Encoding.UTF8.GetBytes(basicAuthToken.ToArray()); var base64BasicAuthToken = System.Convert.ToBase64String(basicAuthTokenBytes); _HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64BasicAuthToken); <<<<<<< new AuthorisationArgs(redeemIccModel)); ======= new AuthorisationArgs(redeemIccModel, "okok")); >>>>>>> new AuthorisationArgs(redeemIccModel)); <<<<<<< ======= // todo: convert dynamic into lab-confirm flow model >>>>>>>
<<<<<<< private static readonly DateTimeZone testZone = new FixedDateTimeZone("tmp", Offset.Zero); ======= private static readonly IDateTimeZone TestZone = new FixedDateTimeZone("tmp", Offset.Zero); >>>>>>> private static readonly DateTimeZone TestZone = new FixedDateTimeZone("tmp", Offset.Zero); <<<<<<< ======= public void IsoForZone() { Chronology subject = Chronology.IsoForZone(TestZone); Assert.AreSame(TestZone, subject.Zone); Assert.AreSame(IsoCalendarSystem.Instance, subject.Calendar); } [Test] public void IsoForZone_WithNullZone_ThrowsArgumentNullException() { Assert.Throws<ArgumentNullException>(() => Chronology.IsoForZone(null)); } [Test] >>>>>>>
<<<<<<< [Test] public void TestToString_InvalidFormat() { Assert.Throws<FormatException>(() => Offset.Zero.ToString("A")); } [Test] public void TestToString_MinValue() { TestToStringBase(Offset.MinValue, "-PT23H59M59.999S", "-PT23H59M59.999S", "-PT23H59M"); } [Test] public void TestToString_MaxValue() { TestToStringBase(Offset.MaxValue, "+PT23H59M59.999S", "+PT23H59M59.999S", "+PT23H59M"); } [Test] public void TestToString_Zero() { TestToStringBase(Offset.Zero, "+PT0H", "+PT0H00M00.000S", "+PT0H00M"); } [Test] public void Max() { Offset x = Offset.FromMilliseconds(100); Offset y = Offset.FromMilliseconds(200); Assert.AreEqual(y, Offset.Max(x, y)); Assert.AreEqual(y, Offset.Max(y, x)); Assert.AreEqual(x, Offset.Max(x, Offset.MinValue)); Assert.AreEqual(x, Offset.Max(Offset.MinValue, x)); Assert.AreEqual(Offset.MaxValue, Offset.Max(Offset.MaxValue, x)); Assert.AreEqual(Offset.MaxValue, Offset.Max(x, Offset.MaxValue)); } [Test] public void Min() { Offset x = Offset.FromMilliseconds(100); Offset y = Offset.FromMilliseconds(200); Assert.AreEqual(x, Offset.Min(x, y)); Assert.AreEqual(x, Offset.Min(y, x)); Assert.AreEqual(Offset.MinValue, Offset.Min(x, Offset.MinValue)); Assert.AreEqual(Offset.MinValue, Offset.Min(Offset.MinValue, x)); Assert.AreEqual(x, Offset.Min(Offset.MaxValue, x)); Assert.AreEqual(x, Offset.Min(x, Offset.MaxValue)); } private static void TestToStringBase(Offset value, string gvalue, string lvalue, string svalue) { var actual = value.ToString(); Assert.AreEqual(gvalue, actual); actual = value.ToString("G"); Assert.AreEqual(gvalue, actual); actual = value.ToString("L"); Assert.AreEqual(lvalue, actual); actual = value.ToString("S"); Assert.AreEqual(svalue, actual); actual = value.ToString("S", CultureInfo.InvariantCulture); Assert.AreEqual(svalue, actual); actual = value.ToString(CultureInfo.InvariantCulture); Assert.AreEqual(gvalue, actual); actual = string.Format("{0}", value); Assert.AreEqual(gvalue, actual); actual = string.Format("{0:G}", value); Assert.AreEqual(gvalue, actual); actual = string.Format("{0:L}", value); Assert.AreEqual(lvalue, actual); actual = string.Format("{0:S}", value); Assert.AreEqual(svalue, actual); } ======= >>>>>>> [Test] public void Max() { Offset x = Offset.FromMilliseconds(100); Offset y = Offset.FromMilliseconds(200); Assert.AreEqual(y, Offset.Max(x, y)); Assert.AreEqual(y, Offset.Max(y, x)); Assert.AreEqual(x, Offset.Max(x, Offset.MinValue)); Assert.AreEqual(x, Offset.Max(Offset.MinValue, x)); Assert.AreEqual(Offset.MaxValue, Offset.Max(Offset.MaxValue, x)); Assert.AreEqual(Offset.MaxValue, Offset.Max(x, Offset.MaxValue)); } [Test] public void Min() { Offset x = Offset.FromMilliseconds(100); Offset y = Offset.FromMilliseconds(200); Assert.AreEqual(x, Offset.Min(x, y)); Assert.AreEqual(x, Offset.Min(y, x)); Assert.AreEqual(Offset.MinValue, Offset.Min(x, Offset.MinValue)); Assert.AreEqual(Offset.MinValue, Offset.Min(Offset.MinValue, x)); Assert.AreEqual(x, Offset.Min(Offset.MaxValue, x)); Assert.AreEqual(x, Offset.Min(x, Offset.MaxValue)); }
<<<<<<< ======= private static readonly Offset StandardOffset = Offset.ForHours(1); private static readonly Offset DaylightOffset = Offset.ForHours(2); private static readonly Transition Fall2009Transition = new Transition (Instant.FromUtc(2009, 10, 25, 1, 0), DaylightOffset, StandardOffset); private static readonly Transition Spring2010Transition = new Transition (Instant.FromUtc(2010, 3, 28, 1, 0), StandardOffset, DaylightOffset); private static readonly Transition Fall2010Transition = new Transition (Instant.FromUtc(2010, 10, 31, 1, 0), DaylightOffset, StandardOffset); private static readonly Transition Spring2011Transition = new Transition (Instant.FromUtc(2011, 3, 27, 1, 0), StandardOffset, DaylightOffset); private static readonly Instant Summer2010 = Instant.FromUtc(2010, 6, 19, 0, 0); private static readonly Instant Winter2010 = Instant.FromUtc(2010, 12, 1, 0, 0); >>>>>>> (Instant.FromUtc(2009, 10, 25, 1, 0), DaylightOffset, StandardOffset); (Instant.FromUtc(2010, 3, 28, 1, 0), StandardOffset, DaylightOffset); (Instant.FromUtc(2010, 10, 31, 1, 0), DaylightOffset, StandardOffset); (Instant.FromUtc(2011, 3, 27, 1, 0), StandardOffset, DaylightOffset); private static readonly Instant Summer2010 = Instant.FromUtc(2010, 6, 19, 0, 0); private static readonly Instant Winter2010 = Instant.FromUtc(2010, 12, 1, 0, 0); <<<<<<< var nameChangeInstant = new ZonedDateTime(1891, 3, 14, 23, 51, 39, DateTimeZones.Utc).ToInstant(); var utcChangeInstant = new ZonedDateTime(1911, 3, 10, 23, 51, 39, DateTimeZones.Utc).ToInstant(); var beforeNameChange = Paris.GetZoneInterval(nameChangeInstant - Duration.One); var afterNameChange = Paris.GetZoneInterval(nameChangeInstant); var afterSmallChange = Paris.GetZoneInterval(utcChangeInstant); Assert.AreEqual("LMT", beforeNameChange.Name); Assert.AreEqual(InitialOffset, beforeNameChange.Offset); ======= Instant nameChangeInstant = Instant.FromUtc(1891, 3, 14, 23, 51, 39); Instant utcChangeInstant = Instant.FromUtc(1911, 3, 10, 23, 51, 39); >>>>>>> var nameChangeInstant = new ZonedDateTime(1891, 3, 14, 23, 51, 39, DateTimeZones.Utc).ToInstant(); var utcChangeInstant = new ZonedDateTime(1911, 3, 10, 23, 51, 39, DateTimeZones.Utc).ToInstant(); var beforeNameChange = Paris.GetZoneInterval(nameChangeInstant - Duration.One); var afterNameChange = Paris.GetZoneInterval(nameChangeInstant); var afterSmallChange = Paris.GetZoneInterval(utcChangeInstant); Assert.AreEqual("LMT", beforeNameChange.Name); Assert.AreEqual(InitialOffset, beforeNameChange.Offset);
<<<<<<< /* if ((parseInfo.fAllowTrailingWhite && pattern.HasMoreCharacters) && ParseByFormat(str, pattern, formatInfo, false, parseResult)) { return true; } */ ======= >>>>>>>
<<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours + Offset.Zero, "1 + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Zero + ThreeHours, "0 + 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), ThreeHours + Offset.Zero, "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), Offset.Zero + ThreeHours, "0 + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours + Offset.Zero, "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Zero + ThreeHours, "0 + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours + ThreeHours, "3,000,000 + 1"); Assert.AreEqual(Offset.Zero, ThreeHours + NegativeThreeHours, "1 + (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), NegativeTwelveHours + ThreeHours, "-TwelveHours + threeHours"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), ThreeHours + ThreeHours, "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, ThreeHours + NegativeThreeHours, "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0, 0), NegativeTwelveHours + ThreeHours, "-TwelveHours + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours + ThreeHours, "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, ThreeHours + NegativeThreeHours, "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), NegativeTwelveHours + ThreeHours, "-TwelveHours + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Add(ThreeHours, Offset.Zero), "1 + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Add(Offset.Zero, ThreeHours), "0 + 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), Offset.Add(ThreeHours, Offset.Zero), "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), Offset.Add(Offset.Zero, ThreeHours), "0 + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Add(ThreeHours, Offset.Zero), "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Add(Offset.Zero, ThreeHours), "0 + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), Offset.Add(ThreeHours, ThreeHours), "3,000,000 + 1"); Assert.AreEqual(Offset.Zero, Offset.Add(ThreeHours, NegativeThreeHours), "1 + (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), Offset.Add(NegativeTwelveHours, ThreeHours), "-TwelveHours + threeHours"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), Offset.Add(ThreeHours, ThreeHours), "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, Offset.Add(ThreeHours, NegativeThreeHours), "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0, 0), Offset.Add(NegativeTwelveHours, ThreeHours), "-TwelveHours + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), Offset.Add(ThreeHours, ThreeHours), "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, Offset.Add(ThreeHours, NegativeThreeHours), "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), Offset.Add(NegativeTwelveHours, ThreeHours), "-TwelveHours + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours.Plus(Offset.Zero), "1 + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Zero.Plus(ThreeHours), "0 + 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), ThreeHours.Plus(Offset.Zero), "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), Offset.Zero.Plus(ThreeHours), "0 + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours.Plus(Offset.Zero), "ThreeHours + 0"); Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Zero.Plus(ThreeHours), "0 + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours.Plus(ThreeHours), "3,000,000 + 1"); Assert.AreEqual(Offset.Zero, ThreeHours.Plus(NegativeThreeHours), "1 + (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), NegativeTwelveHours.Plus(ThreeHours), "-TwelveHours + threeHours"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), ThreeHours.Plus(ThreeHours), "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, ThreeHours.Plus(NegativeThreeHours), "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0, 0), NegativeTwelveHours.Plus(ThreeHours), "-TwelveHours + ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours.Plus(ThreeHours), "ThreeHours + ThreeHours"); Assert.AreEqual(Offset.Zero, ThreeHours.Plus(NegativeThreeHours), "ThreeHours + (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(9, 0, 0), NegativeTwelveHours.Plus(ThreeHours), "-TwelveHours + ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours - Offset.Zero, "1 - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Zero - ThreeHours, "0 - 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), ThreeHours - Offset.Zero, "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0, 0), Offset.Zero - ThreeHours, "0 - ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours - Offset.Zero, "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Zero - ThreeHours, "0 - ThreeHours"); <<<<<<< Assert.AreEqual(Offset.Zero, ThreeHours - ThreeHours, "3,000,000 - 1"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours - NegativeThreeHours, "1 - (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), NegativeTwelveHours - ThreeHours, "-TwelveHours - threeHours"); ======= Assert.AreEqual(Offset.Zero, ThreeHours - ThreeHours, "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), ThreeHours - NegativeThreeHours, "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0, 0), NegativeTwelveHours - ThreeHours, "-TwelveHours - ThreeHours"); >>>>>>> Assert.AreEqual(Offset.Zero, ThreeHours - ThreeHours, "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours - NegativeThreeHours, "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), NegativeTwelveHours - ThreeHours, "-TwelveHours - ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Subtract(ThreeHours, Offset.Zero), "1 - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Subtract(Offset.Zero, ThreeHours), "0 - 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), Offset.Subtract(ThreeHours, Offset.Zero), "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0, 0), Offset.Subtract(Offset.Zero, ThreeHours), "0 - ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), Offset.Subtract(ThreeHours, Offset.Zero), "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Subtract(Offset.Zero, ThreeHours), "0 - ThreeHours"); <<<<<<< Assert.AreEqual(Offset.Zero, Offset.Subtract(ThreeHours, ThreeHours), "3,000,000 - 1"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), Offset.Subtract(ThreeHours, NegativeThreeHours), "1 - (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), Offset.Subtract(NegativeTwelveHours, ThreeHours), "-TwelveHours - threeHours"); ======= Assert.AreEqual(Offset.Zero, Offset.Subtract(ThreeHours, ThreeHours), "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), Offset.Subtract(ThreeHours, NegativeThreeHours), "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0, 0), Offset.Subtract(NegativeTwelveHours, ThreeHours), "-TwelveHours - ThreeHours"); >>>>>>> Assert.AreEqual(Offset.Zero, Offset.Subtract(ThreeHours, ThreeHours), "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), Offset.Subtract(ThreeHours, NegativeThreeHours), "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), Offset.Subtract(NegativeTwelveHours, ThreeHours), "-TwelveHours - ThreeHours"); <<<<<<< Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours.Minus(Offset.Zero), "1 - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Zero.Minus(ThreeHours), "0 - 1"); ======= Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0, 0), ThreeHours.Minus(Offset.Zero), "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0, 0), Offset.Zero.Minus(ThreeHours), "0 - ThreeHours"); >>>>>>> Assert.AreEqual(TestObjects.CreatePositiveOffset(3, 0, 0), ThreeHours.Minus(Offset.Zero), "ThreeHours - 0"); Assert.AreEqual(TestObjects.CreateNegativeOffset(3, 0, 0), Offset.Zero.Minus(ThreeHours), "0 - ThreeHours"); <<<<<<< Assert.AreEqual(Offset.Zero, ThreeHours.Minus(ThreeHours), "3,000,000 - 1"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours.Minus(NegativeThreeHours), "1 - (-1)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), NegativeTwelveHours.Minus(ThreeHours), "-TwelveHours - threeHours"); ======= Assert.AreEqual(Offset.Zero, ThreeHours.Minus(ThreeHours), "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0, 0), ThreeHours.Minus(NegativeThreeHours), "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0, 0), NegativeTwelveHours.Minus(ThreeHours), "-TwelveHours - ThreeHours"); >>>>>>> Assert.AreEqual(Offset.Zero, ThreeHours.Minus(ThreeHours), "ThreeHours - ThreeHours"); Assert.AreEqual(TestObjects.CreatePositiveOffset(6, 0, 0), ThreeHours.Minus(NegativeThreeHours), "ThreeHours - (-ThreeHours)"); Assert.AreEqual(TestObjects.CreateNegativeOffset(15, 0, 0), NegativeTwelveHours.Minus(ThreeHours), "-TwelveHours - ThreeHours");
<<<<<<< [Test] public void RotationalSpeedTimesTimeSpanEqualsAngle() { var angle = RotationalSpeed.FromRadiansPerSecond(10.0) * TimeSpan.FromSeconds(9.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void TimeSpanTimesRotationalSpeedEqualsAngle() { var angle = TimeSpan.FromSeconds(9.0) * RotationalSpeed.FromRadiansPerSecond(10.0) ; Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void RotationalSpeedTimesDurationEqualsAngle() { var angle = RotationalSpeed.FromRadiansPerSecond(10.0) * Duration.FromSeconds(9.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void DurationTimesRotationalSpeedEqualsAngle() { var angle = Duration.FromSeconds(9.0) * RotationalSpeed.FromRadiansPerSecond(10.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void RotationalSpeedTimesForceEqualsPower() { var power = RotationalSpeed.FromRadiansPerSecond(10.0) * Force.FromNewtons(2.0); Assert.AreEqual(power, Power.FromWatts(20.0)); } [Test] public void ForceTimesRotationalSpeedEqualsPower() { var power = Force.FromNewtons(2.0) * RotationalSpeed.FromRadiansPerSecond(10.0) ; Assert.AreEqual(power, Power.FromWatts(20.0)); } protected override double RadiansPerSecondInOneRevolutionPerSecond ======= protected override double RadiansPerSecondInOneRadianPerSecond >>>>>>> [Test] public void RotationalSpeedTimesTimeSpanEqualsAngle() { var angle = RotationalSpeed.FromRadiansPerSecond(10.0) * TimeSpan.FromSeconds(9.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void TimeSpanTimesRotationalSpeedEqualsAngle() { var angle = TimeSpan.FromSeconds(9.0) * RotationalSpeed.FromRadiansPerSecond(10.0) ; Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void RotationalSpeedTimesDurationEqualsAngle() { var angle = RotationalSpeed.FromRadiansPerSecond(10.0) * Duration.FromSeconds(9.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void DurationTimesRotationalSpeedEqualsAngle() { var angle = Duration.FromSeconds(9.0) * RotationalSpeed.FromRadiansPerSecond(10.0); Assert.AreEqual(angle, Angle.FromRadians(90.0)); } [Test] public void RotationalSpeedTimesForceEqualsPower() { var power = RotationalSpeed.FromRadiansPerSecond(10.0) * Force.FromNewtons(2.0); Assert.AreEqual(power, Power.FromWatts(20.0)); } [Test] public void ForceTimesRotationalSpeedEqualsPower() { var power = Force.FromNewtons(2.0) * RotationalSpeed.FromRadiansPerSecond(10.0) ; Assert.AreEqual(power, Power.FromWatts(20.0)); } protected override double RadiansPerSecondInOneRadianPerSecond
<<<<<<< private const string MinimalFormat = "M"; private const string ShortFormat = "S"; private const string LongFormat = "L"; public static readonly Offset Zero = Offset.FromMilliseconds(0); public static readonly Offset MinValue = Offset.FromMilliseconds(-NodaConstants.MillisecondsPerDay + 1); public static readonly Offset MaxValue = Offset.FromMilliseconds(NodaConstants.MillisecondsPerDay - 1); ======= public static readonly Offset Zero = new Offset(0); public static readonly Offset MinValue = new Offset(-NodaConstants.MillisecondsPerDay + 1); public static readonly Offset MaxValue = new Offset(NodaConstants.MillisecondsPerDay - 1); >>>>>>> public static readonly Offset Zero = Offset.FromMilliseconds(0); public static readonly Offset MinValue = Offset.FromMilliseconds(-NodaConstants.MillisecondsPerDay + 1); public static readonly Offset MaxValue = Offset.FromMilliseconds(NodaConstants.MillisecondsPerDay - 1); <<<<<<< ======= /// Gets a value indicating whether this instance is negative. /// </summary> /// <value> /// <c>true</c> if this instance is negative; otherwise, <c>false</c>. /// </value> public bool IsNegative { get { return milliseconds < 0; } } /// <summary> /// Gets the hours of the offset. This is always a positive value. /// </summary> public int Hours { get { return Math.Abs(milliseconds) / NodaConstants.MillisecondsPerHour; } } /// <summary> /// Gets the minutes of the offset. This is always a positive value. /// </summary> public int Minutes { get { return (Math.Abs(milliseconds) % NodaConstants.MillisecondsPerHour) / NodaConstants.MillisecondsPerMinute; } } /// <summary> /// Gets the seconds of the offset. This is always a positive value. /// </summary> public int Seconds { get { return (Math.Abs(milliseconds) % NodaConstants.MillisecondsPerMinute) / NodaConstants.MillisecondsPerSecond; } } /// <summary> /// Gets the fractional seconds of the offset i.e. the milliseconds of the second. This is always a positive value. /// </summary> public int FractionalSeconds { get { return Math.Abs(milliseconds) % NodaConstants.MillisecondsPerSecond; } } /// <summary> >>>>>>> /// Gets a value indicating whether this instance is negative. /// </summary> /// <value> /// <c>true</c> if this instance is negative; otherwise, <c>false</c>. /// </value> public bool IsNegative { get { return milliseconds < 0; } } /// <summary> /// Gets the hours of the offset. This is always a positive value. /// </summary> public int Hours { get { return Math.Abs(milliseconds) / NodaConstants.MillisecondsPerHour; } } /// <summary> /// Gets the minutes of the offset. This is always a positive value. /// </summary> public int Minutes { get { return (Math.Abs(milliseconds) % NodaConstants.MillisecondsPerHour) / NodaConstants.MillisecondsPerMinute; } } /// <summary> /// Gets the seconds of the offset. This is always a positive value. /// </summary> public int Seconds { get { return (Math.Abs(milliseconds) % NodaConstants.MillisecondsPerMinute) / NodaConstants.MillisecondsPerSecond; } } /// <summary> /// Gets the fractional seconds of the offset i.e. the milliseconds of the second. This is always a positive value. /// </summary> public int FractionalSeconds { get { return Math.Abs(milliseconds) % NodaConstants.MillisecondsPerSecond; } } /// <summary> <<<<<<< /// <summary> /// Returns the greater offset of the given two, i.e. the one which will give a later local /// time when added to an instant. /// </summary> public static Offset Max(Offset x, Offset y) { return x > y ? x : y; } /// <summary> /// Returns the lower offset of the given two, i.e. the one which will give an earlier local /// time when added to an instant. /// </summary> public static Offset Min(Offset x, Offset y) { return x < y ? x : y; } ======= #endregion Conversion >>>>>>> /// <summary> /// Returns the greater offset of the given two, i.e. the one which will give a later local /// time when added to an instant. /// </summary> public static Offset Max(Offset x, Offset y) { return x > y ? x : y; } /// <summary> /// Returns the lower offset of the given two, i.e. the one which will give an earlier local /// time when added to an instant. /// </summary> public static Offset Min(Offset x, Offset y) { return x < y ? x : y; } #endregion Conversion
<<<<<<< [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float exact_power_of_ten(long power) { #if NET5_0 Debug.Assert(power < Constants.powers_of_ten_float.Length); ref float tableRef = ref MemoryMarshal.GetArrayDataReference(Constants.powers_of_ten_float); return Unsafe.Add(ref tableRef, (nint)power); #else return Constants.powers_of_ten_float[power]; #endif } public static unsafe float ToFloat(bool negative, AdjustedMantissa am) ======= private static void ThrowArgumentException() => throw new ArgumentException(); public static float exact_power_of_ten(long power) => Constants.powers_of_ten_float[power]; public static float ToFloat(bool negative, AdjustedMantissa am) >>>>>>> private static void ThrowArgumentException() => throw new ArgumentException(); [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float exact_power_of_ten(long power) { #if NET5_0 Debug.Assert(power < Constants.powers_of_ten_float.Length); ref float tableRef = ref MemoryMarshal.GetArrayDataReference(Constants.powers_of_ten_float); return Unsafe.Add(ref tableRef, (nint)power); #else return Constants.powers_of_ten_float[power]; #endif } public static unsafe float ToFloat(bool negative, AdjustedMantissa am) <<<<<<< fixed (char* pStart = s) { return ParseFloat(pStart, pStart + (uint)s.Length, expectedFormat, decimal_separator); } ======= return ParseFloat(pStart, pStart + s.Length, expectedFormat, decimal_separator); } } public static unsafe float ParseFloat(ReadOnlySpan<char> s, chars_format expectedFormat = chars_format.is_general, char decimal_separator = '.') { fixed (char* pStart = s) { return ParseFloat(pStart, pStart + s.Length, expectedFormat, decimal_separator); >>>>>>> return ParseFloat(pStart, pStart + (uint)s.Length, expectedFormat, decimal_separator); } } public static unsafe float ParseFloat(ReadOnlySpan<char> s, chars_format expectedFormat = chars_format.is_general, char decimal_separator = '.') { fixed (char* pStart = s) { return ParseFloat(pStart, pStart + (uint)s.Length, expectedFormat, decimal_separator);
<<<<<<< for (; i < value.Length; i++) { var c = value.GetChar(i); if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; i < value.Length; i++) { var c = value.GetChar(i); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; index < json.Length; index++) { var ch = json.GetChar(index); if (ch >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[ch]) break; } //Whitespace inline ======= for (; index < json.Length; index++) { var ch = json[index]; if (!JsonUtils.IsWhiteSpace(ch)) break; } //Whitespace inline >>>>>>> for (; index < json.Length; index++) { var ch = json.GetChar(index); if (!JsonUtils.IsWhiteSpace(ch)) break; } //Whitespace inline <<<<<<< return EatValue(value, ref i); ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline return value[i++] == JsWriter.MapStartChar; >>>>>>> return EatValue(value, ref i); <<<<<<< for (; i < value.Length; i++) { var c = value.GetChar(i); if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; i < value.Length; i++) { var c = value.GetChar(i); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; i < value.Length; i++) { var c = value.GetChar(i); if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; i < value.Length; i++) { var c = value.GetChar(i); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< return EatItemSeperatorOrMapEndChar(new StringSegment(value), ref i); } public bool EatItemSeperatorOrMapEndChar(StringSegment value, ref int i) { for (; i < value.Length; i++) { var c = value.GetChar(i); if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> return EatItemSeperatorOrMapEndChar(new StringSegment(value), ref i); } public bool EatItemSeperatorOrMapEndChar(StringSegment value, ref int i) { for (; i < value.Length; i++) { var c = value.GetChar(i); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; i < value.Length; i++) { var c = value.GetChar(i); if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; i < value.Length; i++) { var c = value.GetChar(i); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; i < valueLength; i++) { var c = buf[offset + i]; if (c >= WhiteSpaceFlags.Length || !WhiteSpaceFlags[c]) break; } //Whitespace inline if (i == valueLength) return default(StringSegment); ======= for (; i < value.Length; i++) { var c = value[i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline if (i == valueLength) return null; >>>>>>> for (; i < value.Length; i++) { var c = buf[offset + i]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline if (i == valueLength) return default(StringSegment);
<<<<<<< string cutomerId = null; #if !(PCL || NETSTANDARD) ======= string subId = null; #if !PCL >>>>>>> string subId = null; #if !(PCL || NETSTANDARD)
<<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline if (strType.GetChar(index++) != JsWriter.MapStartChar) throw DeserializeTypeRef.CreateSerializationError(type, strType.Value); ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline if (strType[index++] != JsWriter.MapStartChar) throw DeserializeTypeRef.CreateSerializationError(type, strType); >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline if (strType.GetChar(index++) != JsWriter.MapStartChar) throw DeserializeTypeRef.CreateSerializationError(type, strType.Value); <<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline <<<<<<< for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (c >= JsonTypeSerializer.WhiteSpaceFlags.Length || !JsonTypeSerializer.WhiteSpaceFlags[c]) break; } //Whitespace inline ======= for (; index < strType.Length; index++) { var c = strType[index]; if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline >>>>>>> for (; index < strType.Length; index++) { var c = strType.GetChar(index); if (!JsonUtils.IsWhiteSpace(c)) break; } //Whitespace inline
<<<<<<< using NUnit.Framework; using System; ======= using System; >>>>>>> using System; using NUnit.Framework; using System;
<<<<<<< } ", @"Private Sub Test() Dim o As Object = New List(Of Integer)() Dim l As List(Of Integer) = CType(o, List(Of Integer)) End Sub "); ======= }", @"Private Sub Test() Dim o As Object = New System.Collections.Generic.List(Of Integer)() Dim l As List(Of Integer) = CType(o, System.Collections.Generic.List(Of Integer)) End Sub"); >>>>>>> }", @"Private Sub Test() Dim o As Object = New List(Of Integer)() Dim l As List(Of Integer) = CType(o, List(Of Integer)) End Sub"); <<<<<<< } ", @"Private Sub Test() Dim o As Object = New List(Of Integer)() Dim l As List(Of Integer) = TryCast(o, List(Of Integer)) End Sub "); ======= }", @"Private Sub Test() Dim o As Object = New System.Collections.Generic.List(Of Integer)() Dim l As List(Of Integer) = TryCast(o, System.Collections.Generic.List(Of Integer)) End Sub"); >>>>>>> }", @"Private Sub Test() Dim o As Object = New List(Of Integer)() Dim l As List(Of Integer) = TryCast(o, List(Of Integer)) End Sub");
<<<<<<< Dim s = CStr(o) End Sub"); ======= Dim s As String = CStr(o) End Sub "); >>>>>>> Dim s As String = CStr(o) End Sub"); <<<<<<< Dim l = CType(o, System.Collections.Generic.List(Of Integer)) End Sub"); ======= Dim l As List(Of Integer) = CType(o, System.Collections.Generic.List(Of Integer)) End Sub "); >>>>>>> Dim l As List(Of Integer) = CType(o, System.Collections.Generic.List(Of Integer)) End Sub"); <<<<<<< Dim l = TryCast(o, System.Collections.Generic.List(Of Integer)) End Sub"); ======= Dim l As List(Of Integer) = TryCast(o, System.Collections.Generic.List(Of Integer)) End Sub "); >>>>>>> Dim l As List(Of Integer) = TryCast(o, System.Collections.Generic.List(Of Integer)) End Sub"); <<<<<<< }", @"Private Sub Test() Dim CR = ChrW(&HD) End Sub"); ======= } ", @"Private Sub Test() Dim CR As Char = ChrW(&HD) End Sub "); >>>>>>> }", @"Private Sub Test() Dim CR As Char = ChrW(&HD) End Sub");
<<<<<<< ======= internal const double searchEps = 1e-5; >>>>>>> internal const double searchEps = 1e-5; <<<<<<< Dictionary<VisibilityEdge, VisibilityVertex> GetEdgeSnapAtVertexMap(LgNodeInfo nodeInfo) { ======= static void SortPointByAngles(LgNodeInfo nodeInfo, Point[] polySplitArray) { var angles = new double[polySplitArray.Length]; for (int i = 0; i < polySplitArray.Length; i++) angles[i] = Point.Angle(new Point(1, 0), polySplitArray[i] - nodeInfo.Center); Array.Sort(angles, polySplitArray); } VisibilityVertex GlueOrAddToPolylineAndVisGraph(Point[] polySplitArray, int i, VisibilityVertex v, Polyline poly) { var ip = polySplitArray[i]; if (ApproximateComparer.Close(v.Point, ip)) return v; // gluing ip to the previous point on the polyline if (ApproximateComparer.Close(ip, poly.StartPoint.Point)) { var vv = VisGraph.FindVertex(poly.StartPoint.Point); Debug.Assert(vv != null); return vv; } poly.AddPoint(ip); return VisGraph.AddVertex(ip); } Dictionary<VisibilityEdge, VisibilityVertex> GetEdgeSnapAtVertexMap(LgNodeInfo nodeInfo) { >>>>>>> static void SortPointByAngles(LgNodeInfo nodeInfo, Point[] polySplitArray) { var angles = new double[polySplitArray.Length]; for (int i = 0; i < polySplitArray.Length; i++) angles[i] = Point.Angle(new Point(1, 0), polySplitArray[i] - nodeInfo.Center); Array.Sort(angles, polySplitArray); } VisibilityVertex GlueOrAddToPolylineAndVisGraph(Point[] polySplitArray, int i, VisibilityVertex v, Polyline poly) { var ip = polySplitArray[i]; if (ApproximateComparer.Close(v.Point, ip)) return v; // gluing ip to the previous point on the polyline if (ApproximateComparer.Close(ip, poly.StartPoint.Point)) { var vv = VisGraph.FindVertex(poly.StartPoint.Point); Debug.Assert(vv != null); return vv; } poly.AddPoint(ip); return VisGraph.AddVertex(ip); } Dictionary<VisibilityEdge, VisibilityVertex> GetEdgeSnapAtVertexMap(LgNodeInfo nodeInfo) { <<<<<<< ======= internal Point[] GetPortVertices(LgNodeInfo node) { return node.BoundaryOnLayer.PolylinePoints.Select(pp => pp.Point).ToArray(); } >>>>>>> internal Point[] GetPortVertices(LgNodeInfo node) { return node.BoundaryOnLayer.PolylinePoints.Select(pp => pp.Point).ToArray(); } <<<<<<< internal void SetWeightOfEdgesAlongPathToMin(List<Point> oldPath, double dmin) { ======= internal void AssertEdgesPresentAndPassable(List<Point> path) { var vs = VisGraph.FindVertex(path[0]); Debug.Assert(vs != null); var vt = VisGraph.FindVertex(path[path.Count - 2]); Debug.Assert(vt != null); vs.IsShortestPathTerminal = vt.IsShortestPathTerminal = true; var router = new SingleSourceSingleTargetShortestPathOnVisibilityGraph(_visGraph, vs, vt) { LengthMultiplier = 0.8, LengthMultiplierForAStar = 0.0 }; List<VisibilityEdge> pathEdges = new List<VisibilityEdge>(); for (int i = 0; i < path.Count - 1; i++) { var edge = FindEdge(path[i], path[i + 1]); Debug.Assert(edge != null); pathEdges.Add(edge); } router.AssertEdgesPassable(pathEdges); vs.IsShortestPathTerminal = vt.IsShortestPathTerminal = false; } internal void SetWeightOfEdgesAlongPathToMin(List<Point> oldPath, double dmin) { >>>>>>> internal void AssertEdgesPresentAndPassable(List<Point> path) { var vs = VisGraph.FindVertex(path[0]); Debug.Assert(vs != null); var vt = VisGraph.FindVertex(path[path.Count - 2]); Debug.Assert(vt != null); vs.IsShortestPathTerminal = vt.IsShortestPathTerminal = true; var router = new SingleSourceSingleTargetShortestPathOnVisibilityGraph(_visGraph, vs, vt) { LengthMultiplier = 0.8, LengthMultiplierForAStar = 0.0 }; List<VisibilityEdge> pathEdges = new List<VisibilityEdge>(); for (int i = 0; i < path.Count - 1; i++) { var edge = FindEdge(path[i], path[i + 1]); Debug.Assert(edge != null); pathEdges.Add(edge); } router.AssertEdgesPassable(pathEdges); vs.IsShortestPathTerminal = vt.IsShortestPathTerminal = false; } internal void SetWeightOfEdgesAlongPathToMin(List<Point> oldPath, double dmin) { <<<<<<< // internal VisibilityVertex GetExistingVvCloseBy(Point p) { // var rect = new Rectangle(p); // rect.Pad(searchEps); // VisibilityVertex v=null; // // // var crossed = _visGraphVerticesTree.GetAllIntersecting(rect); // if (crossed.Length == 0) { // return null; // } // double dist = double.PositiveInfinity; // for (int i = 0; i < crossed.Length; i++) { // var vv = crossed[i]; // var vvDist = (vv.Point - p).LengthSquared; // if (vvDist < dist) { // dist = vvDist; // v = vv; // } // } // return v; // } void RegisterInTree(VisibilityVertex vv) { ======= internal void AddEdges(List<SymmetricSegment> toAdd) { foreach (var e in toAdd) { AddVisGraphEdge(e.A, e.B); } } // internal VisibilityVertex GetExistingVvCloseBy(Point p) { // var rect = new Rectangle(p); // rect.Pad(searchEps); // VisibilityVertex v=null; // // // var crossed = _visGraphVerticesTree.GetAllIntersecting(rect); // if (crossed.Length == 0) { // return null; // } // double dist = double.PositiveInfinity; // for (int i = 0; i < crossed.Length; i++) { // var vv = crossed[i]; // var vvDist = (vv.Point - p).LengthSquared; // if (vvDist < dist) { // dist = vvDist; // v = vv; // } // } // return v; // } void RegisterInTree(VisibilityVertex vv) { >>>>>>> internal void AddEdges(List<SymmetricSegment> toAdd) { foreach (var e in toAdd) { AddVisGraphEdge(e.A, e.B); } } void RegisterInTree(VisibilityVertex vv) {
<<<<<<< private Type? GetCustomPlugInPointType(Type interfaceType) ======= /// <summary> /// Configures the plug in. /// </summary> /// <param name="plugInId">The plug in identifier.</param> /// <param name="configuration">The configuration.</param> public void ConfigurePlugIn(Guid plugInId, PlugInConfiguration configuration) { if (this.knownPlugIns.TryGetValue(plugInId, out var plugInType)) { this.ConfigurePlugIn(plugInType, configuration); } } private Type GetCustomPlugInPointType(Type interfaceType) >>>>>>> /// <summary> /// Configures the plug in. /// </summary> /// <param name="plugInId">The plug in identifier.</param> /// <param name="configuration">The configuration.</param> public void ConfigurePlugIn(Guid plugInId, PlugInConfiguration configuration) { if (this.knownPlugIns.TryGetValue(plugInId, out var plugInType)) { this.ConfigurePlugIn(plugInType, configuration); } } private Type? GetCustomPlugInPointType(Type interfaceType)
<<<<<<< using MUnique.OpenMU.DataModel.Configuration.Quests; ======= using MUnique.OpenMU.DataModel.Composition; >>>>>>> using MUnique.OpenMU.DataModel.Configuration.Quests; using MUnique.OpenMU.DataModel.Composition;
<<<<<<< var mapInitializer = new GameServerMapInitializer(gameServerDefinition, this.Id); this.gameContext = new GameServerContext(gameServerDefinition, guildServer, loginServer, friendServer, persistenceContextProvider, mapInitializer); this.gameContext.GameMapCreated += (sender, e) => this.OnPropertyChanged(nameof(this.Context)); this.gameContext.GameMapRemoved += (sender, e) => this.OnPropertyChanged(nameof(this.Context)); ======= var mapInitializer = new GameServerMapInitializer(gameServerDefinition, this.Id, stateObserver); this.gameContext = new GameServerContext(gameServerDefinition, guildServer, loginServer, friendServer, persistenceContextProvider, stateObserver, mapInitializer); mapInitializer.PlugInManager = this.gameContext.PlugInManager; >>>>>>> var mapInitializer = new GameServerMapInitializer(gameServerDefinition, this.Id); this.gameContext = new GameServerContext(gameServerDefinition, guildServer, loginServer, friendServer, persistenceContextProvider, mapInitializer); this.gameContext.GameMapCreated += (sender, e) => this.OnPropertyChanged(nameof(this.Context)); this.gameContext.GameMapRemoved += (sender, e) => this.OnPropertyChanged(nameof(this.Context)); mapInitializer.PlugInManager = this.gameContext.PlugInManager;
<<<<<<< Concentus.Celt.Pitch.pitch_search(pitch_buf.GetPointer(CeltConstants.COMBFILTER_MAXPERIOD >> 1), pitch_buf, N, CeltConstants.COMBFILTER_MAXPERIOD - 3 * CeltConstants.COMBFILTER_MINPERIOD, out pitch_index); pitch_index = CeltConstants.COMBFILTER_MAXPERIOD - pitch_index; ======= Concentus.Celt.Pitch.pitch_search(pitch_buf, CeltConstants.COMBFILTER_MAXPERIOD >> 1, pitch_buf, N, CeltConstants.COMBFILTER_MAXPERIOD - 3 * CeltConstants.COMBFILTER_MINPERIOD, pitch_index); // opt: this creates lots of pointers pitch_index.Val = CeltConstants.COMBFILTER_MAXPERIOD - pitch_index.Val; >>>>>>> Concentus.Celt.Pitch.pitch_search(pitch_buf, CeltConstants.COMBFILTER_MAXPERIOD >> 1, pitch_buf, N, CeltConstants.COMBFILTER_MAXPERIOD - 3 * CeltConstants.COMBFILTER_MINPERIOD, out pitch_index); pitch_index = CeltConstants.COMBFILTER_MAXPERIOD - pitch_index;
<<<<<<< Tools.ForceKick(e.Msg.whoAmI, "You are banned: " + ban.Reason); e.Handled = true; return; ======= Tools.Kick(e.Msg.whoAmI, "You are banned: " + ban.Reason); return true; >>>>>>> Tools.ForceKick(e.Msg.whoAmI, "You are banned: " + ban.Reason); return true; <<<<<<< Tools.ForceKick(e.Msg.whoAmI, "Name exceeded 32 characters."); e.Handled = true; ======= Tools.Kick(e.Msg.whoAmI, "Name exceeded 32 characters."); return true; >>>>>>> Tools.ForceKick(e.Msg.whoAmI, "Name exceeded 32 characters."); return true; } if (players[e.Msg.whoAmI] == null) { Tools.ForceKick(e.Msg.whoAmI, "Player doesn't exist"); return true; <<<<<<< Tools.ForceKick(e.Msg.whoAmI, "Player doesn't exist"); e.Handled = true; ======= Tools.Kick(e.Msg.whoAmI, "Player doesn't exist"); return true; >>>>>>> Tools.ForceKick(e.Msg.whoAmI, "Player doesn't exist"); return true; <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Sent client info more than once"); ======= Tools.Kick(e.Msg.whoAmI, "Sent client info more than once"); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Sent client info more than once"); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Send Tile Square Abuse"); ======= Ban(e.Msg.whoAmI, "Send Tile Square Abuse"); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Send Tile Square Abuse"); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Placing impossible to place blocks."); ======= TShock.Ban(e.Msg.whoAmI, "Placing impossible to place blocks."); Tools.Broadcast(Main.player[e.Msg.whoAmI].name + " was banned for placing impossible to place blocks."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Placing impossible to place blocks."); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "SendSection abuse."); ======= Tools.Broadcast(string.Format("{0}({1}) attempted sending a section", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI)); Tools.Kick(e.Msg.whoAmI, "SendSection abuse."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "SendSection abuse."); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Spawn NPC abuse"); ======= Tools.Broadcast(string.Format("{0}({1}) attempted spawning an NPC", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI)); Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse"); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Spawn NPC abuse"); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Update Player abuse"); ======= Tools.Kick(e.Msg.whoAmI, "Update Player abuse"); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Update Player abuse"); <<<<<<< e.Handled = Tools.HandleCheater(ply, "Abnormal life increase"); ======= if (!players[ply].group.HasPermission("ignorecheatdetection")) { if (ConfigurationManager.banCheater || ConfigurationManager.kickCheater) { string playerName = Tools.FindPlayer(ply); if (ConfigurationManager.banCheater) Ban(ply, "Abnormal life increase"); Tools.Kick(ply, "Abnormal life increase"); Tools.Broadcast(playerName + " was " + (ConfigurationManager.banCheater ? "banned" : "kicked") + " because they gained an abnormal amount of health."); return true; } } >>>>>>> return Tools.HandleCheater(ply, "Abnormal life increase"); <<<<<<< e.Handled = Tools.HandleCheater(ply, "Abnormal mana increase"); ======= if (!players[ply].group.HasPermission("ignorecheatdetection")) { if (ConfigurationManager.banCheater || ConfigurationManager.kickCheater) { string playerName = Tools.FindPlayer(ply); if (ConfigurationManager.banCheater) Ban(ply, "Abnormal mana increase"); Tools.Kick(ply, "Abnormal mana increase"); Tools.Broadcast(playerName + " was " + (ConfigurationManager.banCheater ? "banned" : "kicked") + " because they gained an abnormal amount of mana."); return true; } } >>>>>>> return Tools.HandleCheater(ply, "Abnormal mana increase"); <<<<<<< e.Handled = Tools.HandleExplosivesUser(e.Msg.whoAmI, "Throwing an explosive device."); ======= if (!players[e.Msg.whoAmI].group.HasPermission("ignoregriefdetection")) { if (ConfigurationManager.kickBoom || ConfigurationManager.banBoom) { int i = e.Msg.whoAmI; if (ConfigurationManager.banBoom) Ban(i, "Explosives"); Tools.Kick(i, "Explosives were thrown."); Tools.Broadcast(Main.player[i].name + " was " + (ConfigurationManager.banBoom ? "banned" : "kicked") + " for throwing an explosive device."); return true; } } >>>>>>> return Tools.HandleExplosivesUser(e.Msg.whoAmI, "Throwing an explosive device."); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Trying to execute KillMe on someone else."); ======= Ban(e.Msg.whoAmI, "Griefer"); Log.Info(Tools.FindPlayer(e.Msg.whoAmI) + " was kicked for trying to execute KillMe on someone else."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Trying to execute KillMe on someone else."); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Placing lava they didn't have."); ; ======= TShock.Ban(e.Msg.whoAmI, "Placing lava they didn't have."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Placing lava they didn't have."); ; <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Placing water they didn't have."); ======= TShock.Ban(e.Msg.whoAmI, "Placing water they didn't have."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Placing water they didn't have."); <<<<<<< e.Handled = Tools.HandleGriefer(e.Msg.whoAmI, "Placing impossible to place liquid."); ; ======= TShock.Ban(e.Msg.whoAmI, "Placing impossible to place liquid."); Tools.Broadcast(Main.player[e.Msg.whoAmI].name + " was banned for placing impossible to place liquid."); return true; >>>>>>> return Tools.HandleGriefer(e.Msg.whoAmI, "Placing impossible to place liquid."); ;
<<<<<<< internal Handlers.EmojiHandler EmojiHandler { get; set; } ======= internal Handlers.NetModules.NetModulePacketHandler NetModuleHandler { get; set; } >>>>>>> internal Handlers.NetModules.NetModulePacketHandler NetModuleHandler { get; set; } internal Handlers.EmojiHandler EmojiHandler { get; set; }
<<<<<<< Groups = new GroupManager(DB); Groups.LoadPermisions(); ======= >>>>>>>
<<<<<<< { PacketTypes.TileKill, HandlePlaceChest }, ======= { PacketTypes.PlaceChest, HandleTileKill }, { PacketTypes.PlayerKillMe, HandlePlayerKillMe }, >>>>>>> { PacketTypes.PlaceChest, HandlePlaceChest },
<<<<<<< public int LoginAttempts { get; set; } ======= public TSPlayer LastWhisper; >>>>>>> public TSPlayer LastWhisper; public int LoginAttempts { get; set; }
<<<<<<< { PacketTypes.SyncTilePicking, HandleSyncTilePicking }, { PacketTypes.SyncRevengeMarker, HandleSyncRevengeMarker }, ======= { PacketTypes.Emoji, HandleEmoji }, { PacketTypes.SyncRevengeMarker, HandleSyncRevengeMarker }, { PacketTypes.LandGolfBallInCup, HandleLandGolfBallInCup }, >>>>>>> { PacketTypes.Emoji, HandleEmoji }, { PacketTypes.SyncTilePicking, HandleSyncTilePicking }, { PacketTypes.SyncRevengeMarker, HandleSyncRevengeMarker }, { PacketTypes.LandGolfBallInCup, HandleLandGolfBallInCup }, <<<<<<< { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing } ======= { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing }, { PacketTypes.SyncCavernMonsterType, HandleSyncCavernMonsterType } >>>>>>> { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing }, { PacketTypes.SyncCavernMonsterType, HandleSyncCavernMonsterType } <<<<<<< /// For use in a SyncTilePicking event. /// </summary> public class SyncTilePickingEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who sends the tile picking data. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The X world position of the tile that is being picked. /// </summary> public short TileX { get; set; } /// <summary> /// The Y world position of the tile that is being picked. /// </summary> public short TileY { get; set; } /// <summary> /// The damage that is being dealt on the tile. /// </summary> public byte TileDamage { get; set; } } /// <summary> /// Called when a player hits and damages a tile. /// </summary> public static HandlerList<SyncTilePickingEventArgs> SyncTilePicking = new HandlerList<SyncTilePickingEventArgs>(); private static bool OnSyncTilePicking(TSPlayer player, MemoryStream data, byte playerIndex, short tileX, short tileY, byte tileDamage) { if (SyncTilePicking == null) return false; var args = new SyncTilePickingEventArgs { Player = player, Data = data, PlayerIndex = playerIndex, TileX = tileX, TileY = tileY, TileDamage = tileDamage }; SyncTilePicking.Invoke(null, args); return args.Handled; } /// <summary> ======= /// For use in an Emoji event. /// </summary> public class EmojiEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who sends the emoji. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The ID of the emoji, that is being received. /// </summary> public byte EmojiID { get; set; } } /// <summary> /// Called when a player sends an emoji. /// </summary> public static HandlerList<EmojiEventArgs> Emoji = new HandlerList<EmojiEventArgs>(); private static bool OnEmoji(TSPlayer player, MemoryStream data, byte playerIndex, byte emojiID) { if (Emoji == null) return false; var args = new EmojiEventArgs { Player = player, Data = data, PlayerIndex = playerIndex, EmojiID = emojiID }; Emoji.Invoke(null, args); return args.Handled; } /// <summary> /// For use in a LandBallInCup event. /// </summary> public class LandGolfBallInCupEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who puts the ball in the cup. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The X tile position of where the ball lands in a cup. /// </summary> public ushort TileX { get; set; } /// <summary> /// The Y tile position of where the ball lands in a cup. /// </summary> public ushort TileY { get; set; } /// <summary> /// The amount of hits it took for the player to land the ball in the cup. /// </summary> public ushort Hits { get; set; } /// <summary> /// The type of the projectile that was landed in the cup. A golfball in legit cases. /// </summary> public ushort ProjectileType { get; set; } } /// <summary> /// Called when a player lands a golf ball in a cup. /// </summary> public static HandlerList<LandGolfBallInCupEventArgs> LandGolfBallInCup = new HandlerList<LandGolfBallInCupEventArgs>(); private static bool OnLandGolfBallInCup(TSPlayer player, MemoryStream data, byte playerIndex, ushort tileX, ushort tileY, ushort hits, ushort projectileType ) { if (LandGolfBallInCup == null) return false; var args = new LandGolfBallInCupEventArgs { Player = player, Data = data, PlayerIndex = playerIndex, TileX = tileX, TileY = tileY, Hits = hits, ProjectileType = projectileType }; LandGolfBallInCup.Invoke(null, args); return args.Handled; } /// <summary> >>>>>>> /// For use in a SyncTilePicking event. /// </summary> public class SyncTilePickingEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who sends the tile picking data. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The X world position of the tile that is being picked. /// </summary> public short TileX { get; set; } /// <summary> /// The Y world position of the tile that is being picked. /// </summary> public short TileY { get; set; } /// <summary> /// The damage that is being dealt on the tile. /// </summary> public byte TileDamage { get; set; } } /// <summary> /// Called when a player hits and damages a tile. /// </summary> public static HandlerList<SyncTilePickingEventArgs> SyncTilePicking = new HandlerList<SyncTilePickingEventArgs>(); private static bool OnSyncTilePicking(TSPlayer player, MemoryStream data, byte playerIndex, short tileX, short tileY, byte tileDamage) { if (SyncTilePicking == null) return false; var args = new SyncTilePickingEventArgs { PlayerIndex = playerIndex, TileX = tileX, TileY = tileY, TileDamage = tileDamage }; SyncTilePicking.Invoke(null, args); return args.Handled; } /// For use in an Emoji event. /// </summary> public class EmojiEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who sends the emoji. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The ID of the emoji, that is being received. /// </summary> public byte EmojiID { get; set; } } /// <summary> /// Called when a player sends an emoji. /// </summary> public static HandlerList<EmojiEventArgs> Emoji = new HandlerList<EmojiEventArgs>(); private static bool OnEmoji(TSPlayer player, MemoryStream data, byte playerIndex, byte emojiID) { if (Emoji == null) return false; var args = new EmojiEventArgs { Player = player, Data = data, PlayerIndex = playerIndex, EmojiID = emojiID }; Emoji.Invoke(null, args); return args.Handled; } /// <summary> /// For use in a LandBallInCup event. /// </summary> public class LandGolfBallInCupEventArgs : GetDataHandledEventArgs { /// <summary> /// The player index in the packet, who puts the ball in the cup. /// </summary> public byte PlayerIndex { get; set; } /// <summary> /// The X tile position of where the ball lands in a cup. /// </summary> public ushort TileX { get; set; } /// <summary> /// The Y tile position of where the ball lands in a cup. /// </summary> public ushort TileY { get; set; } /// <summary> /// The amount of hits it took for the player to land the ball in the cup. /// </summary> public ushort Hits { get; set; } /// <summary> /// The type of the projectile that was landed in the cup. A golfball in legit cases. /// </summary> public ushort ProjectileType { get; set; } } /// <summary> /// Called when a player lands a golf ball in a cup. /// </summary> public static HandlerList<LandGolfBallInCupEventArgs> LandGolfBallInCup = new HandlerList<LandGolfBallInCupEventArgs>(); private static bool OnLandGolfBallInCup(TSPlayer player, MemoryStream data, byte playerIndex, ushort tileX, ushort tileY, ushort hits, ushort projectileType ) { if (LandGolfBallInCup == null) return false; var args = new LandGolfBallInCupEventArgs { Player = player, Data = data, PlayerIndex = playerIndex, TileX = tileX, TileY = tileY, Hits = hits, ProjectileType = projectileType }; LandGolfBallInCup.Invoke(null, args); return args.Handled; } /// <summary> <<<<<<< ======= private static bool HandleSyncCavernMonsterType(GetDataHandlerArgs args) { args.Player.Kick("Exploit attempt detected!"); TShock.Log.ConsoleDebug($"HandleSyncCavernMonsterType: Player is trying to modify NPC cavernMonsterType; this is a crafted packet! - From {args.Player.Name}"); return true; } >>>>>>> private static bool HandleSyncCavernMonsterType(GetDataHandlerArgs args) { args.Player.Kick("Exploit attempt detected!"); TShock.Log.ConsoleDebug($"HandleSyncCavernMonsterType: Player is trying to modify NPC cavernMonsterType; this is a crafted packet! - From {args.Player.Name}"); return true; }
<<<<<<< if (Tools.activePlayers() + 1 > ConfigurationManager.maxSlots) ======= int count = 1; for (int i = 0; i < Main.player.Length; i++) count += Main.player[i].active ? 1 : 0; string ip = Tools.GetRealIP((Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint))); players[ply] = new TSPlayer(ply); players[ply].group = Tools.GetGroupForIP(ip); if (count > ConfigurationManager.maxSlots && ! players[ply].group.HasPermission("reservedslot")) >>>>>>> string ip = Tools.GetPlayerIP(ply); ; players[ply] = new TSPlayer(ply); players[ply].group = Tools.GetGroupForIP(ip); if (Tools.activePlayers() + 1 > ConfigurationManager.maxSlots && !players[ply].group.HasPermission("reservedslot")) <<<<<<< string ip = Tools.GetRealIP(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint.ToString()); var ban = Bans.GetBanByIp(ip); if (ban != null) ======= if (FileTools.CheckBanned(ip)) >>>>>>> var ban = Bans.GetBanByIp(ip); if (ban != null)
<<<<<<< ======= >>>>>>> <<<<<<< RevertKillTile((int)i); ======= if (ConfigurationManager.banTnt) Ban(i, "Kill Tile Abuse"); else Tools.Kick(i, "Kill tile abuse detected."); Tools.Broadcast(Main.player[i].name + " was " + (ConfigurationManager.banTnt ? "banned" : "kicked") + " for kill tile abuse."); RevertKillTile(i); >>>>>>> RevertKillTile(i);
<<<<<<< { PacketTypes.FishOutNPC, HandleFishOutNPC }, { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing } ======= { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing }, { PacketTypes.SyncRevengeMarker, HandleSyncRevengeMarker } >>>>>>> { PacketTypes.FishOutNPC, HandleFishOutNPC }, { PacketTypes.FoodPlatterTryPlacing, HandleFoodPlatterTryPlacing }, { PacketTypes.SyncRevengeMarker, HandleSyncRevengeMarker }
<<<<<<< {PacketTypes.PlayerSlot, HandlePlayerSlot}, ======= {PacketTypes.ChestGetContents, HandleChest}, {PacketTypes.SignNew, HandleSign} >>>>>>> {PacketTypes.ChestGetContents, HandleChest}, {PacketTypes.SignNew, HandleSign} {PacketTypes.PlayerSlot, HandlePlayerSlot},
<<<<<<< internal Handlers.LandGolfBallInCupHandler LandGolfBallInCupHandler { get; set; } ======= internal Handlers.EmojiHandler EmojiHandler { get; set; } >>>>>>> internal Handlers.EmojiHandler EmojiHandler { get; set; } internal Handlers.LandGolfBallInCupHandler LandGolfBallInCupHandler { get; set; } <<<<<<< LandGolfBallInCupHandler = new Handlers.LandGolfBallInCupHandler(); GetDataHandlers.LandGolfBallInCup += LandGolfBallInCupHandler.OnLandGolfBallInCup; ======= EmojiHandler = new Handlers.EmojiHandler(); GetDataHandlers.Emoji += EmojiHandler.OnReceiveEmoji; >>>>>>> EmojiHandler = new Handlers.EmojiHandler(); GetDataHandlers.Emoji += EmojiHandler.OnReceiveEmoji; LandGolfBallInCupHandler = new Handlers.LandGolfBallInCupHandler(); GetDataHandlers.LandGolfBallInCup += LandGolfBallInCupHandler.OnLandGolfBallInCup;
<<<<<<< public static IMigrationRunnerBuilder SetServer(this IMigrationRunnerBuilder builder, DataSettings dataSettings) ======= #region Methods /// <summary> /// Configure the database server /// </summary> /// <param name="builder">Configuring migration runner services</param> /// <returns></returns> public static IMigrationRunnerBuilder SetServer(this IMigrationRunnerBuilder builder) >>>>>>> #region Methods /// <summary> /// Configure the database server /// </summary> /// <param name="builder">Configuring migration runner services</param> /// <returns></returns> public static IMigrationRunnerBuilder SetServer(this IMigrationRunnerBuilder builder, DataSettings dataSettings)
<<<<<<< if (stateProvince == null) throw new ArgumentNullException(nameof(stateProvince)); await _stateProvinceRepository.Delete(stateProvince); //event notification await _eventPublisher.EntityDeleted(stateProvince); ======= _stateProvinceRepository.Delete(stateProvince); >>>>>>> await _stateProvinceRepository.Delete(stateProvince); <<<<<<< if (stateProvinceId == 0) return null; return await _stateProvinceRepository.ToCachedGetById(stateProvinceId); ======= return _stateProvinceRepository.GetById(stateProvinceId, cache => default); >>>>>>> return await _stateProvinceRepository.GetById(stateProvinceId, cache => default); <<<<<<< return await query.ToCachedFirstOrDefault(key); ======= return _staticCacheManager.Get(key, query.FirstOrDefault); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync()); <<<<<<< var stateProvinces = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopDirectoryDefaults.StateProvincesAllCacheKey, showHidden)); ======= var stateProvinces = _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopDirectoryDefaults.StateProvincesAllCacheKey, showHidden), query.ToList); >>>>>>> var stateProvinces = await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopDirectoryDefaults.StateProvincesAllCacheKey, showHidden), async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (stateProvince == null) throw new ArgumentNullException(nameof(stateProvince)); await _stateProvinceRepository.Insert(stateProvince); //event notification await _eventPublisher.EntityInserted(stateProvince); ======= _stateProvinceRepository.Insert(stateProvince); >>>>>>> await _stateProvinceRepository.Insert(stateProvince); <<<<<<< if (stateProvince == null) throw new ArgumentNullException(nameof(stateProvince)); await _stateProvinceRepository.Update(stateProvince); //event notification await _eventPublisher.EntityUpdated(stateProvince); ======= _stateProvinceRepository.Update(stateProvince); >>>>>>> await _stateProvinceRepository.Update(stateProvince);
<<<<<<< if (urlRecord == null) throw new ArgumentNullException(nameof(urlRecord)); await _urlRecordRepository.Delete(urlRecord); //event notification await _eventPublisher.EntityDeleted(urlRecord); ======= _urlRecordRepository.Delete(urlRecord); >>>>>>> await _urlRecordRepository.Delete(urlRecord); <<<<<<< if (urlRecords == null) throw new ArgumentNullException(nameof(urlRecords)); await _urlRecordRepository.Delete(urlRecords); //event notification foreach (var urlRecord in urlRecords) await _eventPublisher.EntityDeleted(urlRecord); ======= _urlRecordRepository.Delete(urlRecords); >>>>>>> await _urlRecordRepository.Delete(urlRecords); <<<<<<< var query = _urlRecordRepository.Table; var key = _cacheKeyService.PrepareKeyForDefaultCache(NopSeoDefaults.UrlRecordByIdsCacheKey, urlRecordIds); return await query.Where(p => urlRecordIds.Contains(p.Id)).ToCachedList(key); ======= return _urlRecordRepository.GetByIds(urlRecordIds, cache => default); >>>>>>> return await _urlRecordRepository.GetByIds(urlRecordIds, cache => default); <<<<<<< if (urlRecordId == 0) return null; return await _urlRecordRepository.ToCachedGetById(urlRecordId); ======= return _urlRecordRepository.GetById(urlRecordId, cache => default); >>>>>>> return await _urlRecordRepository.GetById(urlRecordId, cache => default); <<<<<<< if (urlRecord == null) throw new ArgumentNullException(nameof(urlRecord)); await _urlRecordRepository.Insert(urlRecord); //event notification await _eventPublisher.EntityInserted(urlRecord); ======= _urlRecordRepository.Insert(urlRecord); >>>>>>> await _urlRecordRepository.Insert(urlRecord); <<<<<<< if (urlRecord == null) throw new ArgumentNullException(nameof(urlRecord)); await _urlRecordRepository.Update(urlRecord); //event notification await _eventPublisher.EntityUpdated(urlRecord); ======= _urlRecordRepository.Update(urlRecord); >>>>>>> await _urlRecordRepository.Update(urlRecord); <<<<<<< var urlRecord = await query.ToCachedFirstOrDefault(key); ======= var urlRecord = _staticCacheManager.Get(key, query.FirstOrDefault); >>>>>>> var urlRecord = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync()); <<<<<<< var urlRecords = (await query .ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopSeoDefaults.UrlRecordAllCacheKey))) .AsEnumerable(); ======= return query; }, cache => default).AsQueryable(); >>>>>>> return query; }, cache => default)).AsQueryable(); <<<<<<< var rezSlug = await query.ToCachedFirstOrDefault(key) ?? string.Empty; ======= var rezSlug = _staticCacheManager.Get(key, query.FirstOrDefault) ?? string.Empty; >>>>>>> var rezSlug = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync()) ?? string.Empty;
<<<<<<< if (!await mappings.AnyAsync()) return; await _discountManufacturerMappingRepository.Delete(mappings); ======= _discountManufacturerMappingRepository.Delete(mappings.ToList()); >>>>>>> await _discountManufacturerMappingRepository.Delete(mappings.ToList()); <<<<<<< if (manufacturer == null) throw new ArgumentNullException(nameof(manufacturer)); manufacturer.Deleted = true; await UpdateManufacturer(manufacturer); //event notification await _eventPublisher.EntityDeleted(manufacturer); ======= _manufacturerRepository.Delete(manufacturer); >>>>>>> await _manufacturerRepository.Delete(manufacturer); <<<<<<< if (manufacturers == null) throw new ArgumentNullException(nameof(manufacturers)); foreach (var manufacturer in manufacturers) await DeleteManufacturer(manufacturer); ======= _manufacturerRepository.Delete(manufacturers); >>>>>>> await _manufacturerRepository.Delete(manufacturers); <<<<<<< return await query.ToPagedList(pageIndex, pageSize); ======= return query.Distinct(); }, pageIndex, pageSize); >>>>>>> return query.Distinct(); }, pageIndex, pageSize); <<<<<<< var result = await _discountManufacturerMappingRepository.Table.Where(dmm => dmm.DiscountId == discount.Id) .Select(dmm => dmm.EntityId).ToCachedList(cacheKey); ======= var query = _discountManufacturerMappingRepository.Table.Where(dmm => dmm.DiscountId == discount.Id) .Select(dmm => dmm.EntityId); var result = _staticCacheManager.Get(cacheKey, query.ToList); >>>>>>> var query = _discountManufacturerMappingRepository.Table.Where(dmm => dmm.DiscountId == discount.Id) .Select(dmm => dmm.EntityId); var result = await _staticCacheManager.Get(cacheKey, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (manufacturerId == 0) return null; return await _manufacturerRepository.ToCachedGetById(manufacturerId); ======= return _manufacturerRepository.GetById(manufacturerId, cache => default); >>>>>>> return await _manufacturerRepository.GetById(manufacturerId, cache => default); <<<<<<< if (manufacturer == null) throw new ArgumentNullException(nameof(manufacturer)); await _manufacturerRepository.Insert(manufacturer); //event notification await _eventPublisher.EntityInserted(manufacturer); ======= _manufacturerRepository.Insert(manufacturer); >>>>>>> await _manufacturerRepository.Insert(manufacturer); <<<<<<< if (manufacturer == null) throw new ArgumentNullException(nameof(manufacturer)); await _manufacturerRepository.Update(manufacturer); //event notification await _eventPublisher.EntityUpdated(manufacturer); ======= _manufacturerRepository.Update(manufacturer); >>>>>>> await _manufacturerRepository.Update(manufacturer); <<<<<<< if (productManufacturer == null) throw new ArgumentNullException(nameof(productManufacturer)); await _productManufacturerRepository.Delete(productManufacturer); //event notification await _eventPublisher.EntityDeleted(productManufacturer); ======= _productManufacturerRepository.Delete(productManufacturer); >>>>>>> await _productManufacturerRepository.Delete(productManufacturer); <<<<<<< var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductManufacturersAllByProductIdCacheKey, productId, showHidden, await _workContext.GetCurrentCustomer(), await _storeContext.GetCurrentStore()); ======= var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductManufacturersByProductCacheKey, productId, showHidden, _workContext.CurrentCustomer, _storeContext.CurrentStore); >>>>>>> var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductManufacturersByProductCacheKey, productId, showHidden, await _workContext.GetCurrentCustomer(), await _storeContext.GetCurrentStore()); <<<<<<< var productManufacturers = await query.ToCachedList(key); ======= var productManufacturers = _staticCacheManager.Get(key, query.ToList); >>>>>>> var productManufacturers = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (productManufacturerId == 0) return null; return await _productManufacturerRepository.ToCachedGetById(productManufacturerId); ======= return _productManufacturerRepository.GetById(productManufacturerId, cache => default); >>>>>>> return await _productManufacturerRepository.GetById(productManufacturerId, cache => default); <<<<<<< if (productManufacturer == null) throw new ArgumentNullException(nameof(productManufacturer)); await _productManufacturerRepository.Insert(productManufacturer); //event notification await _eventPublisher.EntityInserted(productManufacturer); ======= _productManufacturerRepository.Insert(productManufacturer); >>>>>>> await _productManufacturerRepository.Insert(productManufacturer); <<<<<<< if (productManufacturer == null) throw new ArgumentNullException(nameof(productManufacturer)); await _productManufacturerRepository.Update(productManufacturer); //event notification await _eventPublisher.EntityUpdated(productManufacturer); ======= _productManufacturerRepository.Update(productManufacturer); >>>>>>> await _productManufacturerRepository.Update(productManufacturer); <<<<<<< if (discountManufacturerMapping is null) throw new ArgumentNullException(nameof(discountManufacturerMapping)); await _discountManufacturerMappingRepository.Insert(discountManufacturerMapping); //event notification await _eventPublisher.EntityInserted(discountManufacturerMapping); ======= _discountManufacturerMappingRepository.Insert(discountManufacturerMapping); >>>>>>> await _discountManufacturerMappingRepository.Insert(discountManufacturerMapping); <<<<<<< if (discountManufacturerMapping is null) throw new ArgumentNullException(nameof(discountManufacturerMapping)); await _discountManufacturerMappingRepository.Delete(discountManufacturerMapping); //event notification await _eventPublisher.EntityDeleted(discountManufacturerMapping); ======= _discountManufacturerMappingRepository.Delete(discountManufacturerMapping); >>>>>>> await _discountManufacturerMappingRepository.Delete(discountManufacturerMapping);
<<<<<<< public virtual Task<ShippingProviderListModel> PrepareShippingProviderListModelAsync(ShippingProviderSearchModel searchModel) ======= public virtual async Task<ShippingProviderListModel> PrepareShippingProviderListModel(ShippingProviderSearchModel searchModel) >>>>>>> public virtual async Task<ShippingProviderListModel> PrepareShippingProviderListModelAsync(ShippingProviderSearchModel searchModel) <<<<<<< shippingProviderModel.LogoUrl = _shippingPluginManager.GetPluginLogoUrlAsync(provider).Result; ======= shippingProviderModel.LogoUrl = await _shippingPluginManager.GetPluginLogoUrl(provider); >>>>>>> shippingProviderModel.LogoUrl = await _shippingPluginManager.GetPluginLogoUrlAsync(provider); <<<<<<< public virtual Task<PickupPointProviderListModel> PreparePickupPointProviderListModelAsync(PickupPointProviderSearchModel searchModel) ======= public virtual async Task<PickupPointProviderListModel> PreparePickupPointProviderListModel(PickupPointProviderSearchModel searchModel) >>>>>>> public virtual async Task<PickupPointProviderListModel> PreparePickupPointProviderListModelAsync(PickupPointProviderSearchModel searchModel) <<<<<<< pickupPointProviderModel.LogoUrl = _pickupPluginManager.GetPluginLogoUrlAsync(provider).Result; ======= pickupPointProviderModel.LogoUrl = await _pickupPluginManager.GetPluginLogoUrl(provider); >>>>>>> pickupPointProviderModel.LogoUrl = await _pickupPluginManager.GetPluginLogoUrlAsync(provider); <<<<<<< var warehouses = (await _shippingService.GetAllWarehousesAsync( name : searchModel.SearchName)) ======= var warehouses = (await _shippingService.GetAllWarehouses( name: searchModel.SearchName)) >>>>>>> var warehouses = (await _shippingService.GetAllWarehousesAsync( name: searchModel.SearchName))
<<<<<<< await _emailAccountRepository.Insert(emailAccount); //event notification await _eventPublisher.EntityInserted(emailAccount); ======= _emailAccountRepository.Insert(emailAccount); >>>>>>> await _emailAccountRepository.Insert(emailAccount); <<<<<<< await _emailAccountRepository.Update(emailAccount); //event notification await _eventPublisher.EntityUpdated(emailAccount); ======= _emailAccountRepository.Update(emailAccount); >>>>>>> await _emailAccountRepository.Update(emailAccount); <<<<<<< await _emailAccountRepository.Delete(emailAccount); //event notification await _eventPublisher.EntityDeleted(emailAccount); ======= _emailAccountRepository.Delete(emailAccount); >>>>>>> await _emailAccountRepository.Delete(emailAccount); <<<<<<< if (emailAccountId == 0) return null; return await _emailAccountRepository.ToCachedGetById(emailAccountId); ======= return _emailAccountRepository.GetById(emailAccountId, cache => default); >>>>>>> return await _emailAccountRepository.GetById(emailAccountId, cache => default); <<<<<<< var query = from ea in _emailAccountRepository.Table orderby ea.Id select ea; var emailAccounts = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopMessageDefaults.EmailAccountsAllCacheKey)); ======= var emailAccounts = _emailAccountRepository.GetAll(query => { return from ea in query orderby ea.Id select ea; }, cache => default); >>>>>>> var emailAccounts = await _emailAccountRepository.GetAll(query => { return from ea in query orderby ea.Id select ea; }, cache => default);
<<<<<<< using System.Threading.Tasks; ======= using LinqToDB; >>>>>>> using System.Threading.Tasks; using LinqToDB; <<<<<<< public virtual async Task DeleteProductProductTagMappingAsync(int productId, int productTagId) ======= protected virtual void DeleteProductProductTagMapping(int productId, int productTagId) >>>>>>> protected virtual async Task DeleteProductProductTagMappingAsync(int productId, int productTagId) <<<<<<< #region Nested class protected partial class ProductTagWithCount { /// <summary> /// Gets or sets the entity identifier /// </summary> public int Id { get; set; } /// <summary> /// Gets or sets the product tag ID /// </summary> public int ProductTagId { get; set; } /// <summary> /// Gets or sets the count /// </summary> public int ProductCount { get; set; } } #endregion ======= >>>>>>>
<<<<<<< await _forumRepository.Update(forum); ======= // if the forum group is changed then clear cache for the previous group // (we can't use the event consumer because it will work after saving the changes in DB) var forumToUpdate = _forumRepository.LoadOriginalCopy(forum); if (forumToUpdate.ForumGroupId != forum.ForumGroupId) _staticCacheManager.Remove(NopForumDefaults.ForumByForumGroupCacheKey, forumToUpdate.ForumGroupId); _forumRepository.Update(forum); >>>>>>> // if the forum group is changed then clear cache for the previous group // (we can't use the event consumer because it will work after saving the changes in DB) var forumToUpdate = await _forumRepository.LoadOriginalCopy(forum); if (forumToUpdate.ForumGroupId != forum.ForumGroupId) await _staticCacheManager.Remove(NopForumDefaults.ForumByForumGroupCacheKey, forumToUpdate.ForumGroupId); await _forumRepository.Update(forum);
<<<<<<< await _taxCategoryRepository.Delete(taxCategory => categoriesIds.Contains(taxCategory.Id)); await _cacheManager.Remove(NopTaxDefaults.TaxCategoriesAllCacheKey); ======= _taxCategoryRepository.Delete(taxCategory => categoriesIds.Contains(taxCategory.Id)); _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<TaxCategory>.Prefix); >>>>>>> await _taxCategoryRepository.Delete(taxCategory => categoriesIds.Contains(taxCategory.Id)); await _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<TaxCategory>.Prefix); <<<<<<< return await _cacheManager.Get(cacheKey, async () => ======= return _staticCacheManager.Get(cacheKey, () => >>>>>>> return await _staticCacheManager.Get(cacheKey, async () =>
<<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForShortTermCache(NopModelCacheDefaults.WidgetModelKey, roles, await _storeContext.GetCurrentStore(), widgetZone, await _themeContext.GetWorkingThemeName()); ======= var cacheKey = _staticCacheManager.PrepareKeyForShortTermCache(NopModelCacheDefaults.WidgetModelKey, roles, _storeContext.CurrentStore, widgetZone, _themeContext.WorkingThemeName); >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForShortTermCache(NopModelCacheDefaults.WidgetModelKey, roles, await _storeContext.GetCurrentStore(), widgetZone, await _themeContext.GetWorkingThemeName());
<<<<<<< using FluentAssertions; ======= using System.Collections.Generic; using System.Linq; using Moq; using Nop.Data; >>>>>>> using FluentAssertions; using System.Collections.Generic; using System.Linq; using Moq; using Nop.Data; <<<<<<< var product = new Product { ManageInventoryMethod = ManageInventoryMethod.ManageStock, UseMultipleWarehouses = true, StockQuantity = 6, }; product.ProductWarehouseInventory.Add(new ProductWarehouseInventory { WarehouseId = 1, StockQuantity = 7, ReservedQuantity = 4, }); product.ProductWarehouseInventory.Add(new ProductWarehouseInventory { WarehouseId = 2, StockQuantity = 8, ReservedQuantity = 1, }); product.ProductWarehouseInventory.Add(new ProductWarehouseInventory { WarehouseId = 3, StockQuantity = -2, }); var result = _productService.GetTotalStockQuantity(product, true, 1); result.Should().Be(3); ======= var result = _productService.GetTotalStockQuantity(_productUseMultipleWarehousesWithWarehouseSpecified, true, 1); result.ShouldEqual(3); >>>>>>> var result = _productService.GetTotalStockQuantity(_productUseMultipleWarehousesWithWarehouseSpecified, true, 1); result.Should().Be(3);
<<<<<<< if (topic == null) throw new ArgumentNullException(nameof(topic)); await _topicRepository.Delete(topic); //event notification await _eventPublisher.EntityDeleted(topic); ======= _topicRepository.Delete(topic); >>>>>>> await _topicRepository.Delete(topic); <<<<<<< if (topicId == 0) return null; return await _topicRepository.ToCachedGetById(topicId); ======= return _topicRepository.GetById(topicId, cache => default); >>>>>>> return await _topicRepository.GetById(topicId, cache => default); <<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicBySystemNameCacheKey , systemName, storeId, await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer())); ======= var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopTopicDefaults.TopicBySystemNameCacheKey , systemName, storeId, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer)); >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopTopicDefaults.TopicBySystemNameCacheKey , systemName, storeId, _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer())); <<<<<<< var key = ignorAcl ? _cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllCacheKey, storeId, showHidden, onlyIncludedInTopMenu) : _cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllWithACLCacheKey, storeId, showHidden, onlyIncludedInTopMenu, await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer())); var query = _topicRepository.Table; query = query.OrderBy(t => t.DisplayOrder).ThenBy(t => t.SystemName); if (!showHidden) query = query.Where(t => t.Published); ======= return _topicRepository.GetAll(query => { if (!showHidden) query = query.Where(t => t.Published); >>>>>>> return await _topicRepository.GetAll(query => { if (!showHidden) query = query.Where(t => t.Published); <<<<<<< //ACL (access control list) var allowedCustomerRolesIds = await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()); query = from c in query ======= if (!ignorAcl && !_catalogSettings.IgnoreAcl) { //ACL (access control list) var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer); query = from c in query >>>>>>> if (!ignorAcl && !_catalogSettings.IgnoreAcl) { //ACL (access control list) var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.GetCurrentCustomer().Result).Result; query = from c in query <<<<<<< return await query.ToCachedList(key); ======= return query.OrderBy(t => t.DisplayOrder).ThenBy(t => t.SystemName); }, cache => { return ignorAcl ? cache.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllCacheKey, storeId, showHidden, onlyIncludedInTopMenu) : cache.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllWithACLCacheKey, storeId, showHidden, onlyIncludedInTopMenu, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer)); }); >>>>>>> return query.OrderBy(t => t.DisplayOrder).ThenBy(t => t.SystemName); }, cache => { return ignorAcl ? cache.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllCacheKey, storeId, showHidden, onlyIncludedInTopMenu) : cache.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllWithACLCacheKey, storeId, showHidden, onlyIncludedInTopMenu, _customerService.GetCustomerRoleIds(_workContext.GetCurrentCustomer().Result)); }); <<<<<<< if (topic == null) throw new ArgumentNullException(nameof(topic)); await _topicRepository.Insert(topic); //event notification await _eventPublisher.EntityInserted(topic); ======= _topicRepository.Insert(topic); >>>>>>> await _topicRepository.Insert(topic); <<<<<<< if (topic == null) throw new ArgumentNullException(nameof(topic)); await _topicRepository.Update(topic); //event notification await _eventPublisher.EntityUpdated(topic); ======= _topicRepository.Update(topic); >>>>>>> await _topicRepository.Update(topic);
<<<<<<< using Nop.Services; using Nop.Services.Caching; using Nop.Services.Caching.Extensions; ======= >>>>>>> <<<<<<< return await query.ToCachedList(key); ======= return _staticCacheManager.Get(key, query.ToList); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< return await _staticCacheManager.Get(_cacheKeyService.PrepareKeyForDefaultCache(FacebookPixelDefaults.ConfigurationCacheKey, configurationId), async () => await _facebookPixelConfigurationRepository.GetById(configurationId)); ======= return _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.ConfigurationCacheKey, configurationId), () => _facebookPixelConfigurationRepository.GetById(configurationId)); >>>>>>> return await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.ConfigurationCacheKey, configurationId), () => _facebookPixelConfigurationRepository.GetById(configurationId)); <<<<<<< await _facebookPixelConfigurationRepository.Insert(configuration); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); ======= _facebookPixelConfigurationRepository.Insert(configuration, false); _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); >>>>>>> await _facebookPixelConfigurationRepository.Insert(configuration, false); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); <<<<<<< await _facebookPixelConfigurationRepository.Update(configuration); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); ======= _facebookPixelConfigurationRepository.Update(configuration, false); _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); >>>>>>> await _facebookPixelConfigurationRepository.Update(configuration, false); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); <<<<<<< await _facebookPixelConfigurationRepository.Delete(configuration); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); ======= _facebookPixelConfigurationRepository.Delete(configuration, false); _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); >>>>>>> await _facebookPixelConfigurationRepository.Delete(configuration, false); await _staticCacheManager.RemoveByPrefix(FacebookPixelDefaults.PrefixCacheKey); <<<<<<< var cachedCustomEvents = await _staticCacheManager.Get(_cacheKeyService.PrepareKeyForDefaultCache(FacebookPixelDefaults.CustomEventsCacheKey, configurationId), async () => ======= var cachedCustomEvents = _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.CustomEventsCacheKey, configurationId), () => >>>>>>> var cachedCustomEvents = await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.CustomEventsCacheKey, configurationId), async () => <<<<<<< return await _staticCacheManager.Get(_cacheKeyService.PrepareKeyForDefaultCache(FacebookPixelDefaults.WidgetZonesCacheKey), async () => ======= return _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.WidgetZonesCacheKey), () => >>>>>>> return await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(FacebookPixelDefaults.WidgetZonesCacheKey), async () =>
<<<<<<< using System.Threading.Tasks; ======= using Nop.Core.Events; >>>>>>> using System.Threading.Tasks; using Nop.Core.Events;
<<<<<<< protected virtual async Task PrepareDefaultItem(IList<SelectListItem> items, bool withSpecialDefaultItem, string defaultItemText = null) ======= /// <param name="defaultItemValue">Default item value; defaults 0</param> protected virtual void PrepareDefaultItem(IList<SelectListItem> items, bool withSpecialDefaultItem, string defaultItemText = null, string defaultItemValue = "0") >>>>>>> /// <param name="defaultItemValue">Default item value; defaults 0</param> protected virtual async Task PrepareDefaultItem(IList<SelectListItem> items, bool withSpecialDefaultItem, string defaultItemText = null, string defaultItemValue = "0") <<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoriesListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () => ======= var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoriesListKey, showHidden); var listItems = _staticCacheManager.Get(cacheKey, () => >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoriesListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () => <<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturersListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () => ======= var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturersListKey, showHidden); var listItems = _staticCacheManager.Get(cacheKey, () => >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturersListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () => <<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorsListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () => ======= var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorsListKey, showHidden); var listItems = _staticCacheManager.Get(cacheKey, () => >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorsListKey, showHidden); var listItems = await _staticCacheManager.Get(cacheKey, async () =>
<<<<<<< .ForMember(dest => dest.ExportImportProductAttributes_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportProductSpecificationAttributes_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportProductCategoryBreadcrumb_OverrideForStore, mo => mo.Ignore()); ======= .ForMember(dest => dest.ExportImportProductAttributes_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportCategoriesUsingCategoryName_OverrideForStore, mo => mo.Ignore()); >>>>>>> .ForMember(dest => dest.ExportImportProductAttributes_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportProductSpecificationAttributes_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportProductCategoryBreadcrumb_OverrideForStore, mo => mo.Ignore()) .ForMember(dest => dest.ExportImportCategoriesUsingCategoryName_OverrideForStore, mo => mo.Ignore());
<<<<<<< /// <param name="id">Identifier</param> /// <returns>Entity</returns> Task<TEntity> GetById(object id); ======= /// <param name="id">Entity entry identifier</param> /// <param name="getCacheKey">Function to get a cache key; pass null to don't cache; return null from this function to use the default key</param> /// <returns>Entity entry</returns> TEntity GetById(int? id, Func<IStaticCacheManager, CacheKey> getCacheKey = null); >>>>>>> /// <param name="id">Entity entry identifier</param> /// <param name="getCacheKey">Function to get a cache key; pass null to don't cache; return null from this function to use the default key</param> /// <returns>Entity entry</returns> Task<TEntity> GetById(int? id, Func<IStaticCacheManager, CacheKey> getCacheKey = null); <<<<<<< /// <param name="entity">Entity</param> Task Insert(TEntity entity); ======= /// <param name="ids">Entity entry identifiers</param> /// <param name="getCacheKey">Function to get a cache key; pass null to don't cache; return null from this function to use the default key</param> /// <returns>Entity entries</returns> IList<TEntity> GetByIds(IList<int> ids, Func<IStaticCacheManager, CacheKey> getCacheKey = null); >>>>>>> /// <param name="ids">Entity entry identifiers</param> /// <param name="getCacheKey">Function to get a cache key; pass null to don't cache; return null from this function to use the default key</param> /// <returns>Entity entries</returns> Task<IList<TEntity>> GetByIds(IList<int> ids, Func<IStaticCacheManager, CacheKey> getCacheKey = null); <<<<<<< /// <typeparam name="TEntity">Entity type</typeparam> /// <param name="entity">Entity</param> /// <returns>Copy of the passed entity</returns> Task<TEntity> LoadOriginalCopy(TEntity entity); ======= /// <param name="func">Function to select entries</param> /// <param name="pageIndex">Page index</param> /// <param name="pageSize">Page size</param> /// <param name="getOnlyTotalCount">Whether to get only the total number of entries without actually loading data</param> /// <returns>Paged list of entity entries</returns> IPagedList<TEntity> GetAllPaged(Func<IQueryable<TEntity>, IQueryable<TEntity>> func = null, int pageIndex = 0, int pageSize = int.MaxValue, bool getOnlyTotalCount = false); /// <summary> /// Insert the entity entry /// </summary> /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> void Insert(TEntity entity, bool publishEvent = true); /// <summary> /// Insert entity entries /// </summary> /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> void Insert(IList<TEntity> entities, bool publishEvent = true); >>>>>>> /// <param name="func">Function to select entries</param> /// <param name="getCacheKey">Function to get a cache key; pass null to don't cache; return null from this function to use the default key</param> /// <returns>Entity entries</returns> Task<IList<TEntity>> GetAll(Func<IQueryable<TEntity>, IQueryable<TEntity>> func = null, Func<IStaticCacheManager, CacheKey> getCacheKey = null); /// <param name="func">Function to select entries</param> /// <param name="pageIndex">Page index</param> /// <param name="pageSize">Page size</param> /// <param name="getOnlyTotalCount">Whether to get only the total number of entries without actually loading data</param> /// <returns>Paged list of entity entries</returns> Task<IPagedList<TEntity>> GetAllPaged(Func<IQueryable<TEntity>, IQueryable<TEntity>> func = null, int pageIndex = 0, int pageSize = int.MaxValue, bool getOnlyTotalCount = false); /// <summary> /// Insert the entity entry /// </summary> /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Insert(TEntity entity, bool publishEvent = true); /// <summary> /// Insert entity entries /// </summary> /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Insert(IList<TEntity> entities, bool publishEvent = true); <<<<<<< /// <param name="entity">Entity</param> Task Update(TEntity entity); ======= /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> void Update(TEntity entity, bool publishEvent = true); >>>>>>> /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Update(TEntity entity, bool publishEvent = true); <<<<<<< /// <param name="entities">Entities</param> Task Update(IEnumerable<TEntity> entities); ======= /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> void Update(IList<TEntity> entities, bool publishEvent = true); >>>>>>> /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Update(IList<TEntity> entities, bool publishEvent = true); <<<<<<< /// <param name="entity">Entity</param> Task Delete(TEntity entity); ======= /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> void Delete(TEntity entity, bool publishEvent = true); >>>>>>> /// <param name="entity">Entity entry</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Delete(TEntity entity, bool publishEvent = true); <<<<<<< /// <param name="entities">Entities</param> Task Delete(IEnumerable<TEntity> entities); ======= /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> void Delete(IList<TEntity> entities, bool publishEvent = true); >>>>>>> /// <param name="entities">Entity entries</param> /// <param name="publishEvent">Whether to publish event notification</param> Task Delete(IList<TEntity> entities, bool publishEvent = true); <<<<<<< /// <param name="storeProcedureName">Store procedure name</param> /// <param name="dataParameters">Command parameters</param> /// <returns>Collection of query result records</returns> Task<IList<TEntity>> EntityFromSql(string storeProcedureName, params DataParameter[] dataParameters); ======= /// <param name="procedureName">Procedure name</param> /// <param name="parameters">Command parameters</param> /// <returns>Entity entries</returns> IList<TEntity> EntityFromSql(string procedureName, params DataParameter[] parameters); >>>>>>> /// <param name="procedureName">Procedure name</param> /// <param name="parameters">Command parameters</param> /// <returns>Entity entries</returns> Task<IList<TEntity>> EntityFromSql(string procedureName, params DataParameter[] parameters);
<<<<<<< await _discountCategoryMappingRepository.DeleteAsync(mappings.ToList()); ======= _discountCategoryMappingRepository.Delete(mappings.ToList()); >>>>>>> await _discountCategoryMappingRepository.DeleteAsync(mappings.ToList()); <<<<<<< if (overridePublished.HasValue) query = query.Where(c => c.Published == overridePublished.Value); if ((storeId > 0 && !_catalogSettings.IgnoreStoreLimitations) || (!showHidden && !_catalogSettings.IgnoreAcl)) { if (!showHidden && !_catalogSettings.IgnoreAcl) { //ACL (access control list) var allowedCustomerRolesIds = await _customerService.GetCustomerRoleIdsAsync(await _workContext.GetCurrentCustomerAsync()); query = from c in query join acl in _aclRepository.Table on new {c1 = c.Id, c2 = nameof(Category)} equals new { c1 = acl.EntityId, c2 = acl.EntityName } into c_acl from acl in c_acl.DefaultIfEmpty() where !c.SubjectToAcl || allowedCustomerRolesIds.Contains(acl.CustomerRoleId) select c; } if (storeId > 0 && !_catalogSettings.IgnoreStoreLimitations) { //Store mapping query = from c in query join sm in _storeMappingRepository.Table on new {c1 = c.Id, c2 = nameof(Category)} equals new { c1 = sm.EntityId, c2 = sm.EntityName } into c_sm from sm in c_sm.DefaultIfEmpty() where !c.LimitedToStores || storeId == sm.StoreId select c; } query = query.Distinct(); } ======= >>>>>>> <<<<<<< if (!_catalogSettings.IgnoreAcl) { //ACL (access control list) var allowedCustomerRolesIds = await _customerService.GetCustomerRoleIdsAsync(await _workContext.GetCurrentCustomerAsync()); query = from c in query join acl in _aclRepository.Table on new {c1 = c.Id, c2 = nameof(Category)} equals new {c1 = acl.EntityId, c2 = acl.EntityName} into c_acl from acl in c_acl.DefaultIfEmpty() where !c.SubjectToAcl || allowedCustomerRolesIds.Contains(acl.CustomerRoleId) select c; } if (!_catalogSettings.IgnoreStoreLimitations) { //Store mapping var currentStoreId = (await _storeContext.GetCurrentStoreAsync()).Id; query = from c in query join sm in _storeMappingRepository.Table on new {c1 = c.Id, c2 = nameof(Category)} equals new {c1 = sm.EntityId, c2 = sm.EntityName} into c_sm from sm in c_sm.DefaultIfEmpty() where !c.LimitedToStores || currentStoreId == sm.StoreId select c; } query = query.Distinct(); ======= query = FilterHiddenEntries(query, _storeContext.CurrentStore.Id, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer)); >>>>>>> query = FilterHiddenEntries(query, _storeContext.CurrentStore.Id, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer)); <<<<<<< public virtual async Task<IList<Category>> GetAllCategoriesDisplayedOnHomepageAsync(bool showHidden = false) { var categories = await _categoryRepository.GetAllAsync(query => ======= public virtual IList<Category> GetAllCategoriesDisplayedOnHomepage(bool showHidden = false) { var categories = _categoryRepository.GetAll(query => >>>>>>> public virtual async Task<IList<Category>> GetAllCategoriesDisplayedOnHomepageAsync(bool showHidden = false) { var categories = await _categoryRepository.GetAllAsync(query => <<<<<<< /// <returns> Product category mapping collection</returns> public virtual async Task<IList<ProductCategory>> GetProductCategoriesByProductIdAsync(int productId, int storeId, ======= /// <returns>Product category mapping collection</returns> public virtual IList<ProductCategory> GetProductCategoriesByProductId(int productId, int storeId, >>>>>>> /// <returns>Product category mapping collection</returns> public virtual async Task<IList<ProductCategory>> GetProductCategoriesByProductIdAsync(int productId, int storeId,
<<<<<<< int billingAddressId; int.TryParse(model.Form["billing_address_id"], out billingAddressId); ======= int.TryParse(form["billing_address_id"], out int billingAddressId); >>>>>>> int.TryParse(model.Form["billing_address_id"], out int billingAddressId); <<<<<<< int shippingAddressId; int.TryParse(model.Form["shipping_address_id"], out shippingAddressId); ======= int.TryParse(form["shipping_address_id"], out int shippingAddressId); >>>>>>> int.TryParse(model.Form["shipping_address_id"], out int shippingAddressId);
<<<<<<< var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.BlogMonthsModelKey, await _workContext.GetWorkingLanguage(), await _storeContext.GetCurrentStore()); var cachedModel = await _staticCacheManager.Get(cacheKey, async () => ======= var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.BlogMonthsModelKey, _workContext.WorkingLanguage, _storeContext.CurrentStore); var cachedModel = _staticCacheManager.Get(cacheKey, () => >>>>>>> var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.BlogMonthsModelKey, await _workContext.GetWorkingLanguage(), await _storeContext.GetCurrentStore()); var cachedModel = await _staticCacheManager.Get(cacheKey, async () =>
<<<<<<< if (activityLogType == null) throw new ArgumentNullException(nameof(activityLogType)); await _activityLogTypeRepository.Insert(activityLogType); //event notification await _eventPublisher.EntityInserted(activityLogType); ======= _activityLogTypeRepository.Insert(activityLogType); >>>>>>> await _activityLogTypeRepository.Insert(activityLogType); <<<<<<< if (activityLogType == null) throw new ArgumentNullException(nameof(activityLogType)); await _activityLogTypeRepository.Update(activityLogType); //event notification await _eventPublisher.EntityUpdated(activityLogType); ======= _activityLogTypeRepository.Update(activityLogType); >>>>>>> await _activityLogTypeRepository.Update(activityLogType); <<<<<<< if (activityLogType == null) throw new ArgumentNullException(nameof(activityLogType)); await _activityLogTypeRepository.Delete(activityLogType); //event notification await _eventPublisher.EntityDeleted(activityLogType); ======= _activityLogTypeRepository.Delete(activityLogType); >>>>>>> await _activityLogTypeRepository.Delete(activityLogType); <<<<<<< var query = from alt in _activityLogTypeRepository.Table orderby alt.Name select alt; var activityLogTypes = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopLoggingDefaults.ActivityTypeAllCacheKey)); ======= var activityLogTypes = _activityLogTypeRepository.GetAll(query=> { return from alt in query orderby alt.Name select alt; }, cache => default); >>>>>>> var activityLogTypes = await _activityLogTypeRepository.GetAll(query=> { return from alt in query orderby alt.Name select alt; }, cache => default); <<<<<<< if (activityLogTypeId == 0) return null; return await _activityLogTypeRepository.ToCachedGetById(activityLogTypeId); ======= return _activityLogTypeRepository.GetById(activityLogTypeId, cache => default); >>>>>>> return await _activityLogTypeRepository.GetById(activityLogTypeId, cache => default); <<<<<<< //event notification await _eventPublisher.EntityInserted(logItem); ======= >>>>>>> <<<<<<< if (activityLog == null) throw new ArgumentNullException(nameof(activityLog)); await _activityLogRepository.Delete(activityLog); //event notification await _eventPublisher.EntityDeleted(activityLog); ======= _activityLogRepository.Delete(activityLog); >>>>>>> await _activityLogRepository.Delete(activityLog); <<<<<<< return await query.ToPagedList(pageIndex, pageSize); ======= return query; }, pageIndex, pageSize); >>>>>>> return query; }, pageIndex, pageSize); <<<<<<< if (activityLogId == 0) return null; return await _activityLogRepository.GetById(activityLogId); ======= return _activityLogRepository.GetById(activityLogId); >>>>>>> return await _activityLogRepository.GetById(activityLogId);
<<<<<<< protected override async Task ClearCache(NewsItem entity) ======= /// <param name="entityEventType">Entity event type</param> protected override void ClearCache(NewsItem entity, EntityEventType entityEventType) >>>>>>> /// <param name="entityEventType">Entity event type</param> protected override async Task ClearCache(NewsItem entity, EntityEventType entityEventType) <<<<<<< await RemoveByPrefix(NopNewsDefaults.NewsCommentsNumberPrefix, entity); ======= if (entityEventType == EntityEventType.Delete) RemoveByPrefix(NopNewsDefaults.NewsCommentsNumberPrefix, entity); base.ClearCache(entity, entityEventType); >>>>>>> if (entityEventType == EntityEventType.Delete) await RemoveByPrefix(NopNewsDefaults.NewsCommentsNumberPrefix, entity); await base.ClearCache(entity, entityEventType);
<<<<<<< if (storeMapping == null) throw new ArgumentNullException(nameof(storeMapping)); await _storeMappingRepository.Delete(storeMapping); //event notification await _eventPublisher.EntityDeleted(storeMapping); ======= _storeMappingRepository.Delete(storeMapping); >>>>>>> await _storeMappingRepository.Delete(storeMapping); <<<<<<< if (storeMappingId == 0) return null; return await _storeMappingRepository.GetById(storeMappingId); ======= return _storeMappingRepository.GetById(storeMappingId); >>>>>>> return await _storeMappingRepository.GetById(storeMappingId); <<<<<<< var storeMappings = await query.ToCachedList(key); ======= var storeMappings = _staticCacheManager.Get(key, query.ToList); >>>>>>> var storeMappings = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (storeMapping == null) throw new ArgumentNullException(nameof(storeMapping)); await _storeMappingRepository.Insert(storeMapping); //event notification await _eventPublisher.EntityInserted(storeMapping); ======= _storeMappingRepository.Insert(storeMapping); >>>>>>> await _storeMappingRepository.Insert(storeMapping); <<<<<<< return await query.ToCachedArray(key); ======= return _staticCacheManager.Get(key, query.ToArray); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToArrayAsync());
<<<<<<< using System.Collections.Generic; using System.Threading.Tasks; ======= using System; using System.Collections.Generic; using System.Linq.Expressions; >>>>>>> using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Linq.Expressions;
<<<<<<< ======= //redis connection wrapper if (appSettings.RedisConfig.Enabled) { services.AddSingleton<ILocker, RedisConnectionWrapper>(); services.AddSingleton<IRedisConnectionWrapper, RedisConnectionWrapper>(); } >>>>>>> <<<<<<< /// <summary> /// Setting source /// </summary> public class SettingsSource : IRegistrationSource { private static readonly MethodInfo _buildMethod = typeof(SettingsSource).GetMethod("BuildRegistration", BindingFlags.Static | BindingFlags.NonPublic); /// <summary> /// Registrations for /// </summary> /// <param name="service">Service</param> /// <param name="registrations">Registrations</param> /// <returns>Registrations</returns> public IEnumerable<IComponentRegistration> RegistrationsFor(Service service, Func<Service, IEnumerable<ServiceRegistration>> registrations) { var ts = service as TypedService; if (ts != null && typeof(ISettings).IsAssignableFrom(ts.ServiceType)) { var buildMethod = _buildMethod.MakeGenericMethod(ts.ServiceType); yield return (IComponentRegistration)buildMethod.Invoke(null, null); } } private static IComponentRegistration BuildRegistration<TSettings>() where TSettings : ISettings, new() { return RegistrationBuilder .ForDelegate((c, p) => { Store store; try { store = c.Resolve<IStoreContext>().GetCurrentStore(); } catch { if (!DataSettingsManager.IsDatabaseInstalled()) store = null; else throw; } var currentStoreId = store?.Id ?? 0; //uncomment the code below if you want load settings per store only when you have two stores installed. //var currentStoreId = c.Resolve<IStoreService>().GetAllStores().Count > 1 // c.Resolve<IStoreContext>().CurrentStore.Id : 0; //although it's better to connect to your database and execute the following SQL: //DELETE FROM [Setting] WHERE [StoreId] > 0 try { return c.Resolve<ISettingService>().LoadSettingAsync<TSettings>(currentStoreId).Result; } catch { if (DataSettingsManager.IsDatabaseInstalled()) throw; } return default; }) .InstancePerLifetimeScope() .CreateRegistration(); } /// <summary> /// Is adapter for individual components /// </summary> public bool IsAdapterForIndividualComponents => false; } ======= >>>>>>>
<<<<<<< var rez = await _staticCacheManager.Get(_cacheKeyService.PrepareKeyForShortTermCache(_carriersCacheKey), async () => ======= var rez = _staticCacheManager.Get(_staticCacheManager.PrepareKeyForShortTermCache(_carriersCacheKey), () => >>>>>>> var rez = await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForShortTermCache(_carriersCacheKey), async () => <<<<<<< /// <param name="orderNumber"></param> /// <param name="carrier"></param> /// <param name="service"></param> /// <param name="trackingNumber"></param> public async Task CreateOrUpadeteShipping(string orderNumber, string carrier, string service, string trackingNumber) ======= /// <param name="orderNumber">Order number</param> /// <param name="carrier">Carrier</param> /// <param name="service">Service</param> /// <param name="trackingNumber">Tracking number</param> public void CreateOrUpdateShipping(string orderNumber, string carrier, string service, string trackingNumber) >>>>>>> /// <param name="orderNumber">Order number</param> /// <param name="carrier">Carrier</param> /// <param name="service">Service</param> /// <param name="trackingNumber">Tracking number</param> public async Task CreateOrUpdateShipping(string orderNumber, string carrier, string service, string trackingNumber) <<<<<<< foreach (var orderItem in await _orderService.GetOrderItems(order.Id)) ======= _shipmentService.InsertShipment(shipment); foreach (var orderItem in _orderService.GetOrderItems(order.Id)) >>>>>>> await _shipmentService.InsertShipment(shipment); foreach (var orderItem in await _orderService.GetOrderItems(order.Id)) <<<<<<< await _shipmentService.InsertShipment(shipment); ======= _shipmentService.UpdateShipment(shipment); >>>>>>> await _shipmentService.UpdateShipment(shipment);
<<<<<<< return AsBaseUnit().Equals(((Energy) obj).AsBaseUnit()); ======= var objQuantity = (Energy)obj; return _value.Equals(objQuantity.AsBaseNumericType(this.Unit)); } /// <summary> /// <para> /// Compare equality to another Energy within the given absolute or relative tolerance. /// </para> /// <para> /// Relative tolerance is defined as the maximum allowable absolute difference between this quantity's value and /// <paramref name="other"/> as a percentage of this quantity's value. <paramref name="other"/> will be converted into /// this quantity's unit for comparison. A relative tolerance of 0.01 means the absolute difference must be within +/- 1% of /// this quantity's value to be considered equal. /// <example> /// In this example, the two quantities will be equal if the value of b is within +/- 1% of a (0.02m or 2cm). /// <code> /// var a = Length.FromMeters(2.0); /// var b = Length.FromInches(50.0); /// a.Equals(b, 0.01, ComparisonType.Relative); /// </code> /// </example> /// </para> /// <para> /// Absolute tolerance is defined as the maximum allowable absolute difference between this quantity's value and /// <paramref name="other"/> as a fixed number in this quantity's unit. <paramref name="other"/> will be converted into /// this quantity's unit for comparison. /// <example> /// In this example, the two quantities will be equal if the value of b is within 0.01 of a (0.01m or 1cm). /// <code> /// var a = Length.FromMeters(2.0); /// var b = Length.FromInches(50.0); /// a.Equals(b, 0.01, ComparisonType.Absolute); /// </code> /// </example> /// </para> /// <para> /// Note that it is advised against specifying zero difference, due to the nature /// of floating point operations and using System.Double internally. /// </para> /// </summary> /// <param name="other">The other quantity to compare to.</param> /// <param name="tolerance">The absolute or relative tolerance value. Must be greater than or equal to 0.</param> /// <param name="comparisonType">The comparison type: either relative or absolute.</param> /// <returns>True if the absolute difference between the two values is not greater than the specified relative or absolute tolerance.</returns> public bool Equals(Energy other, double tolerance, ComparisonType comparisonType) { if(tolerance < 0) throw new ArgumentOutOfRangeException("tolerance", "Tolerance must be greater than or equal to 0."); double thisValue = (double)this.Value; double otherValueInThisUnits = other.As(this.Unit); return UnitsNet.Comparison.Equals(thisValue, otherValueInThisUnits, tolerance, comparisonType); >>>>>>> var objQuantity = (Energy)obj; return _value.Equals(objQuantity.AsBaseNumericType(this.Unit)); } /// <summary> /// <para> /// Compare equality to another Energy within the given absolute or relative tolerance. /// </para> /// <para> /// Relative tolerance is defined as the maximum allowable absolute difference between this quantity's value and /// <paramref name="other"/> as a percentage of this quantity's value. <paramref name="other"/> will be converted into /// this quantity's unit for comparison. A relative tolerance of 0.01 means the absolute difference must be within +/- 1% of /// this quantity's value to be considered equal. /// <example> /// In this example, the two quantities will be equal if the value of b is within +/- 1% of a (0.02m or 2cm). /// <code> /// var a = Length.FromMeters(2.0); /// var b = Length.FromInches(50.0); /// a.Equals(b, 0.01, ComparisonType.Relative); /// </code> /// </example> /// </para> /// <para> /// Absolute tolerance is defined as the maximum allowable absolute difference between this quantity's value and /// <paramref name="other"/> as a fixed number in this quantity's unit. <paramref name="other"/> will be converted into /// this quantity's unit for comparison. /// <example> /// In this example, the two quantities will be equal if the value of b is within 0.01 of a (0.01m or 1cm). /// <code> /// var a = Length.FromMeters(2.0); /// var b = Length.FromInches(50.0); /// a.Equals(b, 0.01, ComparisonType.Absolute); /// </code> /// </example> /// </para> /// <para> /// Note that it is advised against specifying zero difference, due to the nature /// of floating point operations and using System.Double internally. /// </para> /// </summary> /// <param name="other">The other quantity to compare to.</param> /// <param name="tolerance">The absolute or relative tolerance value. Must be greater than or equal to 0.</param> /// <param name="comparisonType">The comparison type: either relative or absolute.</param> /// <returns>True if the absolute difference between the two values is not greater than the specified relative or absolute tolerance.</returns> public bool Equals(Energy other, double tolerance, ComparisonType comparisonType) { if(tolerance < 0) throw new ArgumentOutOfRangeException("tolerance", "Tolerance must be greater than or equal to 0."); double thisValue = (double)this.Value; double otherValueInThisUnits = other.As(this.Unit); return UnitsNet.Comparison.Equals(thisValue, otherValueInThisUnits, tolerance, comparisonType); <<<<<<< return Math.Abs(AsBaseUnit() - other.AsBaseUnit()) <= maxError.AsBaseUnit(); ======= return Math.Abs(_value - other.AsBaseNumericType(this.Unit)) <= maxError.AsBaseNumericType(this.Unit); >>>>>>> return Math.Abs(_value - other.AsBaseNumericType(this.Unit)) <= maxError.AsBaseNumericType(this.Unit); <<<<<<< ======= /// Converts the current value + unit to the base unit. /// This is typically the first step in converting from one unit to another. /// </summary> /// <returns>The value in the base unit representation.</returns> private double AsBaseUnitJoules() { if (Unit == EnergyUnit.Joule) { return _value; } switch (Unit) { case EnergyUnit.BritishThermalUnit: return _value*1055.05585262; case EnergyUnit.Calorie: return _value*4.184; case EnergyUnit.DecathermEc: return (_value*1.05505585262e8) * 1e1d; case EnergyUnit.DecathermImperial: return (_value*1.05505585257348e8) * 1e1d; case EnergyUnit.DecathermUs: return (_value*1.054804e8) * 1e1d; case EnergyUnit.ElectronVolt: return _value*1.602176565e-19; case EnergyUnit.Erg: return _value*1e-7; case EnergyUnit.FootPound: return _value*1.355817948; case EnergyUnit.GigabritishThermalUnit: return (_value*1055.05585262) * 1e9d; case EnergyUnit.GigawattHour: return (_value*3600d) * 1e9d; case EnergyUnit.Joule: return _value; case EnergyUnit.KilobritishThermalUnit: return (_value*1055.05585262) * 1e3d; case EnergyUnit.Kilocalorie: return (_value*4.184) * 1e3d; case EnergyUnit.Kilojoule: return (_value) * 1e3d; case EnergyUnit.KilowattHour: return (_value*3600d) * 1e3d; case EnergyUnit.MegabritishThermalUnit: return (_value*1055.05585262) * 1e6d; case EnergyUnit.Megajoule: return (_value) * 1e6d; case EnergyUnit.MegawattHour: return (_value*3600d) * 1e6d; case EnergyUnit.ThermEc: return _value*1.05505585262e8; case EnergyUnit.ThermImperial: return _value*1.05505585257348e8; case EnergyUnit.ThermUs: return _value*1.054804e8; case EnergyUnit.WattHour: return _value*3600d; default: throw new NotImplementedException("Unit not implemented: " + Unit); } } /// <summary>Convenience method for working with internal numeric type.</summary> private double AsBaseNumericType(EnergyUnit unit) => Convert.ToDouble(As(unit)); /// <summary> >>>>>>>
<<<<<<< await Remove(NopForumDefaults.ForumGroupAllCacheKey); var cacheKey = _cacheKeyService.PrepareKey(NopForumDefaults.ForumAllByForumGroupIdCacheKey, entity); await Remove(cacheKey); ======= Remove(NopForumDefaults.ForumByForumGroupCacheKey, entity); >>>>>>> await Remove(NopForumDefaults.ForumByForumGroupCacheKey, entity);
<<<<<<< if (productAttribute == null) throw new ArgumentNullException(nameof(productAttribute)); await _productAttributeRepository.Delete(productAttribute); //event notification await _eventPublisher.EntityDeleted(productAttribute); ======= _productAttributeRepository.Delete(productAttribute); >>>>>>> await _productAttributeRepository.Delete(productAttribute); <<<<<<< var query = from pa in _productAttributeRepository.Table orderby pa.Name select pa; var productAttributes = await query.ToPagedList(pageIndex, pageSize); ======= var productAttributes = _productAttributeRepository.GetAllPaged(query => { return from pa in query orderby pa.Name select pa; }, pageIndex, pageSize); >>>>>>> var productAttributes = await _productAttributeRepository.GetAllPaged(query => { return from pa in query orderby pa.Name select pa; }, pageIndex, pageSize); <<<<<<< if (productAttributeId == 0) return null; return await _productAttributeRepository.ToCachedGetById(productAttributeId); ======= return _productAttributeRepository.GetById(productAttributeId, cache => default); >>>>>>> return await _productAttributeRepository.GetById(productAttributeId, cache => default); <<<<<<< if (productAttributeIds == null || productAttributeIds.Length == 0) return new List<ProductAttribute>(); var query = from p in _productAttributeRepository.Table where productAttributeIds.Contains(p.Id) select p; return await query.ToListAsync(); ======= return _productAttributeRepository.GetByIds(productAttributeIds); >>>>>>> return await _productAttributeRepository.GetByIds(productAttributeIds); <<<<<<< if (productAttribute == null) throw new ArgumentNullException(nameof(productAttribute)); await _productAttributeRepository.Insert(productAttribute); //event notification await _eventPublisher.EntityInserted(productAttribute); ======= _productAttributeRepository.Insert(productAttribute); >>>>>>> await _productAttributeRepository.Insert(productAttribute); <<<<<<< if (productAttribute == null) throw new ArgumentNullException(nameof(productAttribute)); await _productAttributeRepository.Update(productAttribute); //event notification await _eventPublisher.EntityUpdated(productAttribute); ======= _productAttributeRepository.Update(productAttribute); >>>>>>> await _productAttributeRepository.Update(productAttribute); <<<<<<< if (productAttributeMapping == null) throw new ArgumentNullException(nameof(productAttributeMapping)); await _productAttributeMappingRepository.Delete(productAttributeMapping); //event notification await _eventPublisher.EntityDeleted(productAttributeMapping); ======= _productAttributeMappingRepository.Delete(productAttributeMapping); >>>>>>> await _productAttributeMappingRepository.Delete(productAttributeMapping); <<<<<<< var attributes = await query.ToCachedList(allCacheKey) ?? new List<ProductAttributeMapping>(); ======= var attributes = _staticCacheManager.Get(allCacheKey, query.ToList) ?? new List<ProductAttributeMapping>(); >>>>>>> var attributes = await _staticCacheManager.Get(allCacheKey, async () => await query.ToAsyncEnumerable().ToListAsync()) ?? new List<ProductAttributeMapping>(); <<<<<<< if (productAttributeMappingId == 0) return null; return await _productAttributeMappingRepository.ToCachedGetById(productAttributeMappingId); ======= return _productAttributeMappingRepository.GetById(productAttributeMappingId, cache => default); >>>>>>> return await _productAttributeMappingRepository.GetById(productAttributeMappingId, cache => default); <<<<<<< if (productAttributeMapping == null) throw new ArgumentNullException(nameof(productAttributeMapping)); await _productAttributeMappingRepository.Insert(productAttributeMapping); //event notification await _eventPublisher.EntityInserted(productAttributeMapping); ======= _productAttributeMappingRepository.Insert(productAttributeMapping); >>>>>>> await _productAttributeMappingRepository.Insert(productAttributeMapping); <<<<<<< if (productAttributeMapping == null) throw new ArgumentNullException(nameof(productAttributeMapping)); await _productAttributeMappingRepository.Update(productAttributeMapping); //event notification await _eventPublisher.EntityUpdated(productAttributeMapping); ======= _productAttributeMappingRepository.Update(productAttributeMapping); >>>>>>> await _productAttributeMappingRepository.Update(productAttributeMapping); <<<<<<< if (productAttributeValue == null) throw new ArgumentNullException(nameof(productAttributeValue)); await _productAttributeValueRepository.Delete(productAttributeValue); //event notification await _eventPublisher.EntityDeleted(productAttributeValue); ======= _productAttributeValueRepository.Delete(productAttributeValue); >>>>>>> await _productAttributeValueRepository.Delete(productAttributeValue); <<<<<<< var productAttributeValues = await query.ToCachedList(key); ======= var productAttributeValues = _staticCacheManager.Get(key, query.ToList); >>>>>>> var productAttributeValues = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (productAttributeValueId == 0) return null; return await _productAttributeValueRepository.ToCachedGetById(productAttributeValueId); ======= return _productAttributeValueRepository.GetById(productAttributeValueId, cache => default); >>>>>>> return await _productAttributeValueRepository.GetById(productAttributeValueId, cache => default); <<<<<<< if (productAttributeValue == null) throw new ArgumentNullException(nameof(productAttributeValue)); await _productAttributeValueRepository.Insert(productAttributeValue); //event notification await _eventPublisher.EntityInserted(productAttributeValue); ======= _productAttributeValueRepository.Insert(productAttributeValue); >>>>>>> await _productAttributeValueRepository.Insert(productAttributeValue); <<<<<<< if (productAttributeValue == null) throw new ArgumentNullException(nameof(productAttributeValue)); await _productAttributeValueRepository.Update(productAttributeValue); //event notification await _eventPublisher.EntityUpdated(productAttributeValue); ======= _productAttributeValueRepository.Update(productAttributeValue); >>>>>>> await _productAttributeValueRepository.Update(productAttributeValue); <<<<<<< if (ppav == null) throw new ArgumentNullException(nameof(ppav)); await _predefinedProductAttributeValueRepository.Delete(ppav); //event notification await _eventPublisher.EntityDeleted(ppav); ======= _predefinedProductAttributeValueRepository.Delete(ppav); >>>>>>> await _predefinedProductAttributeValueRepository.Delete(ppav); <<<<<<< var values = await query.ToCachedList(key); ======= var values = _staticCacheManager.Get(key, query.ToList); >>>>>>> var values = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (id == 0) return null; return await _predefinedProductAttributeValueRepository.ToCachedGetById(id); ======= return _predefinedProductAttributeValueRepository.GetById(id, cache => default); >>>>>>> return await _predefinedProductAttributeValueRepository.GetById(id, cache => default); <<<<<<< if (ppav == null) throw new ArgumentNullException(nameof(ppav)); await _predefinedProductAttributeValueRepository.Insert(ppav); //event notification await _eventPublisher.EntityInserted(ppav); ======= _predefinedProductAttributeValueRepository.Insert(ppav); >>>>>>> await _predefinedProductAttributeValueRepository.Insert(ppav); <<<<<<< if (ppav == null) throw new ArgumentNullException(nameof(ppav)); await _predefinedProductAttributeValueRepository.Update(ppav); //event notification await _eventPublisher.EntityUpdated(ppav); ======= _predefinedProductAttributeValueRepository.Update(ppav); >>>>>>> await _predefinedProductAttributeValueRepository.Update(ppav); <<<<<<< if (combination == null) throw new ArgumentNullException(nameof(combination)); await _productAttributeCombinationRepository.Delete(combination); //event notification await _eventPublisher.EntityDeleted(combination); ======= _productAttributeCombinationRepository.Delete(combination); >>>>>>> await _productAttributeCombinationRepository.Delete(combination); <<<<<<< var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductAttributeCombinationsAllCacheKey, productId); var query = from c in _productAttributeCombinationRepository.Table orderby c.Id where c.ProductId == productId select c; var combinations = await query.ToCachedList(key); ======= var combinations = _productAttributeCombinationRepository.GetAll(query => { return from c in query orderby c.Id where c.ProductId == productId select c; }, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductAttributeCombinationsByProductCacheKey, productId)); >>>>>>> var combinations = await _productAttributeCombinationRepository.GetAll(query => { return from c in query orderby c.Id where c.ProductId == productId select c; }, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductAttributeCombinationsByProductCacheKey, productId)); <<<<<<< if (productAttributeCombinationId == 0) return null; return await _productAttributeCombinationRepository.ToCachedGetById(productAttributeCombinationId); ======= return _productAttributeCombinationRepository.GetById(productAttributeCombinationId, cache => default); >>>>>>> return await _productAttributeCombinationRepository.GetById(productAttributeCombinationId, cache => default); <<<<<<< if (combination == null) throw new ArgumentNullException(nameof(combination)); await _productAttributeCombinationRepository.Insert(combination); //event notification await _eventPublisher.EntityInserted(combination); ======= _productAttributeCombinationRepository.Insert(combination); >>>>>>> await _productAttributeCombinationRepository.Insert(combination); <<<<<<< if (combination == null) throw new ArgumentNullException(nameof(combination)); await _productAttributeCombinationRepository.Update(combination); //event notification await _eventPublisher.EntityUpdated(combination); ======= _productAttributeCombinationRepository.Update(combination); >>>>>>> await _productAttributeCombinationRepository.Update(combination);
<<<<<<< if (country == null) throw new ArgumentNullException(nameof(country)); await _countryRepository.Delete(country); //event notification await _eventPublisher.EntityDeleted(country); ======= _countryRepository.Delete(country); >>>>>>> await _countryRepository.Delete(country); <<<<<<< //Store mapping var currentStoreId = (await _storeContext.GetCurrentStore()).Id; query = from c in query ======= if (!showHidden) query = query.Where(c => c.Published); if (!showHidden && !_catalogSettings.IgnoreStoreLimitations) { //Store mapping var currentStoreId = _storeContext.CurrentStore.Id; query = from c in query >>>>>>> if (!showHidden) query = query.Where(c => c.Published); if (!showHidden && !_catalogSettings.IgnoreStoreLimitations) { //Store mapping var currentStoreId = _storeContext.GetCurrentStore().Result.Id; query = from c in query <<<<<<< var countries = await query.ToListAsync(); ======= return query.OrderBy(c => c.DisplayOrder).ThenBy(c => c.Name); }); >>>>>>> return query.OrderBy(c => c.DisplayOrder).ThenBy(c => c.Name); }); <<<<<<< if (countryId == 0) return null; return await _countryRepository.ToCachedGetById(countryId); ======= return _countryRepository.GetById(countryId, cache => default); >>>>>>> return await _countryRepository.GetById(countryId, cache => default); <<<<<<< if (countryIds == null || countryIds.Length == 0) return new List<Country>(); var query = from c in _countryRepository.Table where countryIds.Contains(c.Id) select c; var countries = await query.ToListAsync(); //sort by passed identifiers var sortedCountries = new List<Country>(); foreach (var id in countryIds) { var country = countries.Find(x => x.Id == id); if (country != null) sortedCountries.Add(country); } return sortedCountries; ======= return _countryRepository.GetByIds(countryIds); >>>>>>> return await _countryRepository.GetByIds(countryIds); <<<<<<< return await query.ToCachedFirstOrDefault(key); ======= return _staticCacheManager.Get(key, query.FirstOrDefault); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync()); <<<<<<< return await query.ToCachedFirstOrDefault(key); ======= return _staticCacheManager.Get(key, query.FirstOrDefault); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync()); <<<<<<< if (country == null) throw new ArgumentNullException(nameof(country)); await _countryRepository.Insert(country); //event notification await _eventPublisher.EntityInserted(country); ======= _countryRepository.Insert(country); >>>>>>> await _countryRepository.Insert(country); <<<<<<< if (country == null) throw new ArgumentNullException(nameof(country)); await _countryRepository.Update(country); //event notification await _eventPublisher.EntityUpdated(country); ======= _countryRepository.Update(country); >>>>>>> await _countryRepository.Update(country);
<<<<<<< await Remove(NopCustomerServicesDefaults.CustomerAttributesAllCacheKey); await Remove(_cacheKeyService.PrepareKey(NopCustomerServicesDefaults.CustomerAttributeValuesAllCacheKey, entity.CustomerAttributeId)); ======= Remove(NopCustomerServicesDefaults.CustomerAttributeValuesByAttributeCacheKey, entity.CustomerAttributeId); >>>>>>> await Remove(NopCustomerServicesDefaults.CustomerAttributeValuesByAttributeCacheKey, entity.CustomerAttributeId);
<<<<<<< public async Task<TEntity> InsertEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity ======= public virtual TEntity InsertEntity<TEntity>(TEntity entity) where TEntity : BaseEntity >>>>>>> public virtual async Task<TEntity> InsertEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity <<<<<<< public async Task UpdateEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity ======= public virtual void UpdateEntity<TEntity>(TEntity entity) where TEntity : BaseEntity >>>>>>> public virtual async Task UpdateEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity <<<<<<< public async Task DeleteEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity ======= public virtual void DeleteEntity<TEntity>(TEntity entity) where TEntity : BaseEntity >>>>>>> public virtual async Task DeleteEntityAsync<TEntity>(TEntity entity) where TEntity : BaseEntity <<<<<<< public async Task BulkDeleteEntitiesAsync<TEntity>(IList<TEntity> entities) where TEntity : BaseEntity ======= public virtual void BulkDeleteEntities<TEntity>(IList<TEntity> entities) where TEntity : BaseEntity >>>>>>> public virtual async Task BulkDeleteEntitiesAsync<TEntity>(IList<TEntity> entities) where TEntity : BaseEntity <<<<<<< public async Task BulkInsertEntitiesAsync<TEntity>(IEnumerable<TEntity> entities) where TEntity : BaseEntity ======= public virtual void BulkInsertEntities<TEntity>(IEnumerable<TEntity> entities) where TEntity : BaseEntity >>>>>>> public virtual async Task BulkInsertEntitiesAsync<TEntity>(IEnumerable<TEntity> entities) where TEntity : BaseEntity <<<<<<< public async Task<int> ExecuteNonQueryAsync(string sqlStatement, params DataParameter[] dataParameters) ======= public virtual int ExecuteNonQuery(string sqlStatement, params DataParameter[] dataParameters) >>>>>>> public virtual async Task<int> ExecuteNonQueryAsync(string sqlStatement, params DataParameter[] dataParameters) <<<<<<< public async Task<T> ExecuteStoredProcedureAsync<T>(string procedureName, params DataParameter[] parameters) ======= public virtual T ExecuteStoredProcedure<T>(string procedureName, params DataParameter[] parameters) >>>>>>> public virtual async Task<T> ExecuteStoredProcedureAsync<T>(string procedureName, params DataParameter[] parameters) <<<<<<< public async Task<int> ExecuteStoredProcedureAsync(string procedureName, params DataParameter[] parameters) ======= public virtual int ExecuteStoredProcedure(string procedureName, params DataParameter[] parameters) >>>>>>> public virtual async Task<int> ExecuteStoredProcedureAsync(string procedureName, params DataParameter[] parameters) <<<<<<< public async Task<IList<T>> QueryProcAsync<T>(string procedureName, params DataParameter[] parameters) ======= public virtual IList<T> QueryProc<T>(string procedureName, params DataParameter[] parameters) >>>>>>> public virtual async Task<IList<T>> QueryProcAsync<T>(string procedureName, params DataParameter[] parameters) <<<<<<< public async Task<IList<T>> QueryAsync<T>(string sql, params DataParameter[] parameters) ======= public virtual IList<T> Query<T>(string sql, params DataParameter[] parameters) >>>>>>> public virtual async Task<IList<T>> QueryAsync<T>(string sql, params DataParameter[] parameters)
<<<<<<< var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagCountCacheKey, storeId, await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()), ======= var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagCountCacheKey, storeId, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer), >>>>>>> var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagCountCacheKey, storeId, _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()), <<<<<<< if (productTag == null) throw new ArgumentNullException(nameof(productTag)); await _productTagRepository.Delete(productTag); //event notification await _eventPublisher.EntityDeleted(productTag); ======= _productTagRepository.Delete(productTag); >>>>>>> await _productTagRepository.Delete(productTag); <<<<<<< var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagAllByProductIdCacheKey, productId); var query = from pt in _productTagRepository.Table join ppt in _productProductTagMappingRepository.Table on pt.Id equals ppt.ProductTagId where ppt.ProductId == productId orderby pt.Id select pt; var productTags = await query.ToCachedList(key); ======= var productTags = _productTagRepository.GetAll(query => { return from pt in query join ppt in _productProductTagMappingRepository.Table on pt.Id equals ppt.ProductTagId where ppt.ProductId == productId orderby pt.Id select pt; }, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagsByProductCacheKey, productId)); >>>>>>> var productTags = await _productTagRepository.GetAll(query => { return from pt in query join ppt in _productProductTagMappingRepository.Table on pt.Id equals ppt.ProductTagId where ppt.ProductId == productId orderby pt.Id select pt; }, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductTagsByProductCacheKey, productId)); <<<<<<< if (productTagId == 0) return null; return await _productTagRepository.ToCachedGetById(productTagId); ======= return _productTagRepository.GetById(productTagId, cache => default); >>>>>>> return await _productTagRepository.GetById(productTagId, cache => default); <<<<<<< if (productTagIds == null || productTagIds.Length == 0) return new List<ProductTag>(); var query = from p in _productTagRepository.Table where productTagIds.Contains(p.Id) select p; return await query.ToListAsync(); ======= return _productTagRepository.GetByIds(productTagIds); >>>>>>> return await _productTagRepository.GetByIds(productTagIds); <<<<<<< if (tagMapping is null) throw new ArgumentNullException(nameof(tagMapping)); await _productProductTagMappingRepository.Insert(tagMapping); //event notification await _eventPublisher.EntityInserted(tagMapping); ======= _productProductTagMappingRepository.Insert(tagMapping); >>>>>>> await _productProductTagMappingRepository.Insert(tagMapping); <<<<<<< if (productTag == null) throw new ArgumentNullException(nameof(productTag)); await _productTagRepository.Insert(productTag); //event notification await _eventPublisher.EntityInserted(productTag); ======= _productTagRepository.Insert(productTag); >>>>>>> await _productTagRepository.Insert(productTag); <<<<<<< var seName = await _urlRecordService.ValidateSeName(productTag, string.Empty, productTag.Name, true); await _urlRecordService.SaveSlug(productTag, seName, 0); //event notification await _eventPublisher.EntityUpdated(productTag); ======= var seName = _urlRecordService.ValidateSeName(productTag, string.Empty, productTag.Name, true); _urlRecordService.SaveSlug(productTag, seName, 0); >>>>>>> var seName = await _urlRecordService.ValidateSeName(productTag, string.Empty, productTag.Name, true); await _urlRecordService.SaveSlug(productTag, seName, 0); <<<<<<< await _staticCacheManager.RemoveByPrefix(NopCatalogDefaults.ProductTagPrefixCacheKey); ======= _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<ProductTag>.Prefix); >>>>>>> await _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<ProductTag>.Prefix);
<<<<<<< if (aclRecord == null) throw new ArgumentNullException(nameof(aclRecord)); await _aclRecordRepository.Delete(aclRecord); //event notification await _eventPublisher.EntityDeleted(aclRecord); ======= _aclRecordRepository.Delete(aclRecord); >>>>>>> await _aclRecordRepository.Delete(aclRecord); <<<<<<< if (aclRecordId == 0) return null; return await _aclRecordRepository.ToCachedGetById(aclRecordId); ======= return _aclRecordRepository.GetById(aclRecordId, cache => default); >>>>>>> return await _aclRecordRepository.GetById(aclRecordId, cache => default); <<<<<<< if (aclRecord == null) throw new ArgumentNullException(nameof(aclRecord)); await _aclRecordRepository.Insert(aclRecord); //event notification await _eventPublisher.EntityInserted(aclRecord); ======= _aclRecordRepository.Insert(aclRecord); >>>>>>> await _aclRecordRepository.Insert(aclRecord); <<<<<<< if (aclRecord == null) throw new ArgumentNullException(nameof(aclRecord)); await _aclRecordRepository.Update(aclRecord); //event notification await _eventPublisher.EntityUpdated(aclRecord); ======= _aclRecordRepository.Update(aclRecord); >>>>>>> await _aclRecordRepository.Update(aclRecord); <<<<<<< return await query.ToCachedArray(key); ======= return _staticCacheManager.Get(key, query.ToArray); >>>>>>> return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToArrayAsync());
<<<<<<< if (categoryTemplate == null) throw new ArgumentNullException(nameof(categoryTemplate)); await _categoryTemplateRepository.Delete(categoryTemplate); //event notification await _eventPublisher.EntityDeleted(categoryTemplate); ======= _categoryTemplateRepository.Delete(categoryTemplate); >>>>>>> await _categoryTemplateRepository.Delete(categoryTemplate); <<<<<<< var query = from pt in _categoryTemplateRepository.Table orderby pt.DisplayOrder, pt.Id select pt; var templates = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoryTemplatesAllCacheKey)); ======= var templates = _categoryTemplateRepository.GetAll(query => { return from pt in query orderby pt.DisplayOrder, pt.Id select pt; }, cache => default); >>>>>>> var templates = await _categoryTemplateRepository.GetAll(query => { return from pt in query orderby pt.DisplayOrder, pt.Id select pt; }, cache => default); <<<<<<< if (categoryTemplateId == 0) return null; return await _categoryTemplateRepository.ToCachedGetById(categoryTemplateId); ======= return _categoryTemplateRepository.GetById(categoryTemplateId, cache => default); >>>>>>> return await _categoryTemplateRepository.GetById(categoryTemplateId, cache => default); <<<<<<< if (categoryTemplate == null) throw new ArgumentNullException(nameof(categoryTemplate)); await _categoryTemplateRepository.Insert(categoryTemplate); //event notification await _eventPublisher.EntityInserted(categoryTemplate); ======= _categoryTemplateRepository.Insert(categoryTemplate); >>>>>>> await _categoryTemplateRepository.Insert(categoryTemplate); <<<<<<< if (categoryTemplate == null) throw new ArgumentNullException(nameof(categoryTemplate)); await _categoryTemplateRepository.Update(categoryTemplate); //event notification await _eventPublisher.EntityUpdated(categoryTemplate); ======= _categoryTemplateRepository.Update(categoryTemplate); >>>>>>> await _categoryTemplateRepository.Update(categoryTemplate);
<<<<<<< private readonly IEventPublisher _eventPublisher; ======= >>>>>>> <<<<<<< if (downloadId == 0) return null; return await _downloadRepository.GetById(downloadId); ======= return _downloadRepository.GetById(downloadId); >>>>>>> return await _downloadRepository.GetById(downloadId); <<<<<<< if (download == null) throw new ArgumentNullException(nameof(download)); await _downloadRepository.Delete(download); //event notification await _eventPublisher.EntityDeleted(download); ======= _downloadRepository.Delete(download); >>>>>>> await _downloadRepository.Delete(download); <<<<<<< if (download == null) throw new ArgumentNullException(nameof(download)); await _downloadRepository.Insert(download); //event notification await _eventPublisher.EntityInserted(download); ======= _downloadRepository.Insert(download); >>>>>>> await _downloadRepository.Insert(download); <<<<<<< if (download == null) throw new ArgumentNullException(nameof(download)); await _downloadRepository.Update(download); //event notification await _eventPublisher.EntityUpdated(download); ======= _downloadRepository.Update(download); >>>>>>> await _downloadRepository.Update(download);
<<<<<<< StateProvince = _stateProvinceService.GetStateProvinceById(model.TestAddress?.StateProvinceId ?? 0) }, _workContext.CurrentCustomer.Id.ToString(), "", ""); ======= StateProvinceId = model.TestAddress?.StateProvinceId }, _workContext.CurrentCustomer.Id.ToString()); >>>>>>> StateProvince = model.TestAddress?.StateProvinceId }, _workContext.CurrentCustomer.Id.ToString(), "", "");
<<<<<<< using System.Threading.Tasks; ======= using Nop.Core.Caching; >>>>>>> using System.Threading.Tasks; using Nop.Core.Caching; <<<<<<< if (addressAttribute == null) throw new ArgumentNullException(nameof(addressAttribute)); await _addressAttributeRepository.Delete(addressAttribute); //event notification await _eventPublisher.EntityDeleted(addressAttribute); ======= _addressAttributeRepository.Delete(addressAttribute); >>>>>>> await _addressAttributeRepository.Delete(addressAttribute); <<<<<<< var query = from aa in _addressAttributeRepository.Table orderby aa.DisplayOrder, aa.Id select aa; return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCommonDefaults.AddressAttributesAllCacheKey)); ======= return _addressAttributeRepository.GetAll(query=> { return from aa in query orderby aa.DisplayOrder, aa.Id select aa; }, cache => default); >>>>>>> return await _addressAttributeRepository.GetAll(query=> { return from aa in query orderby aa.DisplayOrder, aa.Id select aa; }, cache => default); <<<<<<< if (addressAttributeId == 0) return null; return await _addressAttributeRepository.ToCachedGetById(addressAttributeId); ======= return _addressAttributeRepository.GetById(addressAttributeId, cache => default); >>>>>>> return await _addressAttributeRepository.GetById(addressAttributeId, cache => default); <<<<<<< if (addressAttribute == null) throw new ArgumentNullException(nameof(addressAttribute)); await _addressAttributeRepository.Insert(addressAttribute); //event notification await _eventPublisher.EntityInserted(addressAttribute); ======= _addressAttributeRepository.Insert(addressAttribute); >>>>>>> await _addressAttributeRepository.Insert(addressAttribute); <<<<<<< if (addressAttribute == null) throw new ArgumentNullException(nameof(addressAttribute)); await _addressAttributeRepository.Update(addressAttribute); //event notification await _eventPublisher.EntityUpdated(addressAttribute); ======= _addressAttributeRepository.Update(addressAttribute); >>>>>>> await _addressAttributeRepository.Update(addressAttribute); <<<<<<< if (addressAttributeValue == null) throw new ArgumentNullException(nameof(addressAttributeValue)); await _addressAttributeValueRepository.Delete(addressAttributeValue); //event notification await _eventPublisher.EntityDeleted(addressAttributeValue); ======= _addressAttributeValueRepository.Delete(addressAttributeValue); >>>>>>> await _addressAttributeValueRepository.Delete(addressAttributeValue); <<<<<<< var addressAttributeValues = await query.ToCachedList(key); ======= var addressAttributeValues = _staticCacheManager.Get(key, query.ToList); >>>>>>> var addressAttributeValues = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); <<<<<<< if (addressAttributeValueId == 0) return null; return await _addressAttributeValueRepository.ToCachedGetById(addressAttributeValueId); ======= return _addressAttributeValueRepository.GetById(addressAttributeValueId, cache => default); >>>>>>> return await _addressAttributeValueRepository.GetById(addressAttributeValueId, cache => default); <<<<<<< if (addressAttributeValue == null) throw new ArgumentNullException(nameof(addressAttributeValue)); await _addressAttributeValueRepository.Insert(addressAttributeValue); //event notification await _eventPublisher.EntityInserted(addressAttributeValue); ======= _addressAttributeValueRepository.Insert(addressAttributeValue); >>>>>>> await _addressAttributeValueRepository.Insert(addressAttributeValue); <<<<<<< if (addressAttributeValue == null) throw new ArgumentNullException(nameof(addressAttributeValue)); await _addressAttributeValueRepository.Update(addressAttributeValue); //event notification await _eventPublisher.EntityUpdated(addressAttributeValue); ======= _addressAttributeValueRepository.Update(addressAttributeValue); >>>>>>> await _addressAttributeValueRepository.Update(addressAttributeValue);
<<<<<<< if (returnRequest == null) throw new ArgumentNullException(nameof(returnRequest)); await _returnRequestRepository.Delete(returnRequest); //event notification await _eventPublisher.EntityDeleted(returnRequest); ======= _returnRequestRepository.Delete(returnRequest); >>>>>>> await _returnRequestRepository.Delete(returnRequest); <<<<<<< if (returnRequestId == 0) return null; return await _returnRequestRepository.GetById(returnRequestId); ======= return _returnRequestRepository.GetById(returnRequestId); >>>>>>> return await _returnRequestRepository.GetById(returnRequestId); <<<<<<< public virtual async Task<IPagedList<ReturnRequest>> SearchReturnRequests(int storeId = 0, int customerId = 0, ======= public virtual IPagedList<ReturnRequest> SearchReturnRequests(int storeId = 0, int customerId = 0, >>>>>>> public virtual async Task<IPagedList<ReturnRequest>> SearchReturnRequests(int storeId = 0, int customerId = 0, <<<<<<< if (returnRequestAction == null) throw new ArgumentNullException(nameof(returnRequestAction)); await _returnRequestActionRepository.Delete(returnRequestAction); //event notification await _eventPublisher.EntityDeleted(returnRequestAction); ======= _returnRequestActionRepository.Delete(returnRequestAction); >>>>>>> await _returnRequestActionRepository.Delete(returnRequestAction); <<<<<<< var query = from rra in _returnRequestActionRepository.Table orderby rra.DisplayOrder, rra.Id select rra; return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopOrderDefaults.ReturnRequestActionAllCacheKey)); ======= return _returnRequestActionRepository.GetAll(query => { return from rra in query orderby rra.DisplayOrder, rra.Id select rra; }, cache => default); >>>>>>> return await _returnRequestActionRepository.GetAll(query => { return from rra in query orderby rra.DisplayOrder, rra.Id select rra; }, cache => default); <<<<<<< if (returnRequestActionId == 0) return null; return await _returnRequestActionRepository.ToCachedGetById(returnRequestActionId); ======= return _returnRequestActionRepository.GetById(returnRequestActionId, cache => default); >>>>>>> return await _returnRequestActionRepository.GetById(returnRequestActionId, cache => default); <<<<<<< if (returnRequest == null) throw new ArgumentNullException(nameof(returnRequest)); await _returnRequestRepository.Insert(returnRequest); //event notification await _eventPublisher.EntityInserted(returnRequest); ======= _returnRequestRepository.Insert(returnRequest); >>>>>>> await _returnRequestRepository.Insert(returnRequest); <<<<<<< if (returnRequestAction == null) throw new ArgumentNullException(nameof(returnRequestAction)); await _returnRequestActionRepository.Insert(returnRequestAction); //event notification await _eventPublisher.EntityInserted(returnRequestAction); ======= _returnRequestActionRepository.Insert(returnRequestAction); >>>>>>> await _returnRequestActionRepository.Insert(returnRequestAction); <<<<<<< if (returnRequest == null) throw new ArgumentNullException(nameof(returnRequest)); await _returnRequestRepository.Update(returnRequest); //event notification await _eventPublisher.EntityUpdated(returnRequest); ======= _returnRequestRepository.Update(returnRequest); >>>>>>> await _returnRequestRepository.Update(returnRequest); <<<<<<< if (returnRequestAction == null) throw new ArgumentNullException(nameof(returnRequestAction)); await _returnRequestActionRepository.Update(returnRequestAction); //event notification await _eventPublisher.EntityUpdated(returnRequestAction); ======= _returnRequestActionRepository.Update(returnRequestAction); >>>>>>> await _returnRequestActionRepository.Update(returnRequestAction); <<<<<<< if (returnRequestReason == null) throw new ArgumentNullException(nameof(returnRequestReason)); await _returnRequestReasonRepository.Delete(returnRequestReason); //event notification await _eventPublisher.EntityDeleted(returnRequestReason); ======= _returnRequestReasonRepository.Delete(returnRequestReason); >>>>>>> await _returnRequestReasonRepository.Delete(returnRequestReason); <<<<<<< var query = from rra in _returnRequestReasonRepository.Table orderby rra.DisplayOrder, rra.Id select rra; return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopOrderDefaults.ReturnRequestReasonAllCacheKey)); ======= return _returnRequestReasonRepository.GetAll(query => { return from rra in query orderby rra.DisplayOrder, rra.Id select rra; }, cache => default); >>>>>>> return await _returnRequestReasonRepository.GetAll(query => { return from rra in query orderby rra.DisplayOrder, rra.Id select rra; }, cache => default); <<<<<<< if (returnRequestReasonId == 0) return null; return await _returnRequestReasonRepository.ToCachedGetById(returnRequestReasonId); ======= return _returnRequestReasonRepository.GetById(returnRequestReasonId, cache => default); >>>>>>> return await _returnRequestReasonRepository.GetById(returnRequestReasonId, cache => default); <<<<<<< if (returnRequestReason == null) throw new ArgumentNullException(nameof(returnRequestReason)); await _returnRequestReasonRepository.Insert(returnRequestReason); //event notification await _eventPublisher.EntityInserted(returnRequestReason); ======= _returnRequestReasonRepository.Insert(returnRequestReason); >>>>>>> await _returnRequestReasonRepository.Insert(returnRequestReason); <<<<<<< if (returnRequestReason == null) throw new ArgumentNullException(nameof(returnRequestReason)); await _returnRequestReasonRepository.Update(returnRequestReason); //event notification await _eventPublisher.EntityUpdated(returnRequestReason); ======= _returnRequestReasonRepository.Update(returnRequestReason); >>>>>>> await _returnRequestReasonRepository.Update(returnRequestReason);
<<<<<<< var productAttributePictureCacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.ProductAttributePictureModelKey, pictureId, await _webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore()); var pictureModel = await _staticCacheManager.Get(productAttributePictureCacheKey, async () => ======= var productAttributePictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ProductAttributePictureModelKey, pictureId, _webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore); var pictureModel = _staticCacheManager.Get(productAttributePictureCacheKey, () => >>>>>>> var productAttributePictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ProductAttributePictureModelKey, pictureId, _webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore()); var pictureModel = await _staticCacheManager.Get(productAttributePictureCacheKey, async () => <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> Cart() ======= public virtual IActionResult Cart() >>>>>>> public virtual async Task<IActionResult> Cart() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> Wishlist(Guid? customerGuid) ======= public virtual IActionResult Wishlist(Guid? customerGuid) >>>>>>> public virtual async Task<IActionResult> Wishlist(Guid? customerGuid) <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> EmailWishlist() ======= public virtual IActionResult EmailWishlist() >>>>>>> public virtual async Task<IActionResult> EmailWishlist()
<<<<<<< _typeMapping = new Dictionary<Type, Action<ICreateTableColumnAsTypeSyntax>> ======= _versionLoader = new Lazy<IVersionLoader>(() => EngineContext.Current.Resolve<IVersionLoader>()); _typeMapping = new Dictionary<Type, Action<ICreateTableColumnAsTypeSyntax>>() >>>>>>> _versionLoader = new Lazy<IVersionLoader>(() => EngineContext.Current.Resolve<IVersionLoader>()); _typeMapping = new Dictionary<Type, Action<ICreateTableColumnAsTypeSyntax>>
<<<<<<< protected virtual async Task<string> ParseCustomCustomerAttributes(IFormCollection form) ======= protected virtual string ParseSelectedProvider(IFormCollection form) { if (form == null) throw new ArgumentNullException(nameof(form)); var multiFactorAuthenticationProviders = _multiFactorAuthenticationPluginManager.LoadActivePlugins(_workContext.CurrentCustomer, _storeContext.CurrentStore.Id).ToList(); foreach (var provider in multiFactorAuthenticationProviders) { var controlId = $"provider_{provider.PluginDescriptor.SystemName}"; var curProvider = form[controlId]; if (!StringValues.IsNullOrEmpty(curProvider)) { var selectedProvider = curProvider.ToString(); if (!string.IsNullOrEmpty(selectedProvider)) { return selectedProvider; } } } return string.Empty; } protected virtual string ParseCustomCustomerAttributes(IFormCollection form) >>>>>>> protected virtual async Task<string> ParseSelectedProvider(IFormCollection form) { if (form == null) throw new ArgumentNullException(nameof(form)); var multiFactorAuthenticationProviders = _multiFactorAuthenticationPluginManager.LoadActivePlugins(await _workContext.GetCurrentCustomer(), (await _storeContext.GetCurrentStore()).Id).ToList(); foreach (var provider in multiFactorAuthenticationProviders) { var controlId = $"provider_{provider.PluginDescriptor.SystemName}"; var curProvider = form[controlId]; if (!StringValues.IsNullOrEmpty(curProvider)) { var selectedProvider = curProvider.ToString(); if (!string.IsNullOrEmpty(selectedProvider)) { return selectedProvider; } } } return string.Empty; } protected virtual async Task<string> ParseCustomCustomerAttributes(IFormCollection form) <<<<<<< //migrate shopping cart await _shoppingCartService.MigrateShoppingCart(await _workContext.GetCurrentCustomer(), customer, true); //sign in new customer await _authenticationService.SignIn(customer, model.RememberMe); //raise event await _eventPublisher.Publish(new CustomerLoggedinEvent(customer)); //activity log await _customerActivityService.InsertActivity(customer, "PublicStore.Login", await _localizationService.GetResource("ActivityLog.PublicStore.Login"), customer); if (string.IsNullOrEmpty(returnUrl) || !Url.IsLocalUrl(returnUrl)) return RedirectToRoute("Homepage"); return Redirect(returnUrl); ======= return _customerRegistrationService.SignInCustomer(customer, returnUrl, model.RememberMe); } case CustomerLoginResults.MultiFactorAuthenticationRequired: { var userName = _customerSettings.UsernamesEnabled ? model.Username : model.Email; var customerMultiFactorAuthenticationInfo = new CustomerMultiFactorAuthenticationInfo { UserName = userName, RememberMe = model.RememberMe, ReturnUrl = returnUrl }; HttpContext.Session.Set(NopCustomerDefaults.CustomerMultiFactorAuthenticationInfo, customerMultiFactorAuthenticationInfo); return RedirectToRoute("MultiFactorVerification"); >>>>>>> return await _customerRegistrationService.SignInCustomer(customer, returnUrl, model.RememberMe); } case CustomerLoginResults.MultiFactorAuthenticationRequired: { var userName = _customerSettings.UsernamesEnabled ? model.Username : model.Email; var customerMultiFactorAuthenticationInfo = new CustomerMultiFactorAuthenticationInfo { UserName = userName, RememberMe = model.RememberMe, ReturnUrl = returnUrl }; HttpContext.Session.Set(NopCustomerDefaults.CustomerMultiFactorAuthenticationInfo, customerMultiFactorAuthenticationInfo); return RedirectToRoute("MultiFactorVerification"); <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> Info() ======= public virtual IActionResult Info() >>>>>>> public virtual async Task<IActionResult> Info() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> Addresses() ======= public virtual IActionResult Addresses() >>>>>>> public virtual async Task<IActionResult> Addresses() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> AddressDelete(int addressId) ======= public virtual IActionResult AddressDelete(int addressId) >>>>>>> public virtual async Task<IActionResult> AddressDelete(int addressId) <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> AddressAdd() ======= public virtual IActionResult AddressAdd() >>>>>>> public virtual async Task<IActionResult> AddressAdd() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> AddressEdit(int addressId) ======= public virtual IActionResult AddressEdit(int addressId) >>>>>>> public virtual async Task<IActionResult> AddressEdit(int addressId) <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> DownloadableProducts() ======= public virtual IActionResult DownloadableProducts() >>>>>>> public virtual async Task<IActionResult> DownloadableProducts() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> ChangePassword() ======= public virtual IActionResult ChangePassword() >>>>>>> public virtual async Task<IActionResult> ChangePassword() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> Avatar() ======= public virtual IActionResult Avatar() >>>>>>> public virtual async Task<IActionResult> Avatar() <<<<<<< [HttpsRequirement] public virtual async Task<IActionResult> GdprTools() ======= public virtual IActionResult GdprTools() >>>>>>> public virtual async Task<IActionResult> GdprTools()
<<<<<<< if (pollId == 0) return null; return await _pollRepository.ToCachedGetById(pollId); ======= return _pollRepository.GetById(pollId, cache => default); >>>>>>> return await _pollRepository.GetById(pollId, cache => default); <<<<<<< if (poll == null) throw new ArgumentNullException(nameof(poll)); await _pollRepository.Delete(poll); //event notification await _eventPublisher.EntityDeleted(poll); ======= _pollRepository.Delete(poll); >>>>>>> await _pollRepository.Delete(poll); <<<<<<< if (poll == null) throw new ArgumentNullException(nameof(poll)); await _pollRepository.Insert(poll); //event notification await _eventPublisher.EntityInserted(poll); ======= _pollRepository.Insert(poll); >>>>>>> await _pollRepository.Insert(poll); <<<<<<< if (poll == null) throw new ArgumentNullException(nameof(poll)); await _pollRepository.Update(poll); //event notification await _eventPublisher.EntityUpdated(poll); ======= _pollRepository.Update(poll); >>>>>>> await _pollRepository.Update(poll); <<<<<<< if (pollAnswerId == 0) return null; return await _pollAnswerRepository.ToCachedGetById(pollAnswerId); ======= return _pollAnswerRepository.GetById(pollAnswerId, cache => default); >>>>>>> return await _pollAnswerRepository.GetById(pollAnswerId, cache => default); <<<<<<< if (pollAnswer == null) throw new ArgumentNullException(nameof(pollAnswer)); await _pollAnswerRepository.Delete(pollAnswer); //event notification await _eventPublisher.EntityDeleted(pollAnswer); ======= _pollAnswerRepository.Delete(pollAnswer); >>>>>>> await _pollAnswerRepository.Delete(pollAnswer); <<<<<<< if (pollAnswer == null) throw new ArgumentNullException(nameof(pollAnswer)); await _pollAnswerRepository.Insert(pollAnswer); //event notification await _eventPublisher.EntityInserted(pollAnswer); ======= _pollAnswerRepository.Insert(pollAnswer); >>>>>>> await _pollAnswerRepository.Insert(pollAnswer); <<<<<<< if (pollAnswer == null) throw new ArgumentNullException(nameof(pollAnswer)); await _pollAnswerRepository.Update(pollAnswer); //event notification await _eventPublisher.EntityUpdated(pollAnswer); ======= _pollAnswerRepository.Update(pollAnswer); >>>>>>> await _pollAnswerRepository.Update(pollAnswer); <<<<<<< if (pollVotingRecord == null) throw new ArgumentNullException(nameof(pollVotingRecord)); await _pollVotingRecordRepository.Insert(pollVotingRecord); //event notification await _eventPublisher.EntityInserted(pollVotingRecord); ======= _pollVotingRecordRepository.Insert(pollVotingRecord); >>>>>>> await _pollVotingRecordRepository.Insert(pollVotingRecord);
<<<<<<< var query = from lp in _localizedPropertyRepository.Table select lp; return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopLocalizationDefaults.LocalizedPropertyAllCacheKey)); ======= return _localizedPropertyRepository.GetAll(query => { return from lp in query select lp; }, cache => default); >>>>>>> return await _localizedPropertyRepository.GetAll(query => { return from lp in query select lp; }, cache => default); <<<<<<< if (localizedProperty == null) throw new ArgumentNullException(nameof(localizedProperty)); await _localizedPropertyRepository.Delete(localizedProperty); //event notification await _eventPublisher.EntityDeleted(localizedProperty); ======= _localizedPropertyRepository.Delete(localizedProperty); >>>>>>> await _localizedPropertyRepository.Delete(localizedProperty); <<<<<<< if (localizedPropertyId == 0) return null; return await _localizedPropertyRepository.GetById(localizedPropertyId); ======= return _localizedPropertyRepository.GetById(localizedPropertyId); >>>>>>> return await _localizedPropertyRepository.GetById(localizedPropertyId); <<<<<<< if (localizedProperty == null) throw new ArgumentNullException(nameof(localizedProperty)); await _localizedPropertyRepository.Insert(localizedProperty); //event notification await _eventPublisher.EntityInserted(localizedProperty); ======= _localizedPropertyRepository.Insert(localizedProperty); >>>>>>> await _localizedPropertyRepository.Insert(localizedProperty); <<<<<<< if (localizedProperty == null) throw new ArgumentNullException(nameof(localizedProperty)); await _localizedPropertyRepository.Update(localizedProperty); //event notification await _eventPublisher.EntityUpdated(localizedProperty); ======= _localizedPropertyRepository.Update(localizedProperty); >>>>>>> await _localizedPropertyRepository.Update(localizedProperty);
<<<<<<< using System.Threading.Tasks; ======= using System.Linq.Expressions; >>>>>>> using System.Threading.Tasks; using System.Linq.Expressions;
<<<<<<< ["Plugins.Tax.FixedOrByCountryStateZip.Tax.Categories.Manage"] = "Manage tax categories", //#5209 ["Admin.ShoppingCartType.StartDate.Hint"] = "The start date for the search (when a product was added to the cart).", ["Admin.ShoppingCartType.EndDate.Hint"] = "The end date for the search (when a product was added to the cart).", ======= ["Plugins.Tax.FixedOrByCountryStateZip.Tax.Categories.Manage"] = "Manage tax categories", //#3353 ["Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.MinStockQuantity"] = "Minimum stock qty", ["Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.MinStockQuantity.Hint"] = "If you have enabled 'Manage stock by attributes' you can perform a number of different actions when the current stock quantity falls below (reaches) your minimum stock quantity (e.g. Low stock report).", >>>>>>> ["Plugins.Tax.FixedOrByCountryStateZip.Tax.Categories.Manage"] = "Manage tax categories", //#3353 ["Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.MinStockQuantity"] = "Minimum stock qty", ["Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.MinStockQuantity.Hint"] = "If you have enabled 'Manage stock by attributes' you can perform a number of different actions when the current stock quantity falls below (reaches) your minimum stock quantity (e.g. Low stock report).", ["Plugins.Tax.FixedOrByCountryStateZip.Tax.Categories.Manage"] = "Manage tax categories", //#5209 ["Admin.ShoppingCartType.StartDate.Hint"] = "The start date for the search (when a product was added to the cart).", ["Admin.ShoppingCartType.EndDate.Hint"] = "The end date for the search (when a product was added to the cart).",
<<<<<<< if (newsItem == null) throw new ArgumentNullException(nameof(newsItem)); await _newsItemRepository.Delete(newsItem); //event notification await _eventPublisher.EntityDeleted(newsItem); ======= _newsItemRepository.Delete(newsItem); >>>>>>> await _newsItemRepository.Delete(newsItem); <<<<<<< if (newsId == 0) return null; return await _newsItemRepository.ToCachedGetById(newsId); ======= return _newsItemRepository.GetById(newsId, cache => default); >>>>>>> return await _newsItemRepository.GetById(newsId, cache => default); <<<<<<< var query = _newsItemRepository.Table; return await query.Where(p => newsIds.Contains(p.Id)).ToListAsync(); ======= return _newsItemRepository.GetByIds(newsIds); >>>>>>> return await _newsItemRepository.GetByIds(newsIds); <<<<<<< var news = await query.ToPagedList(pageIndex, pageSize); ======= return query.OrderByDescending(n => n.StartDateUtc ?? n.CreatedOnUtc); }, pageIndex, pageSize); >>>>>>> return query.OrderByDescending(n => n.StartDateUtc ?? n.CreatedOnUtc); }, pageIndex, pageSize); <<<<<<< if (news == null) throw new ArgumentNullException(nameof(news)); await _newsItemRepository.Insert(news); //event notification await _eventPublisher.EntityInserted(news); ======= _newsItemRepository.Insert(news); >>>>>>> await _newsItemRepository.Insert(news); <<<<<<< if (news == null) throw new ArgumentNullException(nameof(news)); await _newsItemRepository.Update(news); //event notification await _eventPublisher.EntityUpdated(news); ======= _newsItemRepository.Update(news); >>>>>>> await _newsItemRepository.Update(news); <<<<<<< return await query.ToListAsync(); ======= return query; }); >>>>>>> return query; }); <<<<<<< if (newsCommentId == 0) return null; return await _newsCommentRepository.ToCachedGetById(newsCommentId); ======= return _newsCommentRepository.GetById(newsCommentId, cache => default); >>>>>>> return await _newsCommentRepository.GetById(newsCommentId, cache => default); <<<<<<< if (commentIds == null || commentIds.Length == 0) return new List<NewsComment>(); var query = from nc in _newsCommentRepository.Table where commentIds.Contains(nc.Id) select nc; var comments = await query.ToListAsync(); //sort by passed identifiers var sortedComments = new List<NewsComment>(); foreach (var id in commentIds) { var comment = comments.Find(x => x.Id == id); if (comment != null) sortedComments.Add(comment); } return sortedComments; ======= return _newsCommentRepository.GetByIds(commentIds); >>>>>>> return await _newsCommentRepository.GetByIds(commentIds); <<<<<<< return await query.ToCachedCount(cacheKey); ======= return _staticCacheManager.Get(cacheKey, query.Count); >>>>>>> return await _staticCacheManager.Get(cacheKey, async () => await query.ToAsyncEnumerable().CountAsync()); <<<<<<< if (newsComment == null) throw new ArgumentNullException(nameof(newsComment)); await _newsCommentRepository.Delete(newsComment); //event notification await _eventPublisher.EntityDeleted(newsComment); ======= _newsCommentRepository.Delete(newsComment); >>>>>>> await _newsCommentRepository.Delete(newsComment); <<<<<<< if (comment == null) throw new ArgumentNullException(nameof(comment)); await _newsCommentRepository.Insert(comment); //event notification await _eventPublisher.EntityInserted(comment); ======= _newsCommentRepository.Insert(comment); >>>>>>> await _newsCommentRepository.Insert(comment); <<<<<<< if (comment == null) throw new ArgumentNullException(nameof(comment)); await _newsCommentRepository.Update(comment); //event notification await _eventPublisher.EntityUpdated(comment); ======= _newsCommentRepository.Update(comment); >>>>>>> await _newsCommentRepository.Update(comment);