conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
using System.Collections.Generic;
=======
using System.Linq;
>>>>>>>
<<<<<<<
using Moq;
using Nop.Core;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Logging;
using Nop.Core.Events;
=======
using Nop.Services.Customers;
>>>>>>>
using System.Linq;
using Nop.Services.Customers;
<<<<<<<
private Mock<IEventPublisher> _eventPublisher;
private FakeRepository<ActivityLog> _activityLogRepository;
private FakeRepository<ActivityLogType> _activityLogTypeRepository;
private Mock<IWorkContext> _workContext;
=======
>>>>>>>
<<<<<<<
_activityType1 = new ActivityLogType
{
Id = 1,
SystemKeyword = "TestKeyword1",
Enabled = true,
Name = "Test name1"
};
_activityType2 = new ActivityLogType
{
Id = 2,
SystemKeyword = "TestKeyword2",
Enabled = true,
Name = "Test name2"
};
_customer1 = new Customer
{
Id = 1,
Email = "[email protected]",
Username = "TestUser1",
Deleted = false
};
_customer2 = new Customer
{
Id = 2,
Email = "[email protected]",
Username = "TestUser2",
Deleted = false
};
_activity1 = new ActivityLog
{
Id = 1,
ActivityLogTypeId = _activityType1.Id,
CustomerId = _customer1.Id
};
_activity2 = new ActivityLog
{
Id = 2,
ActivityLogTypeId = _activityType2.Id,
CustomerId = _customer2.Id
};
_eventPublisher = new Mock<IEventPublisher>();
_eventPublisher.Setup(x => x.Publish(It.IsAny<object>()));
_workContext = new Mock<IWorkContext>();
_webHelper = new Mock<IWebHelper>();
_activityLogRepository = new FakeRepository<ActivityLog>(new List<ActivityLog> { _activity1, _activity2 });
_activityLogTypeRepository = new FakeRepository<ActivityLogType>(new List<ActivityLogType> { _activityType1, _activityType2 });
_customerActivityService = new CustomerActivityService(_activityLogRepository, _activityLogTypeRepository, _webHelper.Object, _workContext.Object);
=======
_customerActivityService = GetService<ICustomerActivityService>();
_customerService = GetService<ICustomerService>();
>>>>>>>
_customerActivityService = GetService<ICustomerActivityService>();
_customerService = GetService<ICustomerService>(); |
<<<<<<<
_eventPublisher.ModelReceivedAsync(model, context.ModelState).Wait();
=======
await _eventPublisher.ModelReceived(model, context.ModelState);
>>>>>>>
await _eventPublisher.ModelReceivedAsync(model, context.ModelState);
<<<<<<<
_eventPublisher.ModelPreparedAsync(model).Wait();
=======
await _eventPublisher.ModelPrepared(model);
>>>>>>>
await _eventPublisher.ModelPreparedAsync(model);
<<<<<<<
_eventPublisher.ModelPreparedAsync(modelCollection).Wait();
=======
await _eventPublisher.ModelPrepared(modelCollection);
>>>>>>>
await _eventPublisher.ModelPreparedAsync(modelCollection); |
<<<<<<<
var storeId = (await _storeContext.GetCurrentStore()).Id;
//parse
if (tmp.Length == 1)
{
//"email" only
email = tmp[0].Trim();
}
else if (tmp.Length == 2)
{
//"email" and "active" fields specified
email = tmp[0].Trim();
isActive = bool.Parse(tmp[1].Trim());
}
else if (tmp.Length == 3)
{
//"email" and "active" and "storeId" fields specified
email = tmp[0].Trim();
=======
var storeId = _storeContext.CurrentStore.Id;
//"email" field specified
var email = tmp[0].Trim();
if (!CommonHelper.IsValidEmail(email))
continue;
//"active" field specified
if (tmp.Length >= 2)
>>>>>>>
var storeId = (await _storeContext.GetCurrentStore()).Id;
//"email" field specified
var email = tmp[0].Trim();
if (!CommonHelper.IsValidEmail(email))
continue;
//"active" field specified
if (tmp.Length >= 2) |
<<<<<<<
/// <summary>
/// Gets or sets a value indicating whether to enable markup minification
/// </summary>
public bool MinificationEnabled { get; set; }
=======
/// <summary>
/// The length of time, in milliseconds, before the running schedule task times out. Set null to use default value
/// </summary>
public int? ScheduleTaskRunTimeout { get; set; }
>>>>>>>
/// <summary>
/// Gets or sets a value indicating whether to enable markup minification
/// </summary>
public bool MinificationEnabled { get; set; }
/// <summary>
/// The length of time, in milliseconds, before the running schedule task times out. Set null to use default value
/// </summary>
public int? ScheduleTaskRunTimeout { get; set; } |
<<<<<<<
return await LoginUser(associatedUser, returnUrl);
=======
return _customerRegistrationService.SignInCustomer(associatedUser, returnUrl);
>>>>>>>
return await _customerRegistrationService.SignInCustomer(associatedUser, returnUrl);
<<<<<<<
/// Login passed user
/// </summary>
/// <param name="user">User to login</param>
/// <param name="returnUrl">URL to which the user will return after authentication</param>
/// <returns>Result of an authentication</returns>
protected virtual async Task<IActionResult> LoginUser(Customer user, string returnUrl)
{
//migrate shopping cart
await _shoppingCartService.MigrateShoppingCart(await _workContext.GetCurrentCustomer(), user, true);
//authenticate
await _authenticationService.SignIn(user, false);
//raise event
await _eventPublisher.Publish(new CustomerLoggedinEvent(user));
//activity log
await _customerActivityService.InsertActivity(user, "PublicStore.Login",
await _localizationService.GetResource("ActivityLog.PublicStore.Login"), user);
return SuccessfulAuthentication(returnUrl);
}
/// <summary>
=======
>>>>>>>
/// Register new user
/// </summary>
/// <param name="parameters">Authentication parameters received from external authentication method</param>
/// <param name="returnUrl">URL to which the user will return after authentication</param>
/// <returns>Result of an authentication</returns>
protected virtual async Task<IActionResult> RegisterNewUser(ExternalAuthenticationParameters parameters, string returnUrl)
{
//check whether the specified email has been already registered
if (await _customerService.GetCustomerByEmail(parameters.Email) != null)
{
var alreadyExistsError = string.Format(await _localizationService.GetResource("Account.AssociatedExternalAuth.EmailAlreadyExists"),
!string.IsNullOrEmpty(parameters.ExternalDisplayIdentifier) ? parameters.ExternalDisplayIdentifier : parameters.ExternalIdentifier);
return ErrorAuthentication(new[] { alreadyExistsError }, returnUrl);
}
//registration is approved if validation isn't required
var registrationIsApproved = _customerSettings.UserRegistrationType == UserRegistrationType.Standard ||
(_customerSettings.UserRegistrationType == UserRegistrationType.EmailValidation && !_externalAuthenticationSettings.RequireEmailValidation);
//create registration request
var registrationRequest = new CustomerRegistrationRequest(await _workContext.GetCurrentCustomer(),
parameters.Email, parameters.Email,
CommonHelper.GenerateRandomDigitCode(20),
PasswordFormat.Hashed,
(await _storeContext.GetCurrentStore()).Id,
registrationIsApproved);
//whether registration request has been completed successfully
var registrationResult = await _customerRegistrationService.RegisterCustomer(registrationRequest);
if (!registrationResult.Success)
return ErrorAuthentication(registrationResult.Errors, returnUrl);
//allow to save other customer values by consuming this event
await _eventPublisher.Publish(new CustomerAutoRegisteredByExternalMethodEvent(await _workContext.GetCurrentCustomer(), parameters));
//raise customer registered event
await _eventPublisher.Publish(new CustomerRegisteredEvent(await _workContext.GetCurrentCustomer()));
//store owner notifications
if (_customerSettings.NotifyNewCustomerRegistration)
await _workflowMessageService.SendCustomerRegisteredNotificationMessage(await _workContext.GetCurrentCustomer(), _localizationSettings.DefaultAdminLanguageId);
//associate external account with registered user
await AssociateExternalAccountWithUser(await _workContext.GetCurrentCustomer(), parameters);
//authenticate
if (registrationIsApproved)
{
await _authenticationService.SignIn(await _workContext.GetCurrentCustomer(), false);
await _workflowMessageService.SendCustomerWelcomeMessage(await _workContext.GetCurrentCustomer(), (await _workContext.GetWorkingLanguage()).Id);
return new RedirectToRouteResult("RegisterResult", new { resultId = (int)UserRegistrationType.Standard, returnUrl });
}
//registration is succeeded but isn't activated
if (_customerSettings.UserRegistrationType == UserRegistrationType.EmailValidation)
{
//email validation message
await _genericAttributeService.SaveAttribute(await _workContext.GetCurrentCustomer(), NopCustomerDefaults.AccountActivationTokenAttribute, Guid.NewGuid().ToString());
await _workflowMessageService.SendCustomerEmailValidationMessage(await _workContext.GetCurrentCustomer(), (await _workContext.GetWorkingLanguage()).Id);
return new RedirectToRouteResult("RegisterResult", new { resultId = (int)UserRegistrationType.EmailValidation });
}
//registration is succeeded but isn't approved by admin
if (_customerSettings.UserRegistrationType == UserRegistrationType.AdminApproval)
return new RedirectToRouteResult("RegisterResult", new { resultId = (int)UserRegistrationType.AdminApproval });
return ErrorAuthentication(new[] { "Error on registration" }, returnUrl);
}
/// <summary>
<<<<<<<
await _externalAuthenticationRecordRepository.Insert(externalAuthenticationRecord);
=======
_externalAuthenticationRecordRepository.Insert(externalAuthenticationRecord, false);
>>>>>>>
await _externalAuthenticationRecordRepository.Insert(externalAuthenticationRecord, false);
<<<<<<<
if (externalAuthenticationRecordId == 0)
return null;
return await _externalAuthenticationRecordRepository.ToCachedGetById(externalAuthenticationRecordId);
=======
return _externalAuthenticationRecordRepository.GetById(externalAuthenticationRecordId, cache => default);
>>>>>>>
return await _externalAuthenticationRecordRepository.GetById(externalAuthenticationRecordId, cache => default);
<<<<<<<
await _externalAuthenticationRecordRepository.Delete(associationRecord);
=======
_externalAuthenticationRecordRepository.Delete(associationRecord, false);
>>>>>>>
await _externalAuthenticationRecordRepository.Delete(associationRecord, false);
<<<<<<<
await _externalAuthenticationRecordRepository.Delete(externalAuthenticationRecord);
=======
_externalAuthenticationRecordRepository.Delete(externalAuthenticationRecord, false);
>>>>>>>
await _externalAuthenticationRecordRepository.Delete(externalAuthenticationRecord, false); |
<<<<<<<
await _languageRepository.Delete(language);
//event notification
await _eventPublisher.EntityDeleted(language);
=======
_languageRepository.Delete(language);
>>>>>>>
await _languageRepository.Delete(language);
<<<<<<<
var allLanguages = await query.ToListAsync();
=======
var allLanguages = _languageRepository.GetAll(query =>
{
if (!showHidden)
query = query.Where(l => l.Published);
query = query.OrderBy(l => l.DisplayOrder).ThenBy(l => l.Id);
return query;
});
>>>>>>>
var allLanguages = await _languageRepository.GetAll(query =>
{
if (!showHidden)
query = query.Where(l => l.Published);
query = query.OrderBy(l => l.DisplayOrder).ThenBy(l => l.Id);
return query;
});
<<<<<<<
if (languageId == 0)
return null;
return await _languageRepository.ToCachedGetById(languageId);
=======
return _languageRepository.GetById(languageId, cache => default);
>>>>>>>
return await _languageRepository.GetById(languageId, cache => default);
<<<<<<<
if (language == null)
throw new ArgumentNullException(nameof(language));
await _languageRepository.Insert(language);
//event notification
await _eventPublisher.EntityInserted(language);
=======
_languageRepository.Insert(language);
>>>>>>>
await _languageRepository.Insert(language);
<<<<<<<
await _languageRepository.Update(language);
//event notification
await _eventPublisher.EntityUpdated(language);
=======
_languageRepository.Update(language);
>>>>>>>
await _languageRepository.Update(language); |
<<<<<<<
categoryModel.Breadcrumb = _categoryService.GetFormattedBreadCrumbAsync(category).Result;
categoryModel.SeName = _urlRecordService.GetSeNameAsync(category, 0, true, false).Result;
=======
categoryModel.Breadcrumb = await _categoryService.GetFormattedBreadCrumb(category);
categoryModel.SeName = await _urlRecordService.GetSeName(category, 0, true, false);
>>>>>>>
categoryModel.Breadcrumb = await _categoryService.GetFormattedBreadCrumbAsync(category);
categoryModel.SeName = await _urlRecordService.GetSeNameAsync(category, 0, true, false);
<<<<<<<
categoryProductModel.ProductName = _productService.GetProductByIdAsync(productCategory.ProductId).Result?.Name;
=======
categoryProductModel.ProductName = (await _productService.GetProductById(productCategory.ProductId))?.Name;
>>>>>>>
categoryProductModel.ProductName = (await _productService.GetProductByIdAsync(productCategory.ProductId))?.Name;
<<<<<<<
productModel.SeName = _urlRecordService.GetSeNameAsync(product, 0, true, false).Result;
=======
productModel.SeName = await _urlRecordService.GetSeName(product, 0, true, false);
>>>>>>>
productModel.SeName = await _urlRecordService.GetSeNameAsync(product, 0, true, false); |
<<<<<<<
if (discountId == 0)
return null;
return await _discountRepository.ToCachedGetById(discountId);
=======
return _discountRepository.GetById(discountId, cache => default);
>>>>>>>
return await _discountRepository.GetById(discountId, cache => default);
<<<<<<<
query = (await query.ToCachedList(cacheKey)).AsQueryable();
=======
return query;
}, cache => cache.PrepareKeyForDefaultCache(NopDiscountDefaults.DiscountAllCacheKey,
showHidden, couponCode ?? string.Empty, discountName ?? string.Empty))
.AsQueryable();
>>>>>>>
return query;
}, cache => cache.PrepareKeyForDefaultCache(NopDiscountDefaults.DiscountAllCacheKey,
showHidden, couponCode ?? string.Empty, discountName ?? string.Empty)))
.AsQueryable();
<<<<<<<
if (discount == null)
throw new ArgumentNullException(nameof(discount));
await _discountRepository.Insert(discount);
//event notification
await _eventPublisher.EntityInserted(discount);
=======
_discountRepository.Insert(discount);
>>>>>>>
await _discountRepository.Insert(discount);
<<<<<<<
if (discount == null)
throw new ArgumentNullException(nameof(discount));
await _discountRepository.Update(discount);
//event notification
await _eventPublisher.EntityUpdated(discount);
=======
_discountRepository.Update(discount);
>>>>>>>
await _discountRepository.Update(discount);
<<<<<<<
return await query.ToListAsync();
=======
return query;
});
>>>>>>>
return query;
});
<<<<<<<
if (discountRequirementId == 0)
return null;
return await _discountRequirementRepository.ToCachedGetById(discountRequirementId);
=======
return _discountRequirementRepository.GetById(discountRequirementId, cache => default);
>>>>>>>
return await _discountRequirementRepository.GetById(discountRequirementId, cache => default);
<<<<<<<
await _discountRequirementRepository.Delete(discountRequirement);
//event notification
await _eventPublisher.EntityDeleted(discountRequirement);
=======
_discountRequirementRepository.Delete(discountRequirement);
>>>>>>>
await _discountRequirementRepository.Delete(discountRequirement);
<<<<<<<
if (discountRequirement is null)
throw new ArgumentNullException(nameof(discountRequirement));
await _discountRequirementRepository.Insert(discountRequirement);
//event notification
await _eventPublisher.EntityInserted(discountRequirement);
=======
_discountRequirementRepository.Insert(discountRequirement);
>>>>>>>
await _discountRequirementRepository.Insert(discountRequirement);
<<<<<<<
if (discountRequirement is null)
throw new ArgumentNullException(nameof(discountRequirement));
await _discountRequirementRepository.Update(discountRequirement);
//event notification
await _eventPublisher.EntityUpdated(discountRequirement);
=======
_discountRequirementRepository.Update(discountRequirement);
>>>>>>>
await _discountRequirementRepository.Update(discountRequirement);
<<<<<<<
if (discountUsageHistoryId == 0)
return null;
return await _discountUsageHistoryRepository.GetById(discountUsageHistoryId);
=======
return _discountUsageHistoryRepository.GetById(discountUsageHistoryId);
>>>>>>>
return await _discountUsageHistoryRepository.GetById(discountUsageHistoryId);
<<<<<<<
return await discountUsageHistory.ToPagedList(pageIndex, pageSize);
=======
return query;
}, pageIndex, pageSize);
>>>>>>>
return query;
}, pageIndex, pageSize);
<<<<<<<
if (discountUsageHistory == null)
throw new ArgumentNullException(nameof(discountUsageHistory));
await _discountUsageHistoryRepository.Insert(discountUsageHistory);
//event notification
await _eventPublisher.EntityInserted(discountUsageHistory);
=======
_discountUsageHistoryRepository.Insert(discountUsageHistory);
>>>>>>>
await _discountUsageHistoryRepository.Insert(discountUsageHistory);
<<<<<<<
if (discountUsageHistory == null)
throw new ArgumentNullException(nameof(discountUsageHistory));
await _discountUsageHistoryRepository.Update(discountUsageHistory);
//event notification
await _eventPublisher.EntityUpdated(discountUsageHistory);
=======
_discountUsageHistoryRepository.Update(discountUsageHistory);
>>>>>>>
await _discountUsageHistoryRepository.Update(discountUsageHistory);
<<<<<<<
if (discountUsageHistory == null)
throw new ArgumentNullException(nameof(discountUsageHistory));
await _discountUsageHistoryRepository.Delete(discountUsageHistory);
//event notification
await _eventPublisher.EntityDeleted(discountUsageHistory);
=======
_discountUsageHistoryRepository.Delete(discountUsageHistory);
>>>>>>>
await _discountUsageHistoryRepository.Delete(discountUsageHistory); |
<<<<<<<
if (pictureId == 0)
return null;
return await _pictureRepository.ToCachedGetById(pictureId);
=======
return _pictureRepository.GetById(pictureId, cache => default);
>>>>>>>
return await _pictureRepository.GetById(pictureId, cache => default);
<<<<<<<
await _pictureRepository.Delete(picture);
//event notification
await _eventPublisher.EntityDeleted(picture);
=======
_pictureRepository.Delete(picture);
>>>>>>>
await _pictureRepository.Delete(picture);
<<<<<<<
//event notification
await _eventPublisher.EntityInserted(picture);
=======
>>>>>>>
<<<<<<<
await SavePictureInFile(picture.Id, pictureBinary, mimeType);
//event notification
await _eventPublisher.EntityUpdated(picture);
=======
SavePictureInFile(picture.Id, pictureBinary, mimeType);
>>>>>>>
await SavePictureInFile(picture.Id, pictureBinary, mimeType);
<<<<<<<
await SavePictureInFile(picture.Id, (await GetPictureBinaryByPictureId(picture.Id)).BinaryData, picture.MimeType);
//event notification
await _eventPublisher.EntityUpdated(picture);
=======
SavePictureInFile(picture.Id, GetPictureBinaryByPictureId(picture.Id).BinaryData, picture.MimeType);
>>>>>>>
await SavePictureInFile(picture.Id, (await GetPictureBinaryByPictureId(picture.Id)).BinaryData, picture.MimeType);
<<<<<<<
//raise event?
//await _eventPublisher.EntityUpdated(picture);
=======
>>>>>>> |
<<<<<<<
if (deliveryDateId == 0)
return null;
return await _deliveryDateRepository.ToCachedGetById(deliveryDateId);
=======
return _deliveryDateRepository.GetById(deliveryDateId, cache => default);
>>>>>>>
return await _deliveryDateRepository.GetById(deliveryDateId, cache => default);
<<<<<<<
var query = from dd in _deliveryDateRepository.Table
orderby dd.DisplayOrder, dd.Id
select dd;
var deliveryDates = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopShippingDefaults.DeliveryDatesAllCacheKey));
=======
var deliveryDates = _deliveryDateRepository.GetAll(query =>
{
return from dd in query
orderby dd.DisplayOrder, dd.Id
select dd;
}, cache => default);
>>>>>>>
var deliveryDates = await _deliveryDateRepository.GetAll(query =>
{
return from dd in query
orderby dd.DisplayOrder, dd.Id
select dd;
}, cache => default);
<<<<<<<
if (deliveryDate == null)
throw new ArgumentNullException(nameof(deliveryDate));
await _deliveryDateRepository.Insert(deliveryDate);
//event notification
await _eventPublisher.EntityInserted(deliveryDate);
=======
_deliveryDateRepository.Insert(deliveryDate);
>>>>>>>
await _deliveryDateRepository.Insert(deliveryDate);
<<<<<<<
if (deliveryDate == null)
throw new ArgumentNullException(nameof(deliveryDate));
await _deliveryDateRepository.Update(deliveryDate);
//event notification
await _eventPublisher.EntityUpdated(deliveryDate);
=======
_deliveryDateRepository.Update(deliveryDate);
>>>>>>>
await _deliveryDateRepository.Update(deliveryDate);
<<<<<<<
if (deliveryDate == null)
throw new ArgumentNullException(nameof(deliveryDate));
await _deliveryDateRepository.Delete(deliveryDate);
//event notification
await _eventPublisher.EntityDeleted(deliveryDate);
=======
_deliveryDateRepository.Delete(deliveryDate);
>>>>>>>
await _deliveryDateRepository.Delete(deliveryDate);
<<<<<<<
return productAvailabilityRangeId != 0 ? await _productAvailabilityRangeRepository.ToCachedGetById(productAvailabilityRangeId) : null;
=======
return productAvailabilityRangeId != 0 ? _productAvailabilityRangeRepository.GetById(productAvailabilityRangeId, cache => default) : null;
>>>>>>>
return productAvailabilityRangeId != 0 ? await _productAvailabilityRangeRepository.GetById(productAvailabilityRangeId, cache => default) : null;
<<<<<<<
var query = from par in _productAvailabilityRangeRepository.Table
orderby par.DisplayOrder, par.Id
select par;
return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopShippingDefaults.ProductAvailabilityAllCacheKey));
=======
return _productAvailabilityRangeRepository.GetAll(query =>
{
return from par in query
orderby par.DisplayOrder, par.Id
select par;
}, cache => default);
>>>>>>>
return await _productAvailabilityRangeRepository.GetAll(query =>
{
return from par in query
orderby par.DisplayOrder, par.Id
select par;
}, cache => default);
<<<<<<<
if (productAvailabilityRange == null)
throw new ArgumentNullException(nameof(productAvailabilityRange));
await _productAvailabilityRangeRepository.Insert(productAvailabilityRange);
//event notification
await _eventPublisher.EntityInserted(productAvailabilityRange);
=======
_productAvailabilityRangeRepository.Insert(productAvailabilityRange);
>>>>>>>
await _productAvailabilityRangeRepository.Insert(productAvailabilityRange);
<<<<<<<
if (productAvailabilityRange == null)
throw new ArgumentNullException(nameof(productAvailabilityRange));
await _productAvailabilityRangeRepository.Update(productAvailabilityRange);
//event notification
await _eventPublisher.EntityUpdated(productAvailabilityRange);
=======
_productAvailabilityRangeRepository.Update(productAvailabilityRange);
>>>>>>>
await _productAvailabilityRangeRepository.Update(productAvailabilityRange);
<<<<<<<
if (productAvailabilityRange == null)
throw new ArgumentNullException(nameof(productAvailabilityRange));
await _productAvailabilityRangeRepository.Delete(productAvailabilityRange);
//event notification
await _eventPublisher.EntityDeleted(productAvailabilityRange);
=======
_productAvailabilityRangeRepository.Delete(productAvailabilityRange);
>>>>>>>
await _productAvailabilityRangeRepository.Delete(productAvailabilityRange); |
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKey(NopOrderDefaults.CheckoutAttributeValuesAllCacheKey, entity.CheckoutAttributeId);
await Remove(cacheKey);
=======
Remove(NopOrderDefaults.CheckoutAttributeValuesAllCacheKey, entity.CheckoutAttributeId);
>>>>>>>
await Remove(NopOrderDefaults.CheckoutAttributeValuesAllCacheKey, entity.CheckoutAttributeId); |
<<<<<<<
if (blogPost == null)
throw new ArgumentNullException(nameof(blogPost));
await _blogPostRepository.Delete(blogPost);
//event notification
await _eventPublisher.EntityDeleted(blogPost);
=======
_blogPostRepository.Delete(blogPost);
>>>>>>>
await _blogPostRepository.Delete(blogPost);
<<<<<<<
if (blogPostId == 0)
return null;
return await _blogPostRepository.ToCachedGetById(blogPostId);
=======
return _blogPostRepository.GetById(blogPostId, cache => default);
>>>>>>>
return await _blogPostRepository.GetById(blogPostId, cache => default);
<<<<<<<
var blogPosts = await query.ToPagedList(pageIndex, pageSize);
=======
return query;
>>>>>>>
return query;
<<<<<<<
if (blogPost == null)
throw new ArgumentNullException(nameof(blogPost));
await _blogPostRepository.Insert(blogPost);
//event notification
await _eventPublisher.EntityInserted(blogPost);
=======
_blogPostRepository.Insert(blogPost);
>>>>>>>
await _blogPostRepository.Insert(blogPost);
<<<<<<<
if (blogPost == null)
throw new ArgumentNullException(nameof(blogPost));
await _blogPostRepository.Update(blogPost);
//event notification
await _eventPublisher.EntityUpdated(blogPost);
=======
_blogPostRepository.Update(blogPost);
>>>>>>>
await _blogPostRepository.Update(blogPost);
<<<<<<<
return await query.ToListAsync();
=======
return query;
});
>>>>>>>
return query;
});
<<<<<<<
if (blogCommentId == 0)
return null;
return await _blogCommentRepository.ToCachedGetById(blogCommentId);
=======
return _blogCommentRepository.GetById(blogCommentId, cache => default);
>>>>>>>
return await _blogCommentRepository.GetById(blogCommentId, cache => default);
<<<<<<<
if (commentIds == null || commentIds.Length == 0)
return new List<BlogComment>();
var query = from bc in _blogCommentRepository.Table
where commentIds.Contains(bc.Id)
select bc;
var comments = await query.ToListAsync();
//sort by passed identifiers
var sortedComments = new List<BlogComment>();
foreach (var id in commentIds)
{
var comment = comments.Find(x => x.Id == id);
if (comment != null)
sortedComments.Add(comment);
}
return sortedComments;
=======
return _blogCommentRepository.GetByIds(commentIds);
>>>>>>>
return await _blogCommentRepository.GetByIds(commentIds);
<<<<<<<
if (blogComment == null)
throw new ArgumentNullException(nameof(blogComment));
await _blogCommentRepository.Delete(blogComment);
//event notification
await _eventPublisher.EntityDeleted(blogComment);
=======
_blogCommentRepository.Delete(blogComment);
>>>>>>>
await _blogCommentRepository.Delete(blogComment);
<<<<<<<
if (blogComments == null)
throw new ArgumentNullException(nameof(blogComments));
foreach (var blogComment in blogComments)
await DeleteBlogComment(blogComment);
=======
_blogCommentRepository.Delete(blogComments);
>>>>>>>
await _blogCommentRepository.Delete(blogComments);
<<<<<<<
if (blogComment == null)
throw new ArgumentNullException(nameof(blogComment));
await _blogCommentRepository.Insert(blogComment);
//event notification
await _eventPublisher.EntityInserted(blogComment);
=======
_blogCommentRepository.Insert(blogComment);
>>>>>>>
await _blogCommentRepository.Insert(blogComment);
<<<<<<<
if (blogComment == null)
throw new ArgumentNullException(nameof(blogComment));
await _blogCommentRepository.Update(blogComment);
//event notification
await _eventPublisher.EntityUpdated(blogComment);
=======
_blogCommentRepository.Update(blogComment);
>>>>>>>
await _blogCommentRepository.Update(blogComment); |
<<<<<<<
//event notification
await _eventPublisher.EntityDeleted(shoppingCartItem);
=======
>>>>>>>
<<<<<<<
await _sciRepository.Update(shoppingCartItem);
//event notification
await _eventPublisher.EntityUpdated(shoppingCartItem);
=======
_sciRepository.Update(shoppingCartItem);
>>>>>>>
await _sciRepository.Update(shoppingCartItem);
<<<<<<<
await _customerService.UpdateCustomer(customer);
//event notification
await _eventPublisher.EntityInserted(shoppingCartItem);
=======
_customerService.UpdateCustomer(customer);
>>>>>>>
await _customerService.UpdateCustomer(customer);
<<<<<<<
var shoppingCartItem = await _sciRepository.ToCachedGetById(shoppingCartItemId);
=======
var shoppingCartItem = _sciRepository.GetById(shoppingCartItemId, cache => default);
>>>>>>>
var shoppingCartItem = await _sciRepository.GetById(shoppingCartItemId, cache => default);
<<<<<<<
await _sciRepository.Update(shoppingCartItem);
await _customerService.UpdateCustomer(customer);
//event notification
await _eventPublisher.EntityUpdated(shoppingCartItem);
=======
_sciRepository.Update(shoppingCartItem);
_customerService.UpdateCustomer(customer);
>>>>>>>
await _sciRepository.Update(shoppingCartItem);
await _customerService.UpdateCustomer(customer); |
<<<<<<<
/// <param name="filteredSpecs">Filtered product specification identifiers</param>
/// <param name="orderBy">Order by</param>
/// <param name="showHidden">A value indicating whether to show hidden records</param>
/// <param name="overridePublished">
/// null - process "Published" property according to "showHidden" parameter
/// true - load only "Published" products
/// false - load only "Unpublished" products
/// </param>
/// <returns>Products</returns>
public virtual async Task<IPagedList<Product>> SearchProductsAsync(
int pageIndex = 0,
int pageSize = int.MaxValue,
IList<int> categoryIds = null,
IList<int> manufacturerIds = null,
int storeId = 0,
int vendorId = 0,
int warehouseId = 0,
ProductType? productType = null,
bool visibleIndividuallyOnly = false,
bool excludeFeaturedProducts = false,
decimal? priceMin = null,
decimal? priceMax = null,
int productTagId = 0,
string keywords = null,
bool searchDescriptions = false,
bool searchManufacturerPartNumber = true,
bool searchSku = true,
bool searchProductTags = false,
int languageId = 0,
IList<int> filteredSpecs = null,
ProductSortingEnum orderBy = ProductSortingEnum.Position,
bool showHidden = false,
bool? overridePublished = null)
{
=======
/// <param name="filteredSpecOptions">Specification options list to filter products; null to load all records</param>
/// <param name="orderBy">Order by</param>
/// <param name="showHidden">A value indicating whether to show hidden records</param>
/// <param name="overridePublished">
/// null - process "Published" property according to "showHidden" parameter
/// true - load only "Published" products
/// false - load only "Unpublished" products
/// </param>
/// <returns>Products; specification attribute option ids</returns>
public virtual async Task<IPagedList<Product>> SearchProductsAsync(
int pageIndex = 0,
int pageSize = int.MaxValue,
IList<int> categoryIds = null,
IList<int> manufacturerIds = null,
int storeId = 0,
int vendorId = 0,
int warehouseId = 0,
ProductType? productType = null,
bool visibleIndividuallyOnly = false,
bool excludeFeaturedProducts = false,
decimal? priceMin = null,
decimal? priceMax = null,
int productTagId = 0,
string keywords = null,
bool searchDescriptions = false,
bool searchManufacturerPartNumber = true,
bool searchSku = true,
bool searchProductTags = false,
int languageId = 0,
IList<SpecificationAttributeOption> filteredSpecOptions = null,
ProductSortingEnum orderBy = ProductSortingEnum.Position,
bool showHidden = false,
bool? overridePublished = null)
{
>>>>>>>
/// <param name="filteredSpecOptions">Specification options list to filter products; null to load all records</param>
/// <param name="orderBy">Order by</param>
/// <param name="showHidden">A value indicating whether to show hidden records</param>
/// <param name="overridePublished">
/// null - process "Published" property according to "showHidden" parameter
/// true - load only "Published" products
/// false - load only "Unpublished" products
/// </param>
/// <returns>Products</returns>
public virtual async Task<IPagedList<Product>> SearchProductsAsync(
int pageIndex = 0,
int pageSize = int.MaxValue,
IList<int> categoryIds = null,
IList<int> manufacturerIds = null,
int storeId = 0,
int vendorId = 0,
int warehouseId = 0,
ProductType? productType = null,
bool visibleIndividuallyOnly = false,
bool excludeFeaturedProducts = false,
decimal? priceMin = null,
decimal? priceMax = null,
int productTagId = 0,
string keywords = null,
bool searchDescriptions = false,
bool searchManufacturerPartNumber = true,
bool searchSku = true,
bool searchProductTags = false,
int languageId = 0,
IList<SpecificationAttributeOption> filteredSpecOptions = null,
ProductSortingEnum orderBy = ProductSortingEnum.Position,
bool showHidden = false,
bool? overridePublished = null)
{ |
<<<<<<<
using Nop.Services.Events;
using Nop.Services.ExportImport;
=======
>>>>>>>
using Nop.Services.ExportImport;
<<<<<<<
if (resources == null)
throw new ArgumentNullException(nameof(resources));
//insert
await _lsrRepository.Insert(resources);
//event notification
foreach (var resource in resources)
{
await _eventPublisher.EntityInserted(resource);
}
=======
_lsrRepository.Insert(resources);
>>>>>>>
await _lsrRepository.Insert(resources);
<<<<<<<
var query = from l in _lsrRepository.Table
orderby l.ResourceName
where l.LanguageId == languageId
select l;
var locales = await query.ToListAsync();
=======
var locales = _lsrRepository.GetAll(query =>
{
return from l in query
orderby l.ResourceName
where l.LanguageId == languageId
select l;
});
>>>>>>>
var locales = await _lsrRepository.GetAll(query =>
{
return from l in query
orderby l.ResourceName
where l.LanguageId == languageId
select l;
});
<<<<<<<
if (resources == null)
throw new ArgumentNullException(nameof(resources));
//update
await _lsrRepository.Update(resources);
//event notification
foreach (var resource in resources)
await _eventPublisher.EntityUpdated(resource);
=======
_lsrRepository.Update(resources);
>>>>>>>
await _lsrRepository.Update(resources);
<<<<<<<
if (localeStringResource == null)
throw new ArgumentNullException(nameof(localeStringResource));
await _lsrRepository.Delete(localeStringResource);
//event notification
await _eventPublisher.EntityDeleted(localeStringResource);
=======
_lsrRepository.Delete(localeStringResource);
>>>>>>>
await _lsrRepository.Delete(localeStringResource);
<<<<<<<
if (localeStringResourceId == 0)
return null;
return await _lsrRepository.ToCachedGetById(localeStringResourceId);
=======
return _lsrRepository.GetById(localeStringResourceId, cache => default);
>>>>>>>
return await _lsrRepository.GetById(localeStringResourceId, cache => default);
<<<<<<<
if (localeStringResource == null)
throw new ArgumentNullException(nameof(localeStringResource));
await _lsrRepository.Insert(localeStringResource);
//event notification
await _eventPublisher.EntityInserted(localeStringResource);
=======
_lsrRepository.Insert(localeStringResource);
>>>>>>>
await _lsrRepository.Insert(localeStringResource);
<<<<<<<
if (localeStringResource == null)
throw new ArgumentNullException(nameof(localeStringResource));
await _lsrRepository.Update(localeStringResource);
//event notification
await _eventPublisher.EntityUpdated(localeStringResource);
=======
_lsrRepository.Update(localeStringResource);
>>>>>>>
await _lsrRepository.Update(localeStringResource);
<<<<<<<
await _staticCacheManager.Remove(_cacheKeyService.PrepareKeyForDefaultCache(NopLocalizationDefaults.LocaleStringResourcesAllPublicCacheKey, languageId));
await _staticCacheManager.Remove(_cacheKeyService.PrepareKeyForDefaultCache(NopLocalizationDefaults.LocaleStringResourcesAllAdminCacheKey, languageId));
=======
_staticCacheManager.Remove(NopLocalizationDefaults.LocaleStringResourcesAllPublicCacheKey, languageId);
_staticCacheManager.Remove(NopLocalizationDefaults.LocaleStringResourcesAllAdminCacheKey, languageId);
>>>>>>>
await _staticCacheManager.Remove(NopLocalizationDefaults.LocaleStringResourcesAllPublicCacheKey, languageId);
await _staticCacheManager.Remove(NopLocalizationDefaults.LocaleStringResourcesAllAdminCacheKey, languageId);
<<<<<<<
var lsr = await query.ToCachedFirstOrDefault(key);
=======
var lsr = _staticCacheManager.Get(key, query.FirstOrDefault);
>>>>>>>
var lsr = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync());
<<<<<<<
await _staticCacheManager.RemoveByPrefix(NopLocalizationDefaults.LocaleStringResourcesPrefixCacheKey);
=======
_staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<LocaleStringResource>.Prefix);
>>>>>>>
await _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<LocaleStringResource>.Prefix);
<<<<<<<
await _staticCacheManager.RemoveByPrefix(NopLocalizationDefaults.LocaleStringResourcesPrefixCacheKey);
=======
_staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<LocaleStringResource>.Prefix);
>>>>>>>
await _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<LocaleStringResource>.Prefix); |
<<<<<<<
await RemoveByPrefix(NopDiscountDefaults.DiscountManufacturerIdsPrefixCacheKey);
=======
RemoveByPrefix(NopDiscountDefaults.ManufacturerIdsPrefix);
>>>>>>>
await RemoveByPrefix(NopDiscountDefaults.ManufacturerIdsPrefix); |
<<<<<<<
if (shippingMethod == null)
throw new ArgumentNullException(nameof(shippingMethod));
await _shippingMethodRepository.Delete(shippingMethod);
//event notification
await _eventPublisher.EntityDeleted(shippingMethod);
=======
_shippingMethodRepository.Delete(shippingMethod);
>>>>>>>
await _shippingMethodRepository.Delete(shippingMethod);
<<<<<<<
if (shippingMethodId == 0)
return null;
return await _shippingMethodRepository.ToCachedGetById(shippingMethodId);
=======
return _shippingMethodRepository.GetById(shippingMethodId, cache => default);
>>>>>>>
return await _shippingMethodRepository.GetById(shippingMethodId, cache => default);
<<<<<<<
if (shippingMethod == null)
throw new ArgumentNullException(nameof(shippingMethod));
await _shippingMethodRepository.Insert(shippingMethod);
//event notification
await _eventPublisher.EntityInserted(shippingMethod);
=======
_shippingMethodRepository.Insert(shippingMethod);
>>>>>>>
await _shippingMethodRepository.Insert(shippingMethod);
<<<<<<<
if (shippingMethod == null)
throw new ArgumentNullException(nameof(shippingMethod));
await _shippingMethodRepository.Update(shippingMethod);
//event notification
await _eventPublisher.EntityUpdated(shippingMethod);
=======
_shippingMethodRepository.Update(shippingMethod);
>>>>>>>
await _shippingMethodRepository.Update(shippingMethod);
<<<<<<<
if (shippingMethodCountryMapping == null)
throw new ArgumentNullException(nameof(shippingMethodCountryMapping));
await _shippingMethodCountryMappingRepository.Insert(shippingMethodCountryMapping);
//event notification
await _eventPublisher.EntityInserted(shippingMethodCountryMapping);
=======
_shippingMethodCountryMappingRepository.Insert(shippingMethodCountryMapping);
>>>>>>>
await _shippingMethodCountryMappingRepository.Insert(shippingMethodCountryMapping);
<<<<<<<
if (shippingMethodCountryMapping == null)
throw new ArgumentNullException(nameof(shippingMethodCountryMapping));
await _shippingMethodCountryMappingRepository.Delete(shippingMethodCountryMapping);
//event notification
await _eventPublisher.EntityDeleted(shippingMethodCountryMapping);
=======
_shippingMethodCountryMappingRepository.Delete(shippingMethodCountryMapping);
>>>>>>>
await _shippingMethodCountryMappingRepository.Delete(shippingMethodCountryMapping);
<<<<<<<
if (warehouse == null)
throw new ArgumentNullException(nameof(warehouse));
await _warehouseRepository.Delete(warehouse);
//event notification
await _eventPublisher.EntityDeleted(warehouse);
=======
_warehouseRepository.Delete(warehouse);
>>>>>>>
await _warehouseRepository.Delete(warehouse);
<<<<<<<
if (warehouseId == 0)
return null;
return await _warehouseRepository.ToCachedGetById(warehouseId);
=======
return _warehouseRepository.GetById(warehouseId, cache => default);
>>>>>>>
return await _warehouseRepository.GetById(warehouseId, cache => default);
<<<<<<<
var query = from wh in _warehouseRepository.Table
orderby wh.Name
select wh;
var warehouses = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopShippingDefaults.WarehousesAllCacheKey));
if (!string.IsNullOrEmpty(name))
=======
var warehouses = _warehouseRepository.GetAll(query=>
>>>>>>>
var warehouses = await _warehouseRepository.GetAll(query=>
<<<<<<<
if (warehouse == null)
throw new ArgumentNullException(nameof(warehouse));
await _warehouseRepository.Insert(warehouse);
//event notification
await _eventPublisher.EntityInserted(warehouse);
=======
_warehouseRepository.Insert(warehouse);
>>>>>>>
await _warehouseRepository.Insert(warehouse);
<<<<<<<
if (warehouse == null)
throw new ArgumentNullException(nameof(warehouse));
await _warehouseRepository.Update(warehouse);
//event notification
await _eventPublisher.EntityUpdated(warehouse);
=======
_warehouseRepository.Update(warehouse);
>>>>>>>
await _warehouseRepository.Update(warehouse); |
<<<<<<<
using Nop.Services.Infrastructure;
using Nop.Services.Security.Permissions;
=======
using Nop.Core.Infrastructure.AutoFac;
using Nop.Web.MVC.Infrastructure;
>>>>>>>
using Nop.Services.Infrastructure;
using Nop.Services.Security.Permissions;
using Nop.Core.Infrastructure.AutoFac;
using Nop.Web.MVC.Infrastructure;
<<<<<<<
//build container
var nopStarter = new NopStarter();
nopStarter.ContainerBuilding += nopStarter_ContainerBuilding;
nopStarter.ContainerBuildingComplete += nopStarter_ContainerBuildingComplete;
var container = nopStarter.BuildContainer();
//execute startup tasks
nopStarter.ExecuteStartUpTasks();
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
=======
DependencyResolver.SetResolver(
new AutofacDependencyResolver((Nop.Core.Context.Current.Container as AutoFacServiceContainer).Container));
>>>>>>>
DependencyResolver.SetResolver(
new AutofacDependencyResolver((Nop.Core.Context.Current.Container as AutoFacServiceContainer).Container));
<<<<<<<
protected void Application_BeginRequest(object sender, EventArgs e)
{
//register permissions
//TODO move to NopStarter after implementing Common Service Locator pattern
var permissionProviders = DependencyResolver.Current.GetService<TypeFinder>().FindClassesOfType<IPermissionProvider>();
foreach (var providerType in permissionProviders)
{
dynamic provider = Activator.CreateInstance(providerType);
DependencyResolver.Current.GetService<IPermissionService>().InstallPermissions(provider);
}
}
private void nopStarter_ContainerBuilding(object sender, ContainerBuilderEventArgs e)
{
//register controllers
e.Builder.RegisterControllers(typeof(MvcApplication).Assembly);
//register plugins controllers - TODO uncomment
//e.Builder.RegisterControllers(PluginManager.ReferencedPlugins.ToArray());
}
private void nopStarter_ContainerBuildingComplete(object sender, ContainerBuilderEventArgs e)
{
}
=======
>>>>>>>
protected void Application_BeginRequest(object sender, EventArgs e)
{
//register permissions
//TODO move to NopStarter after implementing Common Service Locator pattern
var permissionProviders = DependencyResolver.Current.GetService<TypeFinder>().FindClassesOfType<IPermissionProvider>();
foreach (var providerType in permissionProviders)
{
dynamic provider = Activator.CreateInstance(providerType);
DependencyResolver.Current.GetService<IPermissionService>().InstallPermissions(provider);
}
} |
<<<<<<<
using System.Threading.Tasks;
=======
using Autofac;
>>>>>>>
using System.Threading.Tasks;
using Autofac;
<<<<<<<
Text = $"{await _localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled")}: {string.Join(", ", notEnabled)} (<a href=\"{urlHelper.Action("UninstallAndDeleteUnusedPlugins", "Plugin", new { names=notEnabledSystemNames.ToArray() })}\">{await _localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled.AutoFixAndRestart")}</a>)"
=======
Text = $"{_localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled")}: {string.Join(", ", notEnabled)} (<a href=\"{urlHelper.Action("UninstallAndDeleteUnusedPlugins", "Plugin", new { names = notEnabledSystemNames.ToArray() })}\">{_localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled.AutoFixAndRestart")}</a>)"
>>>>>>>
Text = $"{await _localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled")}: {string.Join(", ", notEnabled)} (<a href=\"{urlHelper.Action("UninstallAndDeleteUnusedPlugins", "Plugin", new { names = notEnabledSystemNames.ToArray() })}\">{await _localizationService.GetResource("Admin.System.Warnings.PluginNotEnabled.AutoFixAndRestart")}</a>)"
<<<<<<<
//incompatible plugins
await PreparePluginsWarningModel(models);
=======
//plugins
PreparePluginsWarningModel(models);
>>>>>>>
//plugins
await PreparePluginsWarningModel(models); |
<<<<<<<
using System.Threading.Tasks;
=======
using Nop.Core.Caching;
>>>>>>>
using System.Threading.Tasks;
using Nop.Core.Caching;
<<<<<<<
return await _reviewTypeRepository.Table
.OrderBy(reviewType => reviewType.DisplayOrder).ThenBy(reviewType => reviewType.Id)
.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ReviewTypeAllCacheKey));
=======
return _reviewTypeRepository.GetAll(
query => query.OrderBy(reviewType => reviewType.DisplayOrder).ThenBy(reviewType => reviewType.Id),
cache => default);
>>>>>>>
return await _reviewTypeRepository.GetAll(
query => query.OrderBy(reviewType => reviewType.DisplayOrder).ThenBy(reviewType => reviewType.Id),
cache => default);
<<<<<<<
if (reviewTypeId == 0)
return null;
return await _reviewTypeRepository.ToCachedGetById(reviewTypeId);
=======
return _reviewTypeRepository.GetById(reviewTypeId, cache => default);
>>>>>>>
return await _reviewTypeRepository.GetById(reviewTypeId, cache => default);
<<<<<<<
if (reviewType == null)
throw new ArgumentNullException(nameof(reviewType));
await _reviewTypeRepository.Insert(reviewType);
//event notification
await _eventPublisher.EntityInserted(reviewType);
=======
_reviewTypeRepository.Insert(reviewType);
>>>>>>>
await _reviewTypeRepository.Insert(reviewType);
<<<<<<<
if (reviewType == null)
throw new ArgumentNullException(nameof(reviewType));
await _reviewTypeRepository.Update(reviewType);
//event notification
await _eventPublisher.EntityUpdated(reviewType);
=======
_reviewTypeRepository.Update(reviewType);
>>>>>>>
await _reviewTypeRepository.Update(reviewType);
<<<<<<<
var productReviewReviewTypeMappings = await query.ToCachedList(key);
=======
var productReviewReviewTypeMappings = _staticCacheManager.Get(key, query.ToList);
>>>>>>>
var productReviewReviewTypeMappings = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (productReviewReviewType == null)
throw new ArgumentNullException(nameof(productReviewReviewType));
await _productReviewReviewTypeMappingRepository.Insert(productReviewReviewType);
//event notification
await _eventPublisher.EntityInserted(productReviewReviewType);
=======
_productReviewReviewTypeMappingRepository.Insert(productReviewReviewType);
>>>>>>>
await _productReviewReviewTypeMappingRepository.Insert(productReviewReviewType); |
<<<<<<<
if (shipment == null)
throw new ArgumentNullException(nameof(shipment));
await _shipmentRepository.Delete(shipment);
//event notification
await _eventPublisher.EntityDeleted(shipment);
=======
_shipmentRepository.Delete(shipment);
>>>>>>>
await _shipmentRepository.Delete(shipment);
<<<<<<<
if (warehouseId > 0)
{
query = from s in query
join si in _siRepository.Table on s.Id equals si.ShipmentId
where si.WarehouseId == warehouseId
select s;
query = query.Distinct();
}
query = query.OrderByDescending(s => s.CreatedOnUtc);
var shipments = await query.ToPagedList(pageIndex, pageSize);
=======
>>>>>>>
<<<<<<<
if (shipmentIds == null || shipmentIds.Length == 0)
return new List<Shipment>();
var query = from o in _shipmentRepository.Table
where shipmentIds.Contains(o.Id)
select o;
var shipments = await query.ToListAsync();
//sort by passed identifiers
var sortedOrders = new List<Shipment>();
foreach (var id in shipmentIds)
{
var shipment = shipments.Find(x => x.Id == id);
if (shipment != null)
sortedOrders.Add(shipment);
}
return sortedOrders;
=======
return _shipmentRepository.GetByIds(shipmentIds);
>>>>>>>
return await _shipmentRepository.GetByIds(shipmentIds);
<<<<<<<
if (shipmentId == 0)
return null;
return await _shipmentRepository.GetById(shipmentId);
=======
return _shipmentRepository.GetById(shipmentId);
>>>>>>>
return await _shipmentRepository.GetById(shipmentId);
<<<<<<<
if (shipment == null)
throw new ArgumentNullException(nameof(shipment));
await _shipmentRepository.Insert(shipment);
//event notification
await _eventPublisher.EntityInserted(shipment);
=======
_shipmentRepository.Insert(shipment);
>>>>>>>
await _shipmentRepository.Insert(shipment);
<<<<<<<
if (shipment == null)
throw new ArgumentNullException(nameof(shipment));
await _shipmentRepository.Update(shipment);
//event notification
await _eventPublisher.EntityUpdated(shipment);
=======
_shipmentRepository.Update(shipment);
>>>>>>>
await _shipmentRepository.Update(shipment);
<<<<<<<
if (shipmentItem == null)
throw new ArgumentNullException(nameof(shipmentItem));
await _siRepository.Delete(shipmentItem);
//event notification
await _eventPublisher.EntityDeleted(shipmentItem);
=======
_siRepository.Delete(shipmentItem);
>>>>>>>
await _siRepository.Delete(shipmentItem);
<<<<<<<
if (shipmentItemId == 0)
return null;
return await _siRepository.GetById(shipmentItemId);
=======
return _siRepository.GetById(shipmentItemId);
>>>>>>>
return await _siRepository.GetById(shipmentItemId);
<<<<<<<
if (shipmentItem == null)
throw new ArgumentNullException(nameof(shipmentItem));
await _siRepository.Insert(shipmentItem);
//event notification
await _eventPublisher.EntityInserted(shipmentItem);
=======
_siRepository.Insert(shipmentItem);
>>>>>>>
await _siRepository.Insert(shipmentItem);
<<<<<<<
if (shipmentItem == null)
throw new ArgumentNullException(nameof(shipmentItem));
await _siRepository.Update(shipmentItem);
//event notification
await _eventPublisher.EntityUpdated(shipmentItem);
=======
_siRepository.Update(shipmentItem);
>>>>>>>
await _siRepository.Update(shipmentItem);
<<<<<<<
var order = await _orderRepository.ToCachedGetById(shipment.OrderId);
=======
var order = _orderRepository.GetById(shipment.OrderId, cache => default);
>>>>>>>
var order = await _orderRepository.GetById(shipment.OrderId, cache => default); |
<<<<<<<
AvailableAttributes = (await _specificationAttributeService.GetSpecificationAttributesWithOptions())
.Select(attributeWithOption => new SelectListItem(attributeWithOption.Name, attributeWithOption.Id.ToString()))
=======
AvailableAttributes = _specificationAttributeService.GetSpecificationAttributesWithOptions()
.Select(attributeWithOption =>
{
var attributeName = GetSpecificationAttributeName(attributeWithOption);
return new SelectListItem(attributeName, attributeWithOption.Id.ToString());
})
>>>>>>>
AvailableAttributes = (await _specificationAttributeService.GetSpecificationAttributesWithOptions())
.Select(attributeWithOption =>
{
var attributeName = GetSpecificationAttributeName(attributeWithOption);
return new SelectListItem(attributeName, attributeWithOption.Id.ToString());
})
<<<<<<<
model.AvailableAttributes = (await _specificationAttributeService.GetSpecificationAttributesWithOptions())
.Select(attributeWithOption => new SelectListItem(attributeWithOption.Name, attributeWithOption.Id.ToString()))
=======
model.AvailableAttributes = _specificationAttributeService.GetSpecificationAttributesWithOptions()
.Select(attributeWithOption =>
{
var attributeName = GetSpecificationAttributeName(attributeWithOption);
return new SelectListItem(attributeName, attributeWithOption.Id.ToString());
})
>>>>>>>
model.AvailableAttributes = (await _specificationAttributeService.GetSpecificationAttributesWithOptions())
.Select(attributeWithOption =>
{
var attributeName = GetSpecificationAttributeName(attributeWithOption);
return new SelectListItem(attributeName, attributeWithOption.Id.ToString());
}) |
<<<<<<<
if (giftCard == null)
throw new ArgumentNullException(nameof(giftCard));
await _giftCardRepository.Delete(giftCard);
//event notification
await _eventPublisher.EntityDeleted(giftCard);
=======
_giftCardRepository.Delete(giftCard);
>>>>>>>
await _giftCardRepository.Delete(giftCard);
<<<<<<<
if (giftCardId == 0)
return null;
return await _giftCardRepository.ToCachedGetById(giftCardId);
=======
return _giftCardRepository.GetById(giftCardId, cache => default);
>>>>>>>
return await _giftCardRepository.GetById(giftCardId, cache => default);
<<<<<<<
if (usedWithOrderId.HasValue)
query = from gc in query
join gcuh in _giftCardUsageHistoryRepository.Table on gc.Id equals gcuh.GiftCardId
where gcuh.UsedWithOrderId == usedWithOrderId
select gc;
if (createdFromUtc.HasValue)
query = query.Where(gc => createdFromUtc.Value <= gc.CreatedOnUtc);
if (createdToUtc.HasValue)
query = query.Where(gc => createdToUtc.Value >= gc.CreatedOnUtc);
if (isGiftCardActivated.HasValue)
query = query.Where(gc => gc.IsGiftCardActivated == isGiftCardActivated.Value);
if (!string.IsNullOrEmpty(giftCardCouponCode))
query = query.Where(gc => gc.GiftCardCouponCode == giftCardCouponCode);
if (!string.IsNullOrWhiteSpace(recipientName))
query = query.Where(c => c.RecipientName.Contains(recipientName));
query = query.OrderByDescending(gc => gc.CreatedOnUtc);
var giftCards = await query.ToPagedList(pageIndex, pageSize);
=======
if (usedWithOrderId.HasValue)
query = from gc in query
join gcuh in _giftCardUsageHistoryRepository.Table on gc.Id equals gcuh.GiftCardId
where gcuh.UsedWithOrderId == usedWithOrderId
select gc;
if (createdFromUtc.HasValue)
query = query.Where(gc => createdFromUtc.Value <= gc.CreatedOnUtc);
if (createdToUtc.HasValue)
query = query.Where(gc => createdToUtc.Value >= gc.CreatedOnUtc);
if (isGiftCardActivated.HasValue)
query = query.Where(gc => gc.IsGiftCardActivated == isGiftCardActivated.Value);
if (!string.IsNullOrEmpty(giftCardCouponCode))
query = query.Where(gc => gc.GiftCardCouponCode == giftCardCouponCode);
if (!string.IsNullOrWhiteSpace(recipientName))
query = query.Where(c => c.RecipientName.Contains(recipientName));
query = query.OrderByDescending(gc => gc.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
>>>>>>>
if (usedWithOrderId.HasValue)
query = from gc in query
join gcuh in _giftCardUsageHistoryRepository.Table on gc.Id equals gcuh.GiftCardId
where gcuh.UsedWithOrderId == usedWithOrderId
select gc;
if (createdFromUtc.HasValue)
query = query.Where(gc => createdFromUtc.Value <= gc.CreatedOnUtc);
if (createdToUtc.HasValue)
query = query.Where(gc => createdToUtc.Value >= gc.CreatedOnUtc);
if (isGiftCardActivated.HasValue)
query = query.Where(gc => gc.IsGiftCardActivated == isGiftCardActivated.Value);
if (!string.IsNullOrEmpty(giftCardCouponCode))
query = query.Where(gc => gc.GiftCardCouponCode == giftCardCouponCode);
if (!string.IsNullOrWhiteSpace(recipientName))
query = query.Where(c => c.RecipientName.Contains(recipientName));
query = query.OrderByDescending(gc => gc.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
<<<<<<<
if (giftCard == null)
throw new ArgumentNullException(nameof(giftCard));
await _giftCardRepository.Insert(giftCard);
//event notification
await _eventPublisher.EntityInserted(giftCard);
=======
_giftCardRepository.Insert(giftCard);
>>>>>>>
await _giftCardRepository.Insert(giftCard);
<<<<<<<
if (giftCard == null)
throw new ArgumentNullException(nameof(giftCard));
await _giftCardRepository.Update(giftCard);
//event notification
await _eventPublisher.EntityUpdated(giftCard);
=======
_giftCardRepository.Update(giftCard);
>>>>>>>
await _giftCardRepository.Update(giftCard);
<<<<<<<
foreach (var giftCard in giftCards)
{
await _eventPublisher.EntityUpdated(giftCard);
}
=======
foreach (var giftCard in giftCards)
_eventPublisher.EntityUpdated(giftCard);
>>>>>>>
foreach (var giftCard in giftCards)
await _eventPublisher.EntityUpdated(giftCard);
<<<<<<<
if (giftCardUsageHistory is null)
throw new ArgumentNullException(nameof(giftCardUsageHistory));
await _giftCardUsageHistoryRepository.Insert(giftCardUsageHistory);
//event notification
await _eventPublisher.EntityInserted(giftCardUsageHistory);
=======
_giftCardUsageHistoryRepository.Insert(giftCardUsageHistory);
>>>>>>>
await _giftCardUsageHistoryRepository.Insert(giftCardUsageHistory); |
<<<<<<<
private readonly IGenericAttributeService _genericAttributeService;
=======
private readonly ILocalizedModelFactory _localizedModelFactory;
>>>>>>>
private readonly ILocalizedModelFactory _localizedModelFactory;
private readonly IGenericAttributeService _genericAttributeService;
<<<<<<<
IGenericAttributeService genericAttributeService,
=======
ILocalizedModelFactory localizedModelFactory,
>>>>>>>
ILocalizedModelFactory localizedModelFactory,
IGenericAttributeService genericAttributeService,
<<<<<<<
this._genericAttributeService = genericAttributeService;
=======
this._localizedModelFactory = localizedModelFactory;
>>>>>>>
this._localizedModelFactory = localizedModelFactory;
this._genericAttributeService = genericAttributeService; |
<<<<<<<
if (newsLetterSubscription.Active)
await PublishSubscriptionEvent(newsLetterSubscription, true, publishSubscriptionEvents);
//Publish event
await _eventPublisher.EntityInserted(newsLetterSubscription);
=======
if (newsLetterSubscription.Active)
{
PublishSubscriptionEvent(newsLetterSubscription, true, publishSubscriptionEvents);
}
>>>>>>>
if (newsLetterSubscription.Active)
await PublishSubscriptionEvent(newsLetterSubscription, true, publishSubscriptionEvents);
<<<<<<<
await _subscriptionRepository.Update(newsLetterSubscription);
=======
_subscriptionRepository.Update(newsLetterSubscription);
//Publish event
_eventPublisher.EntityUpdated(newsLetterSubscription);
>>>>>>>
await _subscriptionRepository.Update(newsLetterSubscription);
//Publish event
await _eventPublisher.EntityUpdated(newsLetterSubscription);
<<<<<<<
//Publish event
await _eventPublisher.EntityUpdated(newsLetterSubscription);
=======
>>>>>>>
if (originalSubscription.Active && !newsLetterSubscription.Active)
//If the previous entry was true, but this one is false
await PublishSubscriptionEvent(originalSubscription, false, publishSubscriptionEvents);
<<<<<<<
await _subscriptionRepository.Delete(newsLetterSubscription);
=======
_subscriptionRepository.Delete(newsLetterSubscription);
//event notification
_eventPublisher.EntityDeleted(newsLetterSubscription);
>>>>>>>
await _subscriptionRepository.Delete(newsLetterSubscription);
//event notification
await _eventPublisher.EntityDeleted(newsLetterSubscription);
<<<<<<<
await PublishSubscriptionEvent(newsLetterSubscription, false, publishSubscriptionEvents);
//event notification
await _eventPublisher.EntityDeleted(newsLetterSubscription);
=======
PublishSubscriptionEvent(newsLetterSubscription, false, publishSubscriptionEvents);
>>>>>>>
await PublishSubscriptionEvent(newsLetterSubscription, false, publishSubscriptionEvents);
<<<<<<<
if (newsLetterSubscriptionId == 0) return null;
return await _subscriptionRepository.ToCachedGetById(newsLetterSubscriptionId);
=======
return _subscriptionRepository.GetById(newsLetterSubscriptionId, cache => default);
>>>>>>>
return await _subscriptionRepository.GetById(newsLetterSubscriptionId, cache => default);
<<<<<<<
var query = _subscriptionRepository.Table;
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.OrderBy(nls => nls.Email);
var subscriptions = await query.ToPagedList(pageIndex, pageSize);
=======
var subscriptions = _subscriptionRepository.GetAllPaged(query =>
{
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.OrderBy(nls => nls.Email);
return query;
}, pageIndex, pageSize);
>>>>>>>
var subscriptions = await _subscriptionRepository.GetAllPaged(query =>
{
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.OrderBy(nls => nls.Email);
return query;
}, pageIndex, pageSize);
<<<<<<<
var query = _subscriptionRepository.Table;
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.Where(nls => !_customerRepository.Table.Any(c => c.Email == nls.Email));
query = query.OrderBy(nls => nls.Email);
var subscriptions = await query.ToPagedList(pageIndex, pageSize);
=======
var subscriptions = _subscriptionRepository.GetAllPaged(query =>
{
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.Where(nls => !_customerRepository.Table.Any(c => c.Email == nls.Email));
query = query.OrderBy(nls => nls.Email);
return query;
}, pageIndex, pageSize);
>>>>>>>
var subscriptions = await _subscriptionRepository.GetAllPaged(query =>
{
if (!string.IsNullOrEmpty(email))
query = query.Where(nls => nls.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(nls => nls.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(nls => nls.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(nls => nls.Active == isActive.Value);
query = query.Where(nls => !_customerRepository.Table.Any(c => c.Email == nls.Email));
query = query.OrderBy(nls => nls.Email);
return query;
}, pageIndex, pageSize);
<<<<<<<
//other customer roles (not guests)
var query = _subscriptionRepository.Table.Join(_customerRepository.Table,
nls => nls.Email,
c => c.Email,
(nls, c) => new
{
NewsletterSubscribers = nls,
Customer = c
});
query = query.Where(x => _customerCustomerRoleMappingRepository.Table.Any(ccrm => ccrm.CustomerId == x.Customer.Id && ccrm.CustomerRoleId == customerRoleId));
if (!string.IsNullOrEmpty(email))
query = query.Where(x => x.NewsletterSubscribers.Email.Contains(email));
if (createdFromUtc.HasValue)
query = query.Where(x => x.NewsletterSubscribers.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
query = query.Where(x => x.NewsletterSubscribers.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
query = query.Where(x => x.NewsletterSubscribers.StoreId == storeId);
if (isActive.HasValue)
query = query.Where(x => x.NewsletterSubscribers.Active == isActive.Value);
query = query.OrderBy(x => x.NewsletterSubscribers.Email);
var subscriptions = await query.Select(x => x.NewsletterSubscribers).ToPagedList(pageIndex, pageSize);
=======
var subscriptions = _subscriptionRepository.GetAllPaged(query =>
{
//other customer roles (not guests)
var joindQuery = query.Join(_customerRepository.Table,
nls => nls.Email,
c => c.Email,
(nls, c) => new {NewsletterSubscribers = nls, Customer = c});
joindQuery = joindQuery.Where(x => _customerCustomerRoleMappingRepository.Table.Any(ccrm =>
ccrm.CustomerId == x.Customer.Id && ccrm.CustomerRoleId == customerRoleId));
if (!string.IsNullOrEmpty(email))
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.Email.Contains(email));
if (createdFromUtc.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.StoreId == storeId);
if (isActive.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.Active == isActive.Value);
joindQuery = joindQuery.OrderBy(x => x.NewsletterSubscribers.Email);
return joindQuery.Select(x => x.NewsletterSubscribers);
}, pageIndex, pageSize);
>>>>>>>
var subscriptions = await _subscriptionRepository.GetAllPaged(query =>
{
//other customer roles (not guests)
var joindQuery = query.Join(_customerRepository.Table,
nls => nls.Email,
c => c.Email,
(nls, c) => new {NewsletterSubscribers = nls, Customer = c});
joindQuery = joindQuery.Where(x => _customerCustomerRoleMappingRepository.Table.Any(ccrm =>
ccrm.CustomerId == x.Customer.Id && ccrm.CustomerRoleId == customerRoleId));
if (!string.IsNullOrEmpty(email))
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.Email.Contains(email));
if (createdFromUtc.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.CreatedOnUtc >= createdFromUtc.Value);
if (createdToUtc.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.CreatedOnUtc <= createdToUtc.Value);
if (storeId > 0)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.StoreId == storeId);
if (isActive.HasValue)
joindQuery = joindQuery.Where(x => x.NewsletterSubscribers.Active == isActive.Value);
joindQuery = joindQuery.OrderBy(x => x.NewsletterSubscribers.Email);
return joindQuery.Select(x => x.NewsletterSubscribers);
}, pageIndex, pageSize); |
<<<<<<<
if (checkoutAttribute == null)
throw new ArgumentNullException(nameof(checkoutAttribute));
await _checkoutAttributeRepository.Delete(checkoutAttribute);
//event notification
await _eventPublisher.EntityDeleted(checkoutAttribute);
=======
_checkoutAttributeRepository.Delete(checkoutAttribute);
>>>>>>>
await _checkoutAttributeRepository.Delete(checkoutAttribute);
<<<<<<<
var checkoutAttributes = await query.ToListAsync();
=======
>>>>>>>
<<<<<<<
if (checkoutAttributeId == 0)
return null;
return await _checkoutAttributeRepository.ToCachedGetById(checkoutAttributeId);
=======
return _checkoutAttributeRepository.GetById(checkoutAttributeId, cache => default);
>>>>>>>
return await _checkoutAttributeRepository.GetById(checkoutAttributeId, cache => default);
<<<<<<<
if (checkoutAttributeIds == null || checkoutAttributeIds.Length == 0)
return new List<CheckoutAttribute>();
var query = from p in _checkoutAttributeRepository.Table
where checkoutAttributeIds.Contains(p.Id)
select p;
return await query.ToListAsync();
=======
return _checkoutAttributeRepository.GetByIds(checkoutAttributeIds);
>>>>>>>
return await _checkoutAttributeRepository.GetByIds(checkoutAttributeIds);
<<<<<<<
if (checkoutAttribute == null)
throw new ArgumentNullException(nameof(checkoutAttribute));
await _checkoutAttributeRepository.Insert(checkoutAttribute);
//event notification
await _eventPublisher.EntityInserted(checkoutAttribute);
=======
_checkoutAttributeRepository.Insert(checkoutAttribute);
>>>>>>>
await _checkoutAttributeRepository.Insert(checkoutAttribute);
<<<<<<<
if (checkoutAttribute == null)
throw new ArgumentNullException(nameof(checkoutAttribute));
await _checkoutAttributeRepository.Update(checkoutAttribute);
//event notification
await _eventPublisher.EntityUpdated(checkoutAttribute);
=======
_checkoutAttributeRepository.Update(checkoutAttribute);
>>>>>>>
await _checkoutAttributeRepository.Update(checkoutAttribute);
<<<<<<<
if (checkoutAttributeValue == null)
throw new ArgumentNullException(nameof(checkoutAttributeValue));
await _checkoutAttributeValueRepository.Delete(checkoutAttributeValue);
//event notification
await _eventPublisher.EntityDeleted(checkoutAttributeValue);
=======
_checkoutAttributeValueRepository.Delete(checkoutAttributeValue);
>>>>>>>
await _checkoutAttributeValueRepository.Delete(checkoutAttributeValue);
<<<<<<<
var checkoutAttributeValues = await query.ToCachedList(key);
=======
var checkoutAttributeValues = _staticCacheManager.Get(key, query.ToList);
>>>>>>>
var checkoutAttributeValues = await _staticCacheManager.Get(key, async ()=> await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (checkoutAttributeValueId == 0)
return null;
return await _checkoutAttributeValueRepository.ToCachedGetById(checkoutAttributeValueId);
=======
return _checkoutAttributeValueRepository.GetById(checkoutAttributeValueId, cache => default);
>>>>>>>
return await _checkoutAttributeValueRepository.GetById(checkoutAttributeValueId, cache => default);
<<<<<<<
if (checkoutAttributeValue == null)
throw new ArgumentNullException(nameof(checkoutAttributeValue));
await _checkoutAttributeValueRepository.Insert(checkoutAttributeValue);
//event notification
await _eventPublisher.EntityInserted(checkoutAttributeValue);
=======
_checkoutAttributeValueRepository.Insert(checkoutAttributeValue);
>>>>>>>
await _checkoutAttributeValueRepository.Insert(checkoutAttributeValue);
<<<<<<<
if (checkoutAttributeValue == null)
throw new ArgumentNullException(nameof(checkoutAttributeValue));
await _checkoutAttributeValueRepository.Update(checkoutAttributeValue);
//event notification
await _eventPublisher.EntityUpdated(checkoutAttributeValue);
=======
_checkoutAttributeValueRepository.Update(checkoutAttributeValue);
>>>>>>>
await _checkoutAttributeValueRepository.Update(checkoutAttributeValue); |
<<<<<<<
model.ExportImportProductSpecificationAttributes_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportProductSpecificationAttributes, storeScope);
model.ExportImportProductCategoryBreadcrumb_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportProductCategoryBreadcrumb, storeScope);
=======
model.ExportImportCategoriesUsingCategoryName_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportCategoriesUsingCategoryName, storeScope);
>>>>>>>
model.ExportImportProductSpecificationAttributes_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportProductSpecificationAttributes, storeScope);
model.ExportImportProductCategoryBreadcrumb_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportProductCategoryBreadcrumb, storeScope);
model.ExportImportCategoriesUsingCategoryName_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportCategoriesUsingCategoryName, storeScope);
<<<<<<<
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportProductSpecificationAttributes, model.ExportImportProductSpecificationAttributes_OverrideForStore, storeScope, false);
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportProductCategoryBreadcrumb, model.ExportImportProductCategoryBreadcrumb_OverrideForStore, storeScope, false);
=======
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportCategoriesUsingCategoryName, model.ExportImportCategoriesUsingCategoryName_OverrideForStore, storeScope, false);
>>>>>>>
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportProductSpecificationAttributes, model.ExportImportProductSpecificationAttributes_OverrideForStore, storeScope, false);
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportProductCategoryBreadcrumb, model.ExportImportProductCategoryBreadcrumb_OverrideForStore, storeScope, false);
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportCategoriesUsingCategoryName, model.ExportImportCategoriesUsingCategoryName_OverrideForStore, storeScope, false); |
<<<<<<<
if (measureDimension == null)
throw new ArgumentNullException(nameof(measureDimension));
await _measureDimensionRepository.Delete(measureDimension);
//event notification
await _eventPublisher.EntityDeleted(measureDimension);
=======
_measureDimensionRepository.Delete(measureDimension);
>>>>>>>
await _measureDimensionRepository.Delete(measureDimension);
<<<<<<<
if (measureDimensionId == 0)
return null;
return await _measureDimensionRepository.ToCachedGetById(measureDimensionId);
=======
return _measureDimensionRepository.GetById(measureDimensionId, cache => default);
>>>>>>>
return await _measureDimensionRepository.GetById(measureDimensionId, cache => default);
<<<<<<<
var query = from md in _measureDimensionRepository.Table
orderby md.DisplayOrder, md.Id
select md;
var measureDimensions = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopDirectoryDefaults.MeasureDimensionsAllCacheKey));
=======
var measureDimensions = _measureDimensionRepository.GetAll(query =>
{
return from md in query
orderby md.DisplayOrder, md.Id
select md;
}, cache => default);
>>>>>>>
var measureDimensions = await _measureDimensionRepository.GetAll(query =>
{
return from md in query
orderby md.DisplayOrder, md.Id
select md;
}, cache => default);
<<<<<<<
if (measure == null)
throw new ArgumentNullException(nameof(measure));
await _measureDimensionRepository.Insert(measure);
//event notification
await _eventPublisher.EntityInserted(measure);
=======
_measureDimensionRepository.Insert(measure);
>>>>>>>
await _measureDimensionRepository.Insert(measure);
<<<<<<<
if (measure == null)
throw new ArgumentNullException(nameof(measure));
await _measureDimensionRepository.Update(measure);
//event notification
await _eventPublisher.EntityUpdated(measure);
=======
_measureDimensionRepository.Update(measure);
>>>>>>>
await _measureDimensionRepository.Update(measure);
<<<<<<<
if (measureWeight == null)
throw new ArgumentNullException(nameof(measureWeight));
await _measureWeightRepository.Delete(measureWeight);
//event notification
await _eventPublisher.EntityDeleted(measureWeight);
=======
_measureWeightRepository.Delete(measureWeight);
>>>>>>>
await _measureWeightRepository.Delete(measureWeight);
<<<<<<<
if (measureWeightId == 0)
return null;
return await _measureWeightRepository.ToCachedGetById(measureWeightId);
=======
return _measureWeightRepository.GetById(measureWeightId, cache => default);
>>>>>>>
return await _measureWeightRepository.GetById(measureWeightId, cache => default);
<<<<<<<
var query = from mw in _measureWeightRepository.Table
orderby mw.DisplayOrder, mw.Id
select mw;
var measureWeights = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopDirectoryDefaults.MeasureWeightsAllCacheKey));
=======
var measureWeights = _measureWeightRepository.GetAll(query =>
{
return from mw in query
orderby mw.DisplayOrder, mw.Id
select mw;
}, cache => default);
>>>>>>>
var measureWeights = await _measureWeightRepository.GetAll(query =>
{
return from mw in query
orderby mw.DisplayOrder, mw.Id
select mw;
}, cache => default);
<<<<<<<
if (measure == null)
throw new ArgumentNullException(nameof(measure));
await _measureWeightRepository.Insert(measure);
//event notification
await _eventPublisher.EntityInserted(measure);
=======
_measureWeightRepository.Insert(measure);
>>>>>>>
await _measureWeightRepository.Insert(measure);
<<<<<<<
if (measure == null)
throw new ArgumentNullException(nameof(measure));
await _measureWeightRepository.Update(measure);
//event notification
await _eventPublisher.EntityUpdated(measure);
=======
_measureWeightRepository.Update(measure);
>>>>>>>
await _measureWeightRepository.Update(measure); |
<<<<<<<
var storeId = await _storeContext.GetActiveStoreScopeConfigurationAsync();
var customerSettings = await _settingService.LoadSettingAsync<CustomerSettings>(storeId);
=======
var storeId = _storeContext.ActiveStoreScopeConfiguration;
var customerSettings = _settingService.LoadSetting<CustomerSettings>(storeId);
>>>>>>>
var storeId = await _storeContext.GetActiveStoreScopeConfigurationAsync();
var customerSettings = await _settingService.LoadSettingAsync<CustomerSettings>(storeId);
<<<<<<<
/// Prepare full-text settings model
/// </summary>
/// <returns>Full-text settings model</returns>
protected virtual async Task<FullTextSettingsModel> PrepareFullTextSettingsModelAsync()
{
//load settings for a chosen store scope
var storeId = await _storeContext.GetActiveStoreScopeConfigurationAsync();
var commonSettings = await _settingService.LoadSettingAsync<CommonSettings>(storeId);
//fill in model values from the entity
var model = new FullTextSettingsModel
{
Enabled = commonSettings.UseFullTextSearch,
SearchMode = (int)commonSettings.FullTextMode
};
//fill in additional values (not existing in the entity)
model.Supported = await _fulltextService.IsFullTextSupportedAsync();
model.SearchModeValues = await commonSettings.FullTextMode.ToSelectList();
return model;
}
/// <summary>
=======
>>>>>>>
<<<<<<<
//prepare full-text settings model
model.FullTextSettings = await PrepareFullTextSettingsModelAsync();
=======
>>>>>>> |
<<<<<<<
await Remove(NopCustomerServicesDefaults.CustomerAttributesAllCacheKey);
await Remove(_cacheKeyService.PrepareKey(NopCustomerServicesDefaults.CustomerAttributeValuesAllCacheKey, entity));
=======
Remove(NopCustomerServicesDefaults.CustomerAttributeValuesByAttributeCacheKey, entity);
>>>>>>>
await Remove(NopCustomerServicesDefaults.CustomerAttributeValuesByAttributeCacheKey, entity); |
<<<<<<<
model.AddSms.AvailableMessages = (await _messageTemplateService.GetAllMessageTemplatesAsync(storeId)).Select(messageTemplate =>
=======
var stores = await _storeService.GetAllStores();
var messageTemplates = await _messageTemplateService.GetAllMessageTemplates(storeId);
model.AddSms.AvailableMessages = await messageTemplates.ToAsyncEnumerable().SelectAwait(async messageTemplate =>
>>>>>>>
var stores = await _storeService.GetAllStoresAsync();
var messageTemplates = await _messageTemplateService.GetAllMessageTemplatesAsync(storeId);
model.AddSms.AvailableMessages = await messageTemplates.ToAsyncEnumerable().SelectAwait(async messageTemplate =>
<<<<<<<
var storeIds = _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate).Result;
var storeNames = _storeService.GetAllStoresAsync().Result.Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
=======
var storeIds = await _storeMappingService.GetStoresIdsWithAccess(messageTemplate);
var storeNames = stores.Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
>>>>>>>
var storeIds = await _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate);
var storeNames = stores.Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
<<<<<<<
var templateId = _genericAttributeService.GetAttributeAsync<int?>(messageTemplate, SendinBlueDefaults.TemplateIdAttribute).Result;
var stores = _storeService.GetAllStoresAsync().Result
.Where(store => !messageTemplate.LimitedToStores || _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate).Result.Contains(store.Id))
.Aggregate(string.Empty, (current, next) => $"{current}, {next.Name}").Trim(',');
=======
var templateId = await _genericAttributeService.GetAttribute<int?>(messageTemplate, SendinBlueDefaults.TemplateIdAttribute);
var stores = (await (await _storeService.GetAllStores())
.ToAsyncEnumerable()
.WhereAwait(async store => !messageTemplate.LimitedToStores
|| (await _storeMappingService.GetStoresIdsWithAccess(messageTemplate)).Contains(store.Id))
.AggregateAsync(string.Empty, (current, next) => $"{current}, {next.Name}"))
.Trim(',');
>>>>>>>
var templateId = await _genericAttributeService.GetAttributeAsync<int?>(messageTemplate, SendinBlueDefaults.TemplateIdAttribute);
var stores = (await (await _storeService.GetAllStoresAsync())
.ToAsyncEnumerable()
.WhereAwait(async store => !messageTemplate.LimitedToStores
|| (await _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate)).Contains(store.Id))
.AggregateAsync(string.Empty, (current, next) => $"{current}, {next.Name}"))
.Trim(',');
<<<<<<<
var messageTemplates = (await _messageTemplateService.GetAllMessageTemplatesAsync(storeId))
.Where(messageTemplate => _genericAttributeService.GetAttributeAsync<bool>(messageTemplate, SendinBlueDefaults.UseSmsAttribute).Result)
.ToList().ToPagedList(searchModel);
=======
var allMessageTemplates = await _messageTemplateService.GetAllMessageTemplates(storeId);
var messageTemplates = await allMessageTemplates
.ToAsyncEnumerable()
.WhereAwait(async messageTemplate => await _genericAttributeService.GetAttribute<bool>(messageTemplate, SendinBlueDefaults.UseSmsAttribute))
.ToPagedListAsync(searchModel);
>>>>>>>
var allMessageTemplates = await _messageTemplateService.GetAllMessageTemplatesAsync(storeId);
var messageTemplates = await allMessageTemplates
.ToAsyncEnumerable()
.WhereAwait(async messageTemplate => await _genericAttributeService.GetAttributeAsync<bool>(messageTemplate, SendinBlueDefaults.UseSmsAttribute))
.ToPagedListAsync(searchModel);
<<<<<<<
var phoneTypeID = _genericAttributeService.GetAttributeAsync<int>(messageTemplate, SendinBlueDefaults.PhoneTypeAttribute).Result;
=======
var phoneTypeID = await _genericAttributeService.GetAttribute<int>(messageTemplate, SendinBlueDefaults.PhoneTypeAttribute);
>>>>>>>
var phoneTypeID = await _genericAttributeService.GetAttributeAsync<int>(messageTemplate, SendinBlueDefaults.PhoneTypeAttribute);
<<<<<<<
Text = _genericAttributeService.GetAttributeAsync<string>(messageTemplate, SendinBlueDefaults.SmsTextAttribute).Result
=======
Text = await _genericAttributeService.GetAttribute<string>(messageTemplate, SendinBlueDefaults.SmsTextAttribute)
>>>>>>>
Text = await _genericAttributeService.GetAttributeAsync<string>(messageTemplate, SendinBlueDefaults.SmsTextAttribute)
<<<<<<<
var storeIds = _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate).Result;
var storeNames = _storeService.GetAllStoresAsync().Result.Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
=======
var storeIds = await _storeMappingService.GetStoresIdsWithAccess(messageTemplate);
var storeNames = (await _storeService.GetAllStores()).Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
>>>>>>>
var storeIds = await _storeMappingService.GetStoresIdsWithAccessAsync(messageTemplate);
var storeNames = (await _storeService.GetAllStoresAsync()).Where(store => storeIds.Contains(store.Id)).Select(store => store.Name);
<<<<<<<
smsModel.PhoneType = _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.MyPhone").Result;
=======
smsModel.PhoneType = await _localizationService.GetResource("Plugins.Misc.SendinBlue.MyPhone");
>>>>>>>
smsModel.PhoneType = await _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.MyPhone");
<<<<<<<
smsModel.PhoneType = _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.CustomerPhone").Result;
=======
smsModel.PhoneType = await _localizationService.GetResource("Plugins.Misc.SendinBlue.CustomerPhone");
>>>>>>>
smsModel.PhoneType = await _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.CustomerPhone");
<<<<<<<
smsModel.PhoneType = _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.BillingAddressPhone").Result;
=======
smsModel.PhoneType = await _localizationService.GetResource("Plugins.Misc.SendinBlue.BillingAddressPhone");
>>>>>>>
smsModel.PhoneType = await _localizationService.GetResourceAsync("Plugins.Misc.SendinBlue.BillingAddressPhone"); |
<<<<<<<
await installationService.InstallRequiredDataAsync(model.AdminEmail, model.AdminPassword);
=======
installationService.InstallRequiredData(model.AdminEmail, model.AdminPassword, downloadUrl, regionInfo, cultureInfo);
>>>>>>>
await installationService.InstallRequiredDataAsync(model.AdminEmail, model.AdminPassword, downloadUrl, regionInfo, cultureInfo);
<<<<<<<
//installation completed notification
try
{
var languageCode = _locService.GetCurrentLanguage().Code;
var client = EngineContext.Current.Resolve<NopHttpClient>();
await client.InstallationCompletedAsync(model.AdminEmail, languageCode[0..2]);
}
catch
{
// ignored
}
=======
>>>>>>> |
<<<<<<<
if (subscription == null)
throw new ArgumentNullException(nameof(subscription));
await _backInStockSubscriptionRepository.Delete(subscription);
//event notification
await _eventPublisher.EntityDeleted(subscription);
=======
_backInStockSubscriptionRepository.Delete(subscription);
>>>>>>>
await _backInStockSubscriptionRepository.Delete(subscription);
<<<<<<<
return await query.ToPagedList(pageIndex, pageSize);
=======
return query;
}, pageIndex, pageSize);
>>>>>>>
return query;
}, pageIndex, pageSize);
<<<<<<<
var query = _backInStockSubscriptionRepository.Table;
//product
query = query.Where(biss => biss.ProductId == productId);
//store
if (storeId > 0)
query = query.Where(biss => biss.StoreId == storeId);
//customer
query = from biss in query
join c in _customerRepository.Table on biss.CustomerId equals c.Id
where c.Active && !c.Deleted
select biss;
query = query.OrderByDescending(biss => biss.CreatedOnUtc);
return await query.ToPagedList(pageIndex, pageSize);
=======
return _backInStockSubscriptionRepository.GetAllPaged(query =>
{
//product
query = query.Where(biss => biss.ProductId == productId);
//store
if (storeId > 0)
query = query.Where(biss => biss.StoreId == storeId);
//customer
query = from biss in query
join c in _customerRepository.Table on biss.CustomerId equals c.Id
where c.Active && !c.Deleted
select biss;
query = query.OrderByDescending(biss => biss.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
>>>>>>>
return await _backInStockSubscriptionRepository.GetAllPaged(query =>
{
//product
query = query.Where(biss => biss.ProductId == productId);
//store
if (storeId > 0)
query = query.Where(biss => biss.StoreId == storeId);
//customer
query = from biss in query
join c in _customerRepository.Table on biss.CustomerId equals c.Id
where c.Active && !c.Deleted
select biss;
query = query.OrderByDescending(biss => biss.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
<<<<<<<
if (subscriptionId == 0)
return null;
var subscription = await _backInStockSubscriptionRepository.ToCachedGetById(subscriptionId);
return subscription;
=======
return _backInStockSubscriptionRepository.GetById(subscriptionId, cache => default);
>>>>>>>
return await _backInStockSubscriptionRepository.GetById(subscriptionId, cache => default);
<<<<<<<
if (subscription == null)
throw new ArgumentNullException(nameof(subscription));
await _backInStockSubscriptionRepository.Insert(subscription);
//event notification
await _eventPublisher.EntityInserted(subscription);
=======
_backInStockSubscriptionRepository.Insert(subscription);
>>>>>>>
await _backInStockSubscriptionRepository.Insert(subscription);
<<<<<<<
if (subscription == null)
throw new ArgumentNullException(nameof(subscription));
await _backInStockSubscriptionRepository.Update(subscription);
//event notification
await _eventPublisher.EntityUpdated(subscription);
=======
_backInStockSubscriptionRepository.Update(subscription);
>>>>>>>
await _backInStockSubscriptionRepository.Update(subscription); |
<<<<<<<
/// <param name="config"></param>
private static async Task LoadPluginsInfo(NopConfig config)
=======
/// <param name="appSettings">App settings</param>
private static void LoadPluginsInfo(AppSettings appSettings)
>>>>>>>
/// <param name="appSettings">App settings</param>
private static async Task LoadPluginsInfo(AppSettings appSettings)
<<<<<<<
if (await PluginsInfo.LoadPluginInfo() || useRedisToStorePluginsInfo || !config.RedisEnabled)
=======
if (PluginsInfo.LoadPluginInfo() || useRedisToStorePluginsInfo || !appSettings.RedisConfig.Enabled)
>>>>>>>
if (await PluginsInfo.LoadPluginInfo() || useRedisToStorePluginsInfo || !appSettings.RedisConfig.Enabled)
<<<<<<<
redisPluginsInfo = new RedisPluginsInfo(_fileProvider, new RedisConnectionWrapper(config), config);
await redisPluginsInfo.Save();
=======
redisPluginsInfo = new RedisPluginsInfo(appSettings, _fileProvider, new RedisConnectionWrapper(appSettings));
redisPluginsInfo.Save();
>>>>>>>
redisPluginsInfo = new RedisPluginsInfo(appSettings, _fileProvider, new RedisConnectionWrapper(appSettings));
await redisPluginsInfo.Save();
<<<<<<<
/// <param name="config">Config</param>
public static async Task InitializePlugins(this ApplicationPartManager applicationPartManager, NopConfig config)
=======
/// <param name="appSettings">App settings</param>
public static void InitializePlugins(this ApplicationPartManager applicationPartManager, AppSettings appSettings)
>>>>>>>
/// <param name="appSettings">App settings</param>
public static async Task InitializePlugins(this ApplicationPartManager applicationPartManager, AppSettings appSettings)
<<<<<<<
await LoadPluginsInfo(config);
=======
LoadPluginsInfo(appSettings);
>>>>>>>
await LoadPluginsInfo(appSettings); |
<<<<<<<
var categoryPictureCacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey, curCategory,
pictureSize, true, _workContext.GetWorkingLanguage().Result, _webHelper.IsCurrentConnectionSecured(),
_storeContext.GetCurrentStore().Result);
=======
var categoryPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey, curCategory,
pictureSize, true, _workContext.WorkingLanguage, _webHelper.IsCurrentConnectionSecured(),
_storeContext.CurrentStore);
>>>>>>>
var categoryPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey, curCategory,
pictureSize, true, _workContext.GetWorkingLanguage().Result, _webHelper.IsCurrentConnectionSecured(),
_storeContext.GetCurrentStore().Result);
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryHasFeaturedProductsKey, category,
await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()), await _storeContext.GetCurrentStore());
var hasFeaturedProductsCache = await _staticCacheManager.Get(cacheKey, async () =>
=======
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryHasFeaturedProductsKey, category,
_customerService.GetCustomerRoleIds(_workContext.CurrentCustomer), _storeContext.CurrentStore);
var hasFeaturedProductsCache = _staticCacheManager.Get(cacheKey, () =>
>>>>>>>
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryHasFeaturedProductsKey, category,
_customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()), await _storeContext.GetCurrentStore());
var hasFeaturedProductsCache = await _staticCacheManager.Get(cacheKey, async () =>
<<<<<<<
await model.PagingFilteringContext.SpecificationFilter.PrepareSpecsFilters(alreadyFilteredSpecOptionIds,
filterableSpecificationAttributeOptionIds?.ToArray(), _cacheKeyService,
_specificationAttributeService, _localizationService, _webHelper, _workContext, _staticCacheManager);
=======
model.PagingFilteringContext.SpecificationFilter.PrepareSpecsFilters(alreadyFilteredSpecOptionIds,
filterableSpecificationAttributeOptionIds?.ToArray(), _specificationAttributeService, _localizationService, _webHelper, _workContext, _staticCacheManager);
>>>>>>>
await model.PagingFilteringContext.SpecificationFilter.PrepareSpecsFilters(alreadyFilteredSpecOptionIds,
filterableSpecificationAttributeOptionIds?.ToArray(), _specificationAttributeService, _localizationService, _webHelper, _workContext, _staticCacheManager);
<<<<<<<
var categoryPictureCacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey,
category, pictureSize, true, _workContext.GetWorkingLanguage().Result,
_webHelper.IsCurrentConnectionSecured(), _storeContext.GetCurrentStore().Result);
catModel.PictureModel = _staticCacheManager.Get(categoryPictureCacheKey, async () =>
=======
var categoryPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey,
category, pictureSize, true, _workContext.WorkingLanguage,
_webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore);
catModel.PictureModel = _staticCacheManager.Get(categoryPictureCacheKey, () =>
>>>>>>>
var categoryPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryPictureModelKey,
category, pictureSize, true, _workContext.GetWorkingLanguage().Result,
_webHelper.IsCurrentConnectionSecured(), _storeContext.GetCurrentStore().Result);
catModel.PictureModel = _staticCacheManager.Get(categoryPictureCacheKey, async () =>
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryAllModelKey,
await _workContext.GetWorkingLanguage(),
await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()),
await _storeContext.GetCurrentStore());
=======
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryAllModelKey,
_workContext.WorkingLanguage,
_customerService.GetCustomerRoleIds(_workContext.CurrentCustomer),
_storeContext.CurrentStore);
>>>>>>>
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryAllModelKey,
await _workContext.GetWorkingLanguage(),
_customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()),
await _storeContext.GetCurrentStore());
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryXmlAllModelKey,
await _workContext.GetWorkingLanguage(),
await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()),
await _storeContext.GetCurrentStore());
=======
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryXmlAllModelKey,
_workContext.WorkingLanguage,
_customerService.GetCustomerRoleIds(_workContext.CurrentCustomer),
_storeContext.CurrentStore);
>>>>>>>
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.CategoryXmlAllModelKey,
await _workContext.GetWorkingLanguage(),
_customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()),
await _storeContext.GetCurrentStore());
<<<<<<<
var manufacturerPictureCacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturerPictureModelKey,
manufacturer, pictureSize, true, await _workContext.GetWorkingLanguage(),
_webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore());
modelMan.PictureModel = await _staticCacheManager.Get(manufacturerPictureCacheKey, async () =>
=======
var manufacturerPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturerPictureModelKey,
manufacturer, pictureSize, true, _workContext.WorkingLanguage,
_webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore);
modelMan.PictureModel = _staticCacheManager.Get(manufacturerPictureCacheKey, () =>
>>>>>>>
var manufacturerPictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.ManufacturerPictureModelKey,
manufacturer, pictureSize, true, await _workContext.GetWorkingLanguage(),
_webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore());
modelMan.PictureModel = await _staticCacheManager.Get(manufacturerPictureCacheKey, async () =>
<<<<<<<
var pictureCacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorPictureModelKey,
vendor, pictureSize, true, await _workContext.GetWorkingLanguage(), _webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore());
vendorModel.PictureModel = await _staticCacheManager.Get(pictureCacheKey, async () =>
=======
var pictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorPictureModelKey,
vendor, pictureSize, true, _workContext.WorkingLanguage, _webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore);
vendorModel.PictureModel = _staticCacheManager.Get(pictureCacheKey, () =>
>>>>>>>
var pictureCacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.VendorPictureModelKey,
vendor, pictureSize, true, await _workContext.GetWorkingLanguage(), _webHelper.IsCurrentConnectionSecured(), await _storeContext.GetCurrentStore());
vendorModel.PictureModel = await _staticCacheManager.Get(pictureCacheKey, async () => |
<<<<<<<
pictureFullSizeUrl = pictureFullSizeUrl,
pictureDefaultSizeUrl = pictureDefaultSizeUrl,
isFreeShipping = isFreeShipping,
=======
pictureFullSizeUrl,
pictureDefaultSizeUrl,
>>>>>>>
pictureFullSizeUrl,
pictureDefaultSizeUrl,
isFreeShipping, |
<<<<<<<
var customers = await query.ToPagedList(pageIndex, pageSize, getOnlyTotalCount);
=======
return query;
}, pageIndex, pageSize, getOnlyTotalCount);
>>>>>>>
return query;
}, pageIndex, pageSize, getOnlyTotalCount);
<<<<<<<
await UpdateCustomer(customer);
//event notification
await _eventPublisher.EntityDeleted(customer);
=======
_customerRepository.Update(customer, false);
_customerRepository.Delete(customer);
>>>>>>>
await _customerRepository.Update(customer, false);
await _customerRepository.Delete(customer);
<<<<<<<
if (customerId == 0)
return null;
return await _customerRepository.ToCachedGetById(customerId, _cachingSettings.ShortTermCacheTime);
=======
return _customerRepository.GetById(customerId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<Customer>.ByIdCacheKey, customerId));
>>>>>>>
return await _customerRepository.GetById(customerId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<Customer>.ByIdCacheKey, customerId));
<<<<<<<
if (customerIds == null || customerIds.Length == 0)
return new List<Customer>();
var query = from c in _customerRepository.Table
where customerIds.Contains(c.Id) && !c.Deleted
select c;
var customers = await query.ToListAsync();
//sort by passed identifiers
var sortedCustomers = new List<Customer>();
foreach (var id in customerIds)
{
var customer = customers.Find(x => x.Id == id);
if (customer != null)
sortedCustomers.Add(customer);
}
return sortedCustomers;
=======
return _customerRepository.GetByIds(customerIds);
>>>>>>>
return await _customerRepository.GetByIds(customerIds);
<<<<<<<
var customer = await query.FirstOrDefaultAsync();
=======
var customer = _staticCacheManager.Get(key, query.FirstOrDefault);
>>>>>>>
var customer = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync());
<<<<<<<
await InsertCustomer(backgroundTaskUser);
=======
InsertCustomer(backgroundTaskUser);
>>>>>>>
await InsertCustomer(backgroundTaskUser);
<<<<<<<
await InsertCustomer(searchEngineUser);
=======
InsertCustomer(searchEngineUser);
>>>>>>>
await InsertCustomer(searchEngineUser);
<<<<<<<
//event notification
await _eventPublisher.EntityInserted(customer);
await AddCustomerRoleMapping(new CustomerCustomerRoleMapping { CustomerId = customer.Id, CustomerRoleId = guestRole.Id });
=======
AddCustomerRoleMapping(new CustomerCustomerRoleMapping { CustomerId = customer.Id, CustomerRoleId = guestRole.Id });
>>>>>>>
await AddCustomerRoleMapping(new CustomerCustomerRoleMapping { CustomerId = customer.Id, CustomerRoleId = guestRole.Id });
<<<<<<<
if (customer == null)
throw new ArgumentNullException(nameof(customer));
await _customerRepository.Insert(customer);
//event notification
await _eventPublisher.EntityInserted(customer);
=======
_customerRepository.Insert(customer);
>>>>>>>
await _customerRepository.Insert(customer);
<<<<<<<
if (customer == null)
throw new ArgumentNullException(nameof(customer));
await _customerRepository.Update(customer);
//event notification
await _eventPublisher.EntityUpdated(customer);
=======
_customerRepository.Update(customer);
>>>>>>>
await _customerRepository.Update(customer);
<<<<<<<
if (roleMapping is null)
throw new ArgumentNullException(nameof(roleMapping));
await _customerCustomerRoleMappingRepository.Insert(roleMapping);
await _eventPublisher.EntityInserted(roleMapping);
=======
_customerCustomerRoleMappingRepository.Insert(roleMapping);
>>>>>>>
await _customerCustomerRoleMappingRepository.Insert(roleMapping);
<<<<<<<
{
await _customerCustomerRoleMappingRepository.Delete(mapping);
//event notification
await _eventPublisher.EntityDeleted(mapping);
}
=======
_customerCustomerRoleMappingRepository.Delete(mapping);
>>>>>>>
await _customerCustomerRoleMappingRepository.Delete(mapping);
<<<<<<<
await _customerRoleRepository.Delete(customerRole);
//event notification
await _eventPublisher.EntityDeleted(customerRole);
=======
_customerRoleRepository.Delete(customerRole);
>>>>>>>
await _customerRoleRepository.Delete(customerRole);
<<<<<<<
if (customerRoleId == 0)
return null;
return await _customerRoleRepository.ToCachedGetById(customerRoleId);
=======
return _customerRoleRepository.GetById(customerRoleId, cache => default);
>>>>>>>
return await _customerRoleRepository.GetById(customerRoleId, cache => default);
<<<<<<<
var customerRole = await query.ToCachedFirstOrDefault(key);
=======
var customerRole = _staticCacheManager.Get(key, query.FirstOrDefault);
>>>>>>>
var customerRole = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().FirstOrDefaultAsync());
<<<<<<<
var query = from cr in _customerRoleRepository.Table
join crm in _customerCustomerRoleMappingRepository.Table on cr.Id equals crm.CustomerRoleId
where crm.CustomerId == customer.Id &&
(showHidden || cr.Active)
select cr;
var key = _cacheKeyService.PrepareKeyForShortTermCache(NopCustomerServicesDefaults.CustomerRolesCacheKey, customer, showHidden);
return await _staticCacheManager.Get(key, async () => await query.ToListAsync());
=======
return _customerRoleRepository.GetAll(query =>
{
return from cr in query
join crm in _customerCustomerRoleMappingRepository.Table on cr.Id equals crm.CustomerRoleId
where crm.CustomerId == customer.Id &&
(showHidden || cr.Active)
select cr;
}, cache => cache.PrepareKeyForShortTermCache(NopCustomerServicesDefaults.CustomerRolesCacheKey, customer, showHidden));
>>>>>>>
return await _customerRoleRepository.GetAll(query =>
{
return from cr in query
join crm in _customerCustomerRoleMappingRepository.Table on cr.Id equals crm.CustomerRoleId
where crm.CustomerId == customer.Id &&
(showHidden || cr.Active)
select cr;
}, cache => cache.PrepareKeyForShortTermCache(NopCustomerServicesDefaults.CustomerRolesCacheKey, customer, showHidden));
<<<<<<<
var customerRoles = await query.ToCachedList(key);
=======
var customerRoles = _staticCacheManager.Get(key, query.ToList);
>>>>>>>
var customerRoles = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (customerRole == null)
throw new ArgumentNullException(nameof(customerRole));
await _customerRoleRepository.Insert(customerRole);
//event notification
await _eventPublisher.EntityInserted(customerRole);
=======
_customerRoleRepository.Insert(customerRole);
>>>>>>>
await _customerRoleRepository.Insert(customerRole);
<<<<<<<
if (customerRole == null)
throw new ArgumentNullException(nameof(customerRole));
await _customerRoleRepository.Update(customerRole);
//event notification
await _eventPublisher.EntityUpdated(customerRole);
=======
_customerRoleRepository.Update(customerRole);
>>>>>>>
await _customerRoleRepository.Update(customerRole);
<<<<<<<
if (customerPassword == null)
throw new ArgumentNullException(nameof(customerPassword));
await _customerPasswordRepository.Insert(customerPassword);
//event notification
await _eventPublisher.EntityInserted(customerPassword);
=======
_customerPasswordRepository.Insert(customerPassword);
>>>>>>>
await _customerPasswordRepository.Insert(customerPassword);
<<<<<<<
if (customerPassword == null)
throw new ArgumentNullException(nameof(customerPassword));
await _customerPasswordRepository.Update(customerPassword);
//event notification
await _eventPublisher.EntityUpdated(customerPassword);
=======
_customerPasswordRepository.Update(customerPassword);
>>>>>>>
await _customerPasswordRepository.Update(customerPassword);
<<<<<<<
await _customerAddressMappingRepository.Delete(mapping);
//event notification
await _eventPublisher.EntityDeleted(mapping);
=======
_customerAddressMappingRepository.Delete(mapping);
>>>>>>>
await _customerAddressMappingRepository.Delete(mapping);
<<<<<<<
await _customerAddressMappingRepository.Insert(mapping);
//event notification
await _eventPublisher.EntityInserted(mapping);
=======
_customerAddressMappingRepository.Insert(mapping);
>>>>>>>
await _customerAddressMappingRepository.Insert(mapping); |
<<<<<<<
var configurations = await _facebookPixelService.GetPagedConfigurationsAsync(searchModel.StoreId, searchModel.Page - 1, searchModel.PageSize);
var model = new FacebookPixelListModel().PrepareToGrid(searchModel, configurations, () =>
=======
var configurations = await _facebookPixelService.GetPagedConfigurations(searchModel.StoreId, searchModel.Page - 1, searchModel.PageSize);
var model = await new FacebookPixelListModel().PrepareToGridAsync(searchModel, configurations, () =>
>>>>>>>
var configurations = await _facebookPixelService.GetPagedConfigurationsAsync(searchModel.StoreId, searchModel.Page - 1, searchModel.PageSize);
var model = await new FacebookPixelListModel().PrepareToGridAsync(searchModel, configurations, () =>
<<<<<<<
StoreName = _storeService.GetStoreByIdAsync(configuration.StoreId).Result?.Name
=======
StoreName = (await _storeService.GetStoreById(configuration.StoreId))?.Name
>>>>>>>
StoreName = (await _storeService.GetStoreByIdAsync(configuration.StoreId))?.Name |
<<<<<<<
if (!await mappings.AnyAsync())
return;
await _discountCategoryMappingRepository.Delete(mappings);
=======
_discountCategoryMappingRepository.Delete(mappings.ToList());
>>>>>>>
await _discountCategoryMappingRepository.Delete(mappings.ToList());
<<<<<<<
if (category == null)
throw new ArgumentNullException(nameof(category));
category.Deleted = true;
await UpdateCategory(category);
//event notification
await _eventPublisher.EntityDeleted(category);
=======
_categoryRepository.Delete(category);
>>>>>>>
await _categoryRepository.Delete(category);
<<<<<<<
//ACL (access control list)
var allowedCustomerRolesIds = await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer());
query = from c in query
=======
if (!showHidden && !_catalogSettings.IgnoreAcl)
{
//ACL (access control list)
var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer);
query = from c in query
>>>>>>>
if (!showHidden && !_catalogSettings.IgnoreAcl)
{
//ACL (access control list)
var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.GetCurrentCustomer().Result).Result;
query = from c in query
<<<<<<<
var unsortedCategories = await query.ToListAsync();
=======
return query.OrderBy(c => c.ParentCategoryId).ThenBy(c => c.DisplayOrder).ThenBy(c => c.Id);
});
>>>>>>>
return query.OrderBy(c => c.ParentCategoryId).ThenBy(c => c.DisplayOrder).ThenBy(c => c.Id);
});
<<<<<<<
var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesByParentCategoryIdCacheKey,
parentCategoryId, showHidden, await _workContext.GetCurrentCustomer(), await _storeContext.GetCurrentStore());
var query = _categoryRepository.Table;
if (!showHidden)
query = query.Where(c => c.Published);
=======
var categories = _categoryRepository.GetAll(query =>
{
if (!showHidden)
query = query.Where(c => c.Published);
>>>>>>>
var categories = await _categoryRepository.GetAll(query =>
{
if (!showHidden)
query = query.Where(c => c.Published);
<<<<<<<
//ACL (access control list)
var allowedCustomerRolesIds = await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer());
query = from c in query
=======
if (!_catalogSettings.IgnoreAcl)
{
//ACL (access control list)
var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer);
query = from c in query
>>>>>>>
if (!_catalogSettings.IgnoreAcl)
{
//ACL (access control list)
var allowedCustomerRolesIds = _customerService.GetCustomerRoleIds(_workContext.GetCurrentCustomer().Result).Result;
query = from c in query
<<<<<<<
if (!_catalogSettings.IgnoreStoreLimitations)
{
//Store mapping
var currentStoreId = (await _storeContext.GetCurrentStore()).Id;
query = from c in query
=======
if (!_catalogSettings.IgnoreStoreLimitations)
{
//Store mapping
var currentStoreId = _storeContext.CurrentStore.Id;
query = from c in query
>>>>>>>
if (!_catalogSettings.IgnoreStoreLimitations)
{
//Store mapping
var currentStoreId = _storeContext.GetCurrentStore().Result.Id;
query = from c in query
<<<<<<<
var categories = await query.ToCachedList(key);
=======
return query.OrderBy(c => c.DisplayOrder).ThenBy(c => c.Id);
}, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesByParentCategoryCacheKey,
parentCategoryId, showHidden, _workContext.CurrentCustomer, _storeContext.CurrentStore));
>>>>>>>
return query.OrderBy(c => c.DisplayOrder).ThenBy(c => c.Id);
}, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesByParentCategoryCacheKey,
parentCategoryId, showHidden, _workContext.GetCurrentCustomer().Result, _storeContext.GetCurrentStore().Result));
<<<<<<<
public virtual async Task<IList<Category>> GetAllCategoriesDisplayedOnHomepage(bool showHidden = false)
{
var query = from c in _categoryRepository.Table
orderby c.DisplayOrder, c.Id
where c.Published &&
!c.Deleted &&
c.ShowOnHomepage
select c;
var categories = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesAllDisplayedOnHomepageCacheKey));
=======
public virtual IList<Category> GetAllCategoriesDisplayedOnHomepage(bool showHidden = false)
{
var categories = _categoryRepository.GetAll(query =>
{
return from c in query
orderby c.DisplayOrder, c.Id
where c.Published &&
!c.Deleted &&
c.ShowOnHomepage
select c;
}, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesHomepageCacheKey));
>>>>>>>
public virtual async Task<IList<Category>> GetAllCategoriesDisplayedOnHomepage(bool showHidden = false)
{
var categories = await _categoryRepository.GetAll(query =>
{
return from c in query
orderby c.DisplayOrder, c.Id
where c.Published &&
!c.Deleted &&
c.ShowOnHomepage
select c;
}, cache => cache.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesHomepageCacheKey));
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesDisplayedOnHomepageWithoutHiddenCacheKey,
await _storeContext.GetCurrentStore(), await _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()));
=======
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesHomepageWithoutHiddenCacheKey,
_storeContext.CurrentStore, _customerService.GetCustomerRoleIds(_workContext.CurrentCustomer));
>>>>>>>
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.CategoriesHomepageWithoutHiddenCacheKey,
await _storeContext.GetCurrentStore(), _customerService.GetCustomerRoleIds(await _workContext.GetCurrentCustomer()));
<<<<<<<
if (categoryId == 0)
return null;
return await _categoryRepository.ToCachedGetById(categoryId);
=======
return _categoryRepository.GetById(categoryId, cache => default);
>>>>>>>
return await _categoryRepository.GetById(categoryId, cache => default);
<<<<<<<
if (category == null)
throw new ArgumentNullException(nameof(category));
await _categoryRepository.Insert(category);
//event notification
await _eventPublisher.EntityInserted(category);
=======
_categoryRepository.Insert(category);
>>>>>>>
await _categoryRepository.Insert(category);
<<<<<<<
if (discountCategoryMapping is null)
throw new ArgumentNullException(nameof(discountCategoryMapping));
await _discountCategoryMappingRepository.Insert(discountCategoryMapping);
//event notification
await _eventPublisher.EntityInserted(discountCategoryMapping);
=======
_discountCategoryMappingRepository.Insert(discountCategoryMapping);
>>>>>>>
await _discountCategoryMappingRepository.Insert(discountCategoryMapping);
<<<<<<<
if (discountCategoryMapping is null)
throw new ArgumentNullException(nameof(discountCategoryMapping));
await _discountCategoryMappingRepository.Delete(discountCategoryMapping);
//event notification
await _eventPublisher.EntityDeleted(discountCategoryMapping);
=======
_discountCategoryMappingRepository.Delete(discountCategoryMapping);
>>>>>>>
await _discountCategoryMappingRepository.Delete(discountCategoryMapping);
<<<<<<<
await _categoryRepository.Update(category);
//event notification
await _eventPublisher.EntityUpdated(category);
=======
_categoryRepository.Update(category);
>>>>>>>
await _categoryRepository.Update(category);
<<<<<<<
if (productCategory == null)
throw new ArgumentNullException(nameof(productCategory));
await _productCategoryRepository.Delete(productCategory);
//event notification
await _eventPublisher.EntityDeleted(productCategory);
=======
_productCategoryRepository.Delete(productCategory);
>>>>>>>
await _productCategoryRepository.Delete(productCategory);
<<<<<<<
var key = _cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductCategoriesAllByProductIdCacheKey,
productId, showHidden, await _workContext.GetCurrentCustomer(), storeId);
=======
var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductCategoriesByProductCacheKey,
productId, showHidden, _workContext.CurrentCustomer, storeId);
>>>>>>>
var key = _staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.ProductCategoriesByProductCacheKey,
productId, showHidden, await _workContext.GetCurrentCustomer(), storeId);
<<<<<<<
return await query.ToCachedList(key);
=======
return _staticCacheManager.Get(key, query.ToList);
>>>>>>>
return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
return await query.ToCachedList(key);
=======
return _staticCacheManager.Get(key, query.ToList);
>>>>>>>
return await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (productCategoryId == 0)
return null;
return await _productCategoryRepository.ToCachedGetById(productCategoryId);
=======
return _productCategoryRepository.GetById(productCategoryId, cache => default);
>>>>>>>
return await _productCategoryRepository.GetById(productCategoryId, cache => default);
<<<<<<<
if (productCategory == null)
throw new ArgumentNullException(nameof(productCategory));
await _productCategoryRepository.Insert(productCategory);
//event notification
await _eventPublisher.EntityInserted(productCategory);
=======
_productCategoryRepository.Insert(productCategory);
>>>>>>>
await _productCategoryRepository.Insert(productCategory);
<<<<<<<
if (productCategory == null)
throw new ArgumentNullException(nameof(productCategory));
await _productCategoryRepository.Update(productCategory);
//event notification
await _eventPublisher.EntityUpdated(productCategory);
=======
_productCategoryRepository.Update(productCategory);
>>>>>>>
await _productCategoryRepository.Update(productCategory); |
<<<<<<<
var cart = _shoppingCartService.GetShoppingCart(_workContext.CurrentCustomer, ShoppingCartType.ShoppingCart, _storeContext.CurrentStore.Id);
var amount = _orderTotalCalculationService.IsFreeShipping(cart) ? 0 : point.PickupFee;
if (amount > 0)
{
amount = _taxService.GetShippingPrice(amount, _workContext.CurrentCustomer);
amount = _currencyService.ConvertFromPrimaryStoreCurrency(amount, _workContext.WorkingCurrency);
pickupPointModel.PickupFee = _priceFormatter.FormatShippingPrice(amount, true);
}
=======
//adjust rate
var shippingTotal = _orderTotalCalculationService.AdjustShippingRate(point.PickupFee, cart, out var _, true);
var rateBase = _taxService.GetShippingPrice(shippingTotal, _workContext.CurrentCustomer);
var rate = _currencyService.ConvertFromPrimaryStoreCurrency(rateBase, _workContext.WorkingCurrency);
pickupPointModel.PickupFee = _priceFormatter.FormatShippingPrice(rate, true);
>>>>>>>
var cart = _shoppingCartService.GetShoppingCart(_workContext.CurrentCustomer, ShoppingCartType.ShoppingCart, _storeContext.CurrentStore.Id);
var amount = _orderTotalCalculationService.IsFreeShipping(cart) ? 0 : point.PickupFee;
if (amount > 0)
{
amount = _taxService.GetShippingPrice(amount, _workContext.CurrentCustomer);
amount = _currencyService.ConvertFromPrimaryStoreCurrency(amount, _workContext.WorkingCurrency);
pickupPointModel.PickupFee = _priceFormatter.FormatShippingPrice(amount, true);
}
//adjust rate
var shippingTotal = _orderTotalCalculationService.AdjustShippingRate(point.PickupFee, cart, out var _, true);
var rateBase = _taxService.GetShippingPrice(shippingTotal, _workContext.CurrentCustomer);
var rate = _currencyService.ConvertFromPrimaryStoreCurrency(rateBase, _workContext.WorkingCurrency);
pickupPointModel.PickupFee = _priceFormatter.FormatShippingPrice(rate, true); |
<<<<<<<
return _topicRepository.GetAll(query =>
{
query = query.OrderBy(t => t.DisplayOrder).ThenBy(t => t.SystemName);
=======
var key = ignorAcl
? _cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllCacheKey, storeId, showHidden,
onlyIncludedInTopMenu)
: _cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicsAllWithACLCacheKey,
storeId, showHidden, onlyIncludedInTopMenu,
_customerService.GetCustomerRoleIds(_workContext.CurrentCustomer));
var query = _topicRepository.Table;
>>>>>>>
return _topicRepository.GetAll(query =>
{ |
<<<<<<<
await Remove(NopCommonDefaults.AddressAttributesAllCacheKey);
var cacheKey = _cacheKeyService.PrepareKey(NopCommonDefaults.AddressAttributeValuesAllCacheKey, entity.AddressAttributeId);
await Remove(cacheKey);
=======
Remove(NopCommonDefaults.AddressAttributeValuesByAttributeCacheKey, entity.AddressAttributeId);
>>>>>>>
await Remove(NopCommonDefaults.AddressAttributeValuesByAttributeCacheKey, entity.AddressAttributeId); |
<<<<<<<
using Moq;
using Nop.Core;
=======
>>>>>>>
<<<<<<<
using Nop.Services.Localization;
using Nop.Tests;
=======
>>>>>>>
<<<<<<<
private readonly Mock<ILocalizationService> _localizationService = new Mock<ILocalizationService>();
=======
>>>>>>>
<<<<<<<
private FakeRepository<Discount> _discountRepo;
private readonly Mock<IStoreContext> _storeContext = new Mock<IStoreContext>();
private readonly Mock<ICustomerService> _customerService = new Mock<ICustomerService>();
private readonly Mock<IProductService> _productService = new Mock<IProductService>();
private readonly FakeRepository<DiscountRequirement> _discountRequirementRepo = new FakeRepository<DiscountRequirement>();
private readonly FakeRepository<DiscountUsageHistory> _discountUsageHistoryRepo = new FakeRepository<DiscountUsageHistory>();
private readonly FakeRepository<Order> _orderRepo = new FakeRepository<Order>();
=======
>>>>>>>
<<<<<<<
var discount1 = new Discount
{
Id = 1,
DiscountType = DiscountType.AssignedToCategories,
Name = "Discount 1",
UsePercentage = true,
DiscountPercentage = 10,
DiscountAmount = 0,
DiscountLimitation = DiscountLimitationType.Unlimited,
LimitationTimes = 0
};
var discount2 = new Discount
{
Id = 2,
DiscountType = DiscountType.AssignedToSkus,
Name = "Discount 2",
UsePercentage = false,
DiscountPercentage = 0,
DiscountAmount = 5,
RequiresCouponCode = true,
CouponCode = "SecretCode",
DiscountLimitation = DiscountLimitationType.NTimesPerCustomer,
LimitationTimes = 3
};
_discountRepo = new FakeRepository<Discount>(new List<Discount> { discount1, discount2 });
var staticCacheManager = new TestCacheManager();
var pluginService = new FakePluginService();
_discountPluginManager = new DiscountPluginManager(new Mock<ICustomerService>().Object, pluginService);
_discountService = new DiscountService(
_customerService.Object,
_discountPluginManager,
_localizationService.Object,
_productService.Object,
_discountRepo.GetRepository(),
_discountRequirementRepo,
_discountUsageHistoryRepo,
_orderRepo,
staticCacheManager,
_storeContext.Object);
=======
_discountPluginManager = GetService<IDiscountPluginManager>();
_discountService = GetService<IDiscountService>();
>>>>>>>
_discountPluginManager = GetService<IDiscountPluginManager>();
_discountService = GetService<IDiscountService>();
<<<<<<<
discount.GetDiscountAmount(200).Should().Be(2);
}
}
public static class DiscountExtensions
{
private static readonly DiscountService _discountService;
static DiscountExtensions()
{
_discountService = new DiscountService(null, null,
null, null, null, null, null, null, null, null);
}
public static decimal GetDiscountAmount(this Discount discount, decimal amount)
{
if (discount == null)
throw new ArgumentNullException(nameof(discount));
return _discountService.GetDiscountAmount(discount, amount);
=======
_discountService.GetDiscountAmount(discount, 200).Should().Be(2);
>>>>>>>
discount.GetDiscountAmount(200).Should().Be(2);
}
}
public static class DiscountExtensions
{
private static readonly DiscountService _discountService;
static DiscountExtensions()
{
_discountService = new DiscountService(null, null,
null, null, null, null, null, null, null, null);
}
public static decimal GetDiscountAmount(this Discount discount, decimal amount)
{
if (discount == null)
throw new ArgumentNullException(nameof(discount));
return _discountService.GetDiscountAmount(discount, amount); |
<<<<<<<
//create indexes
ExecuteSqlScriptFromFile(fileProvider, NopDataDefaults.SqlServerIndexesFilePath);
=======
if (DataSettingsManager.DatabaseIsInstalled)
{
ApplyMigrations();
}
else
{
var fileProvider = EngineContext.Current.Resolve<INopFileProvider>();
//create indexes
ExecuteSqlScriptFromFile(fileProvider, NopDataDefaults.SqlServerIndexesFilePath);
>>>>>>>
var fileProvider = EngineContext.Current.Resolve<INopFileProvider>();
//create indexes
ExecuteSqlScriptFromFile(fileProvider, NopDataDefaults.SqlServerIndexesFilePath); |
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxCodeTypes = await _cacheManager.Get(cacheKey, async () => await _avalaraTaxManager.GetTaxCodeTypes());
=======
var cacheKey = _cacheManager.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxCodeTypes = _cacheManager.Get(cacheKey, () => _avalaraTaxManager.GetTaxCodeTypes());
>>>>>>>
var cacheKey = _cacheManager.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxCodeTypes = await _cacheManager.Get(cacheKey, async () => await _avalaraTaxManager.GetTaxCodeTypes());
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxTypes = (await _cacheManager.Get(cacheKey, async () => await _avalaraTaxManager.GetTaxCodeTypes()))
=======
var cacheKey = _cacheManager.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxTypes = _cacheManager.Get(cacheKey, () => _avalaraTaxManager.GetTaxCodeTypes())
>>>>>>>
var cacheKey = _cacheManager.PrepareKeyForDefaultCache(AvalaraTaxDefaults.TaxCodeTypesCacheKey);
var taxTypes = (await _cacheManager.Get(cacheKey, async () => await _avalaraTaxManager.GetTaxCodeTypes())) |
<<<<<<<
using Nop.Core;
using Nop.Core.Data;
=======
>>>>>>>
using Nop.Core; |
<<<<<<<
if (orderId == 0)
return null;
return await _orderRepository.ToCachedGetById(orderId, _cachingSettings.ShortTermCacheTime);
=======
return _orderRepository.GetById(orderId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<Order>.ByIdCacheKey, orderId));
>>>>>>>
return await _orderRepository.GetById(orderId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<Order>.ByIdCacheKey, orderId));
<<<<<<<
if (order == null)
throw new ArgumentNullException(nameof(order));
order.Deleted = true;
await UpdateOrder(order);
//event notification
await _eventPublisher.EntityDeleted(order);
=======
_orderRepository.Delete(order);
>>>>>>>
await _orderRepository.Delete(order);
<<<<<<<
if (order == null)
throw new ArgumentNullException(nameof(order));
await _orderRepository.Insert(order);
//event notification
await _eventPublisher.EntityInserted(order);
=======
_orderRepository.Insert(order);
>>>>>>>
await _orderRepository.Insert(order);
<<<<<<<
if (order == null)
throw new ArgumentNullException(nameof(order));
await _orderRepository.Update(order);
//event notification
await _eventPublisher.EntityUpdated(order);
=======
_orderRepository.Update(order);
>>>>>>>
await _orderRepository.Update(order);
<<<<<<<
if (orderItemId == 0)
return null;
return await _orderItemRepository.ToCachedGetById(orderItemId, _cachingSettings.ShortTermCacheTime);
=======
return _orderItemRepository.GetById(orderItemId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<OrderItem>.ByIdCacheKey, orderItemId));
>>>>>>>
return await _orderItemRepository.GetById(orderItemId,
cache => cache.PrepareKeyForShortTermCache(NopEntityCacheDefaults<OrderItem>.ByIdCacheKey, orderItemId));
<<<<<<<
if (orderItem == null)
throw new ArgumentNullException(nameof(orderItem));
await _orderItemRepository.Delete(orderItem);
//event notification
await _eventPublisher.EntityDeleted(orderItem);
=======
_orderItemRepository.Delete(orderItem);
>>>>>>>
await _orderItemRepository.Delete(orderItem);
<<<<<<<
if (orderItem is null)
throw new ArgumentNullException(nameof(orderItem));
await _orderItemRepository.Insert(orderItem);
//event notification
await _eventPublisher.EntityInserted(orderItem);
=======
_orderItemRepository.Insert(orderItem);
>>>>>>>
await _orderItemRepository.Insert(orderItem);
<<<<<<<
if (orderItem == null)
throw new ArgumentNullException(nameof(orderItem));
await _orderItemRepository.Update(orderItem);
//event notification
await _eventPublisher.EntityUpdated(orderItem);
=======
_orderItemRepository.Update(orderItem);
>>>>>>>
await _orderItemRepository.Update(orderItem);
<<<<<<<
if (orderNoteId == 0)
return null;
return await _orderNoteRepository.GetById(orderNoteId);
=======
return _orderNoteRepository.GetById(orderNoteId);
>>>>>>>
return await _orderNoteRepository.GetById(orderNoteId);
<<<<<<<
if (orderNote == null)
throw new ArgumentNullException(nameof(orderNote));
await _orderNoteRepository.Delete(orderNote);
//event notification
await _eventPublisher.EntityDeleted(orderNote);
=======
_orderNoteRepository.Delete(orderNote);
>>>>>>>
await _orderNoteRepository.Delete(orderNote);
<<<<<<<
if (orderNote is null)
throw new ArgumentNullException(nameof(orderNote));
await _orderNoteRepository.Insert(orderNote);
//event notification
await _eventPublisher.EntityInserted(orderNote);
=======
_orderNoteRepository.Insert(orderNote);
>>>>>>>
await _orderNoteRepository.Insert(orderNote);
<<<<<<<
if (recurringPayment == null)
throw new ArgumentNullException(nameof(recurringPayment));
recurringPayment.Deleted = true;
await UpdateRecurringPayment(recurringPayment);
//event notification
await _eventPublisher.EntityDeleted(recurringPayment);
=======
_recurringPaymentRepository.Delete(recurringPayment);
>>>>>>>
await _recurringPaymentRepository.Delete(recurringPayment);
<<<<<<<
if (recurringPaymentId == 0)
return null;
return await _recurringPaymentRepository.ToCachedGetById(recurringPaymentId);
=======
return _recurringPaymentRepository.GetById(recurringPaymentId, cache => default);
>>>>>>>
return await _recurringPaymentRepository.GetById(recurringPaymentId, cache => default);
<<<<<<<
if (recurringPayment == null)
throw new ArgumentNullException(nameof(recurringPayment));
await _recurringPaymentRepository.Insert(recurringPayment);
//event notification
await _eventPublisher.EntityInserted(recurringPayment);
=======
_recurringPaymentRepository.Insert(recurringPayment);
>>>>>>>
await _recurringPaymentRepository.Insert(recurringPayment);
<<<<<<<
if (recurringPayment == null)
throw new ArgumentNullException(nameof(recurringPayment));
await _recurringPaymentRepository.Update(recurringPayment);
//event notification
await _eventPublisher.EntityUpdated(recurringPayment);
=======
_recurringPaymentRepository.Update(recurringPayment);
>>>>>>>
await _recurringPaymentRepository.Update(recurringPayment);
<<<<<<<
if (recurringPaymentHistory == null)
throw new ArgumentNullException(nameof(recurringPaymentHistory));
await _recurringPaymentHistoryRepository.Insert(recurringPaymentHistory);
//event notification
await _eventPublisher.EntityInserted(recurringPaymentHistory);
=======
_recurringPaymentHistoryRepository.Insert(recurringPaymentHistory);
>>>>>>>
await _recurringPaymentHistoryRepository.Insert(recurringPaymentHistory); |
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKey(NopCatalogDefaults.ProductTierPricesCacheKey, entity.ProductId);
await Remove(cacheKey);
var prefix = _cacheKeyService.PrepareKeyPrefix(NopCatalogDefaults.ProductPricePrefixCacheKey, entity.ProductId);
await RemoveByPrefix(prefix);
=======
Remove(NopCatalogDefaults.TierPricesByProductCacheKey, entity.ProductId);
RemoveByPrefix(NopCatalogDefaults.ProductPricePrefix, entity.ProductId);
>>>>>>>
await Remove(NopCatalogDefaults.TierPricesByProductCacheKey, entity.ProductId);
await RemoveByPrefix(NopCatalogDefaults.ProductPricePrefix, entity.ProductId); |
<<<<<<<
if (forumGroup == null)
throw new ArgumentNullException(nameof(forumGroup));
await _forumGroupRepository.Delete(forumGroup);
//event notification
await _eventPublisher.EntityDeleted(forumGroup);
=======
_forumGroupRepository.Delete(forumGroup);
>>>>>>>
await _forumGroupRepository.Delete(forumGroup);
<<<<<<<
if (forumGroupId == 0)
return null;
return await _forumGroupRepository.ToCachedGetById(forumGroupId);
=======
return _forumGroupRepository.GetById(forumGroupId, cache => default);
>>>>>>>
return await _forumGroupRepository.GetById(forumGroupId, cache => default);
<<<<<<<
var query = from fg in _forumGroupRepository.Table
orderby fg.DisplayOrder, fg.Id
select fg;
return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopForumDefaults.ForumGroupAllCacheKey));
=======
return _forumGroupRepository.GetAll(query =>
{
return from fg in query
orderby fg.DisplayOrder, fg.Id
select fg;
}, cache => default);
>>>>>>>
return await _forumGroupRepository.GetAll(query =>
{
return from fg in query
orderby fg.DisplayOrder, fg.Id
select fg;
}, cache => default);
<<<<<<<
if (forumGroup == null)
throw new ArgumentNullException(nameof(forumGroup));
await _forumGroupRepository.Insert(forumGroup);
//event notification
await _eventPublisher.EntityInserted(forumGroup);
=======
_forumGroupRepository.Insert(forumGroup);
>>>>>>>
await _forumGroupRepository.Insert(forumGroup);
<<<<<<<
if (forumGroup == null)
throw new ArgumentNullException(nameof(forumGroup));
await _forumGroupRepository.Update(forumGroup);
//event notification
await _eventPublisher.EntityUpdated(forumGroup);
=======
_forumGroupRepository.Update(forumGroup);
>>>>>>>
await _forumGroupRepository.Update(forumGroup);
<<<<<<<
foreach (var fs in await queryFs1.ToListAsync())
{
await _forumSubscriptionRepository.Delete(fs);
//event notification
await _eventPublisher.EntityDeleted(fs);
}
=======
_forumSubscriptionRepository.Delete(queryFs1.ToList());
>>>>>>>
await _forumSubscriptionRepository.Delete(queryFs1.ToList());
<<<<<<<
foreach (var fs2 in await queryFs2.ToListAsync())
{
await _forumSubscriptionRepository.Delete(fs2);
//event notification
await _eventPublisher.EntityDeleted(fs2);
}
=======
_forumSubscriptionRepository.Delete(queryFs2.ToList());
>>>>>>>
await _forumSubscriptionRepository.Delete(queryFs2.ToList());
<<<<<<<
await _forumRepository.Delete(forum);
//event notification
await _eventPublisher.EntityDeleted(forum);
=======
_forumRepository.Delete(forum);
>>>>>>>
await _forumRepository.Delete(forum);
<<<<<<<
if (forumId == 0)
return null;
return await _forumRepository.ToCachedGetById(forumId);
=======
return _forumRepository.GetById(forumId, cache => default);
>>>>>>>
return await _forumRepository.GetById(forumId, cache => default);
<<<<<<<
var key = _cacheKeyService.PrepareKeyForDefaultCache(NopForumDefaults.ForumAllByForumGroupIdCacheKey, forumGroupId);
var query = from f in _forumRepository.Table
orderby f.DisplayOrder, f.Id
where f.ForumGroupId == forumGroupId
select f;
var forums = await query.ToCachedList(key);
=======
var forums = _forumRepository.GetAll(query =>
{
return from f in query
orderby f.DisplayOrder, f.Id
where f.ForumGroupId == forumGroupId
select f;
}, cache => cache.PrepareKeyForDefaultCache(NopForumDefaults.ForumByForumGroupCacheKey, forumGroupId));
>>>>>>>
var forums = await _forumRepository.GetAll(query =>
{
return from f in query
orderby f.DisplayOrder, f.Id
where f.ForumGroupId == forumGroupId
select f;
}, cache => cache.PrepareKeyForDefaultCache(NopForumDefaults.ForumByForumGroupCacheKey, forumGroupId));
<<<<<<<
if (forum == null)
throw new ArgumentNullException(nameof(forum));
await _forumRepository.Insert(forum);
//event notification
await _eventPublisher.EntityInserted(forum);
=======
_forumRepository.Insert(forum);
>>>>>>>
await _forumRepository.Insert(forum);
<<<<<<<
if (forum == null)
throw new ArgumentNullException(nameof(forum));
await _forumRepository.Update(forum);
//event notification
await _eventPublisher.EntityUpdated(forum);
=======
_forumRepository.Update(forum);
>>>>>>>
await _forumRepository.Update(forum);
<<<<<<<
var forumTopic = await _forumTopicRepository.ToCachedGetById(forumTopicId);
=======
>>>>>>>
<<<<<<<
var topics = await query2.ToPagedList(pageIndex, pageSize);
=======
var query2 = from ft in query
where query1.Contains(ft.Id)
orderby ft.TopicTypeId descending, ft.LastPostTime descending, ft.Id descending
select ft;
return query2;
}, pageIndex, pageSize);
>>>>>>>
var query2 = from ft in query
where query1.Contains(ft.Id)
orderby ft.TopicTypeId descending, ft.LastPostTime descending, ft.Id descending
select ft;
return query2;
}, pageIndex, pageSize);
<<<<<<<
if (forumTopic == null)
throw new ArgumentNullException(nameof(forumTopic));
await _forumTopicRepository.Update(forumTopic);
//event notification
await _eventPublisher.EntityUpdated(forumTopic);
=======
_forumTopicRepository.Update(forumTopic);
>>>>>>>
await _forumTopicRepository.Update(forumTopic);
<<<<<<<
if (forumPostId == 0)
return null;
return await _forumPostRepository.ToCachedGetById(forumPostId);
=======
return _forumPostRepository.GetById(forumPostId, cache => default);
>>>>>>>
return await _forumPostRepository.GetById(forumPostId, cache => default);
<<<<<<<
var forumPosts = await query.ToPagedList(pageIndex, pageSize);
=======
return query;
}, pageIndex, pageSize);
>>>>>>>
return query;
}, pageIndex, pageSize);
<<<<<<<
if (forumPost == null)
throw new ArgumentNullException(nameof(forumPost));
await _forumPostRepository.Insert(forumPost);
=======
_forumPostRepository.Insert(forumPost);
>>>>>>>
await _forumPostRepository.Insert(forumPost);
<<<<<<<
await UpdateForumTopicStats(forumPost.TopicId);
await UpdateForumStats(forumId);
await UpdateCustomerStats(customerId);
//event notification
await _eventPublisher.EntityInserted(forumPost);
=======
UpdateForumTopicStats(forumPost.TopicId);
UpdateForumStats(forumId);
UpdateCustomerStats(customerId);
>>>>>>>
await UpdateForumTopicStats(forumPost.TopicId);
await UpdateForumStats(forumId);
await UpdateCustomerStats(customerId);
<<<<<<<
//validation
if (forumPost == null)
throw new ArgumentNullException(nameof(forumPost));
await _forumPostRepository.Update(forumPost);
//event notification
await _eventPublisher.EntityUpdated(forumPost);
=======
_forumPostRepository.Update(forumPost);
>>>>>>>
await _forumPostRepository.Update(forumPost);
<<<<<<<
if (privateMessage == null)
throw new ArgumentNullException(nameof(privateMessage));
await _forumPrivateMessageRepository.Delete(privateMessage);
//event notification
await _eventPublisher.EntityDeleted(privateMessage);
=======
_forumPrivateMessageRepository.Delete(privateMessage);
>>>>>>>
await _forumPrivateMessageRepository.Delete(privateMessage);
<<<<<<<
if (privateMessageId == 0)
return null;
return await _forumPrivateMessageRepository.ToCachedGetById(privateMessageId);
=======
return _forumPrivateMessageRepository.GetById(privateMessageId, cache => default);
>>>>>>>
return await _forumPrivateMessageRepository.GetById(privateMessageId, cache => default);
<<<<<<<
var privateMessages = await query.ToPagedList(pageIndex, pageSize);
=======
return query;
}, pageIndex, pageSize);
>>>>>>>
return query;
}, pageIndex, pageSize);
<<<<<<<
{
await _forumPrivateMessageRepository.Delete(privateMessage);
//event notification
await _eventPublisher.EntityDeleted(privateMessage);
}
=======
_forumPrivateMessageRepository.Delete(privateMessage);
>>>>>>>
await _forumPrivateMessageRepository.Delete(privateMessage);
<<<<<<<
{
await _forumPrivateMessageRepository.Update(privateMessage);
//event notification
await _eventPublisher.EntityUpdated(privateMessage);
}
=======
_forumPrivateMessageRepository.Update(privateMessage);
>>>>>>>
await _forumPrivateMessageRepository.Update(privateMessage);
<<<<<<<
if (forumSubscription == null) throw new ArgumentNullException(nameof(forumSubscription));
await _forumSubscriptionRepository.Delete(forumSubscription);
//event notification
await _eventPublisher.EntityDeleted(forumSubscription);
=======
_forumSubscriptionRepository.Delete(forumSubscription);
>>>>>>>
await _forumSubscriptionRepository.Delete(forumSubscription);
<<<<<<<
if (forumSubscriptionId == 0)
return null;
return await _forumSubscriptionRepository.ToCachedGetById(forumSubscriptionId);
=======
return _forumSubscriptionRepository.GetById(forumSubscriptionId, cache => default);
>>>>>>>
return await _forumSubscriptionRepository.GetById(forumSubscriptionId, cache => default);
<<<<<<<
var forumSubscriptions = await query.ToPagedList(pageIndex, pageSize);
=======
return rez;
}, pageIndex, pageSize);
>>>>>>>
return rez;
}, pageIndex, pageSize);
<<<<<<<
if (forumSubscription == null)
throw new ArgumentNullException(nameof(forumSubscription));
await _forumSubscriptionRepository.Insert(forumSubscription);
//event notification
await _eventPublisher.EntityInserted(forumSubscription);
=======
_forumSubscriptionRepository.Insert(forumSubscription);
>>>>>>>
await _forumSubscriptionRepository.Insert(forumSubscription);
<<<<<<<
if (forumSubscription == null)
throw new ArgumentNullException(nameof(forumSubscription));
await _forumSubscriptionRepository.Update(forumSubscription);
//event notification
await _eventPublisher.EntityUpdated(forumSubscription);
=======
_forumSubscriptionRepository.Update(forumSubscription);
>>>>>>>
await _forumSubscriptionRepository.Update(forumSubscription);
<<<<<<<
if (postVote == null)
throw new ArgumentNullException(nameof(postVote));
await _forumPostVoteRepository.Insert(postVote);
=======
_forumPostVoteRepository.Insert(postVote);
>>>>>>>
await _forumPostVoteRepository.Insert(postVote);
<<<<<<<
await UpdatePost(post);
//event notification
await _eventPublisher.EntityInserted(postVote);
=======
UpdatePost(post);
>>>>>>>
await UpdatePost(post);
<<<<<<<
if (postVote == null)
throw new ArgumentNullException(nameof(postVote));
await _forumPostVoteRepository.Update(postVote);
//event notification
await _eventPublisher.EntityUpdated(postVote);
=======
_forumPostVoteRepository.Update(postVote);
>>>>>>>
await _forumPostVoteRepository.Update(postVote);
<<<<<<<
await UpdatePost(post);
//event notification
await _eventPublisher.EntityDeleted(postVote);
=======
UpdatePost(post);
>>>>>>>
await UpdatePost(post); |
<<<<<<<
logModel.LogLevel = _localizationService.GetLocalizedEnumAsync(logItem.LogLevel).Result;
=======
logModel.LogLevel = await _localizationService.GetLocalizedEnum(logItem.LogLevel);
>>>>>>>
logModel.LogLevel = await _localizationService.GetLocalizedEnumAsync(logItem.LogLevel);
<<<<<<<
logModel.CustomerEmail = _customerService.GetCustomerByIdAsync(logItem.CustomerId ?? 0).Result?.Email ?? string.Empty;
=======
logModel.CustomerEmail = (await _customerService.GetCustomerById(logItem.CustomerId ?? 0))?.Email ?? string.Empty;
>>>>>>>
logModel.CustomerEmail = (await _customerService.GetCustomerByIdAsync(logItem.CustomerId ?? 0))?.Email ?? string.Empty; |
<<<<<<<
/// <param name="key">Key of cached item</param>
Task Remove(CacheKey key);
=======
/// <param name="cacheKey">Cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
void Remove(CacheKey cacheKey, params object[] cacheKeyParameters);
>>>>>>>
/// <param name="cacheKey">Cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
Task Remove(CacheKey cacheKey, params object[] cacheKeyParameters);
<<<<<<<
/// <param name="prefix">String key prefix</param>
Task RemoveByPrefix(string prefix);
=======
/// <param name="prefix">Cache key prefix</param>
/// <param name="prefixParameters">Parameters to create cache key prefix</param>
void RemoveByPrefix(string prefix, params object[] prefixParameters);
>>>>>>>
/// <param name="prefix">Cache key prefix</param>
/// <param name="prefixParameters">Parameters to create cache key prefix</param>
Task RemoveByPrefix(string prefix, params object[] prefixParameters);
<<<<<<<
Task Clear();
=======
void Clear();
#region Cache key
/// <summary>
/// Create a copy of cache key and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKey(CacheKey cacheKey, params object[] cacheKeyParameters);
/// <summary>
/// Create a copy of cache key using the default cache time and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKeyForDefaultCache(CacheKey cacheKey, params object[] cacheKeyParameters);
/// <summary>
/// Create a copy of cache key using the short cache time and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKeyForShortTermCache(CacheKey cacheKey, params object[] cacheKeyParameters);
#endregion
>>>>>>>
Task Clear();
#region Cache key
/// <summary>
/// Create a copy of cache key and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKey(CacheKey cacheKey, params object[] cacheKeyParameters);
/// <summary>
/// Create a copy of cache key using the default cache time and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKeyForDefaultCache(CacheKey cacheKey, params object[] cacheKeyParameters);
/// <summary>
/// Create a copy of cache key using the short cache time and fills it by passed parameters
/// </summary>
/// <param name="cacheKey">Initial cache key</param>
/// <param name="cacheKeyParameters">Parameters to create cache key</param>
/// <returns>Cache key</returns>
CacheKey PrepareKeyForShortTermCache(CacheKey cacheKey, params object[] cacheKeyParameters);
#endregion |
<<<<<<<
discountModel.DiscountTypeName = _localizationService.GetLocalizedEnumAsync(discount.DiscountType).Result;
discountModel.PrimaryStoreCurrencyCode = _currencyService
.GetCurrencyByIdAsync(_currencySettings.PrimaryStoreCurrencyId).Result?.CurrencyCode;
discountModel.TimesUsed = _discountService.GetAllDiscountUsageHistoryAsync(discount.Id, pageSize: 1).Result.TotalCount;
=======
discountModel.DiscountTypeName = await _localizationService.GetLocalizedEnum(discount.DiscountType);
discountModel.PrimaryStoreCurrencyCode = (await _currencyService
.GetCurrencyById(_currencySettings.PrimaryStoreCurrencyId))?.CurrencyCode;
discountModel.TimesUsed = (await _discountService.GetAllDiscountUsageHistory(discount.Id, pageSize: 1)).TotalCount;
>>>>>>>
discountModel.DiscountTypeName = await _localizationService.GetLocalizedEnumAsync(discount.DiscountType);
discountModel.PrimaryStoreCurrencyCode = (await _currencyService
.GetCurrencyByIdAsync(_currencySettings.PrimaryStoreCurrencyId))?.CurrencyCode;
discountModel.TimesUsed = (await _discountService.GetAllDiscountUsageHistoryAsync(discount.Id, pageSize: 1)).TotalCount;
<<<<<<<
var order = _orderService.GetOrderByIdAsync(historyEntry.OrderId).Result;
=======
var order = await _orderService.GetOrderById(historyEntry.OrderId);
>>>>>>>
var order = await _orderService.GetOrderByIdAsync(historyEntry.OrderId);
<<<<<<<
discountUsageHistoryModel.OrderTotal = _priceFormatter.FormatPriceAsync(order.OrderTotal, true, false).Result;
=======
discountUsageHistoryModel.OrderTotal = await _priceFormatter.FormatPrice(order.OrderTotal, true, false);
>>>>>>>
discountUsageHistoryModel.OrderTotal = await _priceFormatter.FormatPriceAsync(order.OrderTotal, true, false);
<<<<<<<
var (products, _) = await _productService.SearchProductsAsync(false,showHidden: true,
=======
var (products, _) = await _productService.SearchProducts(false, showHidden: true,
>>>>>>>
var (products, _) = await _productService.SearchProductsAsync(false, showHidden: true,
<<<<<<<
productModel.SeName = _urlRecordService.GetSeNameAsync(product, 0, true, false).Result;
=======
productModel.SeName = await _urlRecordService.GetSeName(product, 0, true, false);
>>>>>>>
productModel.SeName = await _urlRecordService.GetSeNameAsync(product, 0, true, false);
<<<<<<<
discountCategoryModel.CategoryName = _categoryService.GetFormattedBreadCrumbAsync(category).Result;
=======
discountCategoryModel.CategoryName = await _categoryService.GetFormattedBreadCrumb(category);
>>>>>>>
discountCategoryModel.CategoryName = await _categoryService.GetFormattedBreadCrumbAsync(category);
<<<<<<<
categoryModel.Breadcrumb = _categoryService.GetFormattedBreadCrumbAsync(category).Result;
categoryModel.SeName = _urlRecordService.GetSeNameAsync(category, 0, true, false).Result;
=======
categoryModel.Breadcrumb = await _categoryService.GetFormattedBreadCrumb(category);
categoryModel.SeName = await _urlRecordService.GetSeName(category, 0, true, false);
>>>>>>>
categoryModel.Breadcrumb = await _categoryService.GetFormattedBreadCrumbAsync(category);
categoryModel.SeName = await _urlRecordService.GetSeNameAsync(category, 0, true, false);
<<<<<<<
manufacturerModel.SeName = _urlRecordService.GetSeNameAsync(manufacturer, 0, true, false).Result;
=======
manufacturerModel.SeName = await _urlRecordService.GetSeName(manufacturer, 0, true, false);
>>>>>>>
manufacturerModel.SeName = await _urlRecordService.GetSeNameAsync(manufacturer, 0, true, false); |
<<<<<<<
await _storeRepository.Delete(store);
//event notification
await _eventPublisher.EntityDeleted(store);
=======
_storeRepository.Delete(store);
>>>>>>>
await _storeRepository.Delete(store);
<<<<<<<
var query = from s in _storeRepository.Table orderby s.DisplayOrder, s.Id select s;
//we can not use ICacheKeyService because it'll cause circular references.
//that's why we use the default cache time
var result = await query.ToCachedList(NopStoreDefaults.StoresAllCacheKey);
=======
var result = _storeRepository.GetAll(query =>
{
return from s in query orderby s.DisplayOrder, s.Id select s;
}, cache => default);
>>>>>>>
var result = await _storeRepository.GetAll(query =>
{
return from s in query orderby s.DisplayOrder, s.Id select s;
}, cache => default);
<<<<<<<
if (storeId == 0)
return null;
var store = await _storeRepository.ToCachedGetById(storeId);
return store;
=======
return _storeRepository.GetById(storeId, cache => default);
>>>>>>>
return await _storeRepository.GetById(storeId, cache => default);
<<<<<<<
if (store == null)
throw new ArgumentNullException(nameof(store));
await _storeRepository.Insert(store);
//event notification
await _eventPublisher.EntityInserted(store);
=======
_storeRepository.Insert(store);
>>>>>>>
await _storeRepository.Insert(store);
<<<<<<<
if (store == null)
throw new ArgumentNullException(nameof(store));
await _storeRepository.Update(store);
//event notification
await _eventPublisher.EntityUpdated(store);
=======
_storeRepository.Update(store);
>>>>>>>
await _storeRepository.Update(store); |
<<<<<<<
Task<CustomerInfoModel> PrepareCustomerInfoModelAsync(CustomerInfoModel model, Customer customer,
=======
CustomerInfoModel PrepareCustomerInfoModel(CustomerInfoModel model, Customer customer,
>>>>>>>
Task<CustomerInfoModel> PrepareCustomerInfoModelAsync(CustomerInfoModel model, Customer customer,
<<<<<<<
Task<RegisterModel> PrepareRegisterModelAsync(RegisterModel model, bool excludeProperties,
=======
RegisterModel PrepareRegisterModel(RegisterModel model, bool excludeProperties,
>>>>>>>
Task<RegisterModel> PrepareRegisterModelAsync(RegisterModel model, bool excludeProperties,
<<<<<<<
/// Prepare the password recovery confirm model
/// </summary>
/// <returns>Password recovery confirm model</returns>
Task<PasswordRecoveryConfirmModel> PreparePasswordRecoveryConfirmModelAsync();
/// <summary>
=======
>>>>>>>
<<<<<<<
Task<RegisterResultModel> PrepareRegisterResultModelAsync(int resultId);
=======
RegisterResultModel PrepareRegisterResultModel(int resultId, string returnUrl);
>>>>>>>
Task<RegisterResultModel> PrepareRegisterResultModelAsync(int resultId, string returnUrl); |
<<<<<<<
using System.Threading.Tasks;
=======
using Nop.Core.Caching;
>>>>>>>
using System.Threading.Tasks;
using Nop.Core.Caching;
<<<<<<<
return await _vendorAttributeRepository.Table
.OrderBy(vendorAttribute => vendorAttribute.DisplayOrder).ThenBy(vendorAttribute => vendorAttribute.Id)
.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopVendorDefaults.VendorAttributesAllCacheKey));
=======
return _vendorAttributeRepository.GetAll(
query => query.OrderBy(vendorAttribute => vendorAttribute.DisplayOrder).ThenBy(vendorAttribute => vendorAttribute.Id),
cache => default);
>>>>>>>
return await _vendorAttributeRepository.GetAll(
query => query.OrderBy(vendorAttribute => vendorAttribute.DisplayOrder).ThenBy(vendorAttribute => vendorAttribute.Id),
cache => default);
<<<<<<<
if (vendorAttributeId == 0)
return null;
return await _vendorAttributeRepository.ToCachedGetById(vendorAttributeId);
=======
return _vendorAttributeRepository.GetById(vendorAttributeId, cache => default);
>>>>>>>
return await _vendorAttributeRepository.GetById(vendorAttributeId, cache => default);
<<<<<<<
if (vendorAttribute == null)
throw new ArgumentNullException(nameof(vendorAttribute));
await _vendorAttributeRepository.Insert(vendorAttribute);
//event notification
await _eventPublisher.EntityInserted(vendorAttribute);
=======
_vendorAttributeRepository.Insert(vendorAttribute);
>>>>>>>
await _vendorAttributeRepository.Insert(vendorAttribute);
<<<<<<<
if (vendorAttribute == null)
throw new ArgumentNullException(nameof(vendorAttribute));
await _vendorAttributeRepository.Update(vendorAttribute);
//event notification
await _eventPublisher.EntityUpdated(vendorAttribute);
=======
_vendorAttributeRepository.Update(vendorAttribute);
>>>>>>>
await _vendorAttributeRepository.Update(vendorAttribute);
<<<<<<<
if (vendorAttribute == null)
throw new ArgumentNullException(nameof(vendorAttribute));
await _vendorAttributeRepository.Delete(vendorAttribute);
//event notification
await _eventPublisher.EntityDeleted(vendorAttribute);
=======
_vendorAttributeRepository.Delete(vendorAttribute);
>>>>>>>
await _vendorAttributeRepository.Delete(vendorAttribute);
<<<<<<<
return await _vendorAttributeValueRepository.Table
=======
var query = _vendorAttributeValueRepository.Table
>>>>>>>
var query = _vendorAttributeValueRepository.Table
<<<<<<<
if (vendorAttributeValueId == 0)
return null;
return await _vendorAttributeValueRepository.ToCachedGetById(vendorAttributeValueId);
=======
return _vendorAttributeValueRepository.GetById(vendorAttributeValueId, cache => default);
>>>>>>>
return await _vendorAttributeValueRepository.GetById(vendorAttributeValueId, cache => default);
<<<<<<<
if (vendorAttributeValue == null)
throw new ArgumentNullException(nameof(vendorAttributeValue));
await _vendorAttributeValueRepository.Insert(vendorAttributeValue);
//event notification
await _eventPublisher.EntityInserted(vendorAttributeValue);
=======
_vendorAttributeValueRepository.Insert(vendorAttributeValue);
>>>>>>>
await _vendorAttributeValueRepository.Insert(vendorAttributeValue);
<<<<<<<
if (vendorAttributeValue == null)
throw new ArgumentNullException(nameof(vendorAttributeValue));
await _vendorAttributeValueRepository.Update(vendorAttributeValue);
//event notification
await _eventPublisher.EntityUpdated(vendorAttributeValue);
=======
_vendorAttributeValueRepository.Update(vendorAttributeValue);
>>>>>>>
await _vendorAttributeValueRepository.Update(vendorAttributeValue);
<<<<<<<
if (vendorAttributeValue == null)
throw new ArgumentNullException(nameof(vendorAttributeValue));
await _vendorAttributeValueRepository.Delete(vendorAttributeValue);
//event notification
await _eventPublisher.EntityDeleted(vendorAttributeValue);
=======
_vendorAttributeValueRepository.Delete(vendorAttributeValue);
>>>>>>>
await _vendorAttributeValueRepository.Delete(vendorAttributeValue); |
<<<<<<<
if (attribute == null)
throw new ArgumentNullException(nameof(attribute));
await _genericAttributeRepository.Delete(attribute);
//event notification
await _eventPublisher.EntityDeleted(attribute);
=======
_genericAttributeRepository.Delete(attribute);
>>>>>>>
await _genericAttributeRepository.Delete(attribute);
<<<<<<<
if (attributes == null)
throw new ArgumentNullException(nameof(attributes));
await _genericAttributeRepository.Delete(attributes);
//event notification
foreach (var attribute in attributes)
await _eventPublisher.EntityDeleted(attribute);
=======
_genericAttributeRepository.Delete(attributes);
>>>>>>>
await _genericAttributeRepository.Delete(attributes);
<<<<<<<
if (attributeId == 0)
return null;
return await _genericAttributeRepository.GetById(attributeId);
=======
return _genericAttributeRepository.GetById(attributeId);
>>>>>>>
return await _genericAttributeRepository.GetById(attributeId);
<<<<<<<
await _genericAttributeRepository.Insert(attribute);
//event notification
await _eventPublisher.EntityInserted(attribute);
=======
_genericAttributeRepository.Insert(attribute);
>>>>>>>
await _genericAttributeRepository.Insert(attribute);
<<<<<<<
await _genericAttributeRepository.Update(attribute);
//event notification
await _eventPublisher.EntityUpdated(attribute);
=======
_genericAttributeRepository.Update(attribute);
>>>>>>>
await _genericAttributeRepository.Update(attribute);
<<<<<<<
var attributes = await query.ToCachedList(key);
=======
var attributes = _staticCacheManager.Get(key, query.ToList);
>>>>>>>
var attributes = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync()); |
<<<<<<<
[Test]
public void AngleDividedByTimeEqualsRotationalSpeed()
{
var rotationalSpeed = Angle.FromRadians(10)/TimeSpan.FromSeconds(5);
Assert.AreEqual(rotationalSpeed, RotationalSpeed.FromRadiansPerSecond(2));
}
=======
protected override double ArcminutesInOneDegree
{
get
{
return 60.0;
}
}
protected override double ArcsecondsInOneDegree
{
get
{
return 3600.0;
}
}
>>>>>>>
[Test]
public void AngleDividedByTimeEqualsRotationalSpeed()
{
var rotationalSpeed = Angle.FromRadians(10)/TimeSpan.FromSeconds(5);
Assert.AreEqual(rotationalSpeed, RotationalSpeed.FromRadiansPerSecond(2));
}
protected override double ArcminutesInOneDegree
{
get
{
return 60.0;
}
}
protected override double ArcsecondsInOneDegree
{
get
{
return 3600.0;
}
} |
<<<<<<<
if (manufacturerTemplate == null)
throw new ArgumentNullException(nameof(manufacturerTemplate));
await _manufacturerTemplateRepository.Delete(manufacturerTemplate);
//event notification
await _eventPublisher.EntityDeleted(manufacturerTemplate);
=======
_manufacturerTemplateRepository.Delete(manufacturerTemplate);
>>>>>>>
await _manufacturerTemplateRepository.Delete(manufacturerTemplate);
<<<<<<<
var query = from pt in _manufacturerTemplateRepository.Table
orderby pt.DisplayOrder, pt.Id
select pt;
var templates = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.ManufacturerTemplatesAllCacheKey));
=======
var templates = _manufacturerTemplateRepository.GetAll(query =>
{
return from pt in query
orderby pt.DisplayOrder, pt.Id
select pt;
}, cache => default);
>>>>>>>
var templates = await _manufacturerTemplateRepository.GetAll(query =>
{
return from pt in query
orderby pt.DisplayOrder, pt.Id
select pt;
}, cache => default);
<<<<<<<
if (manufacturerTemplateId == 0)
return null;
return await _manufacturerTemplateRepository.ToCachedGetById(manufacturerTemplateId);
=======
return _manufacturerTemplateRepository.GetById(manufacturerTemplateId, cache => default);
>>>>>>>
return await _manufacturerTemplateRepository.GetById(manufacturerTemplateId, cache => default);
<<<<<<<
if (manufacturerTemplate == null)
throw new ArgumentNullException(nameof(manufacturerTemplate));
await _manufacturerTemplateRepository.Insert(manufacturerTemplate);
//event notification
await _eventPublisher.EntityInserted(manufacturerTemplate);
=======
_manufacturerTemplateRepository.Insert(manufacturerTemplate);
>>>>>>>
await _manufacturerTemplateRepository.Insert(manufacturerTemplate);
<<<<<<<
if (manufacturerTemplate == null)
throw new ArgumentNullException(nameof(manufacturerTemplate));
await _manufacturerTemplateRepository.Update(manufacturerTemplate);
//event notification
await _eventPublisher.EntityUpdated(manufacturerTemplate);
=======
_manufacturerTemplateRepository.Update(manufacturerTemplate);
>>>>>>>
await _manufacturerTemplateRepository.Update(manufacturerTemplate); |
<<<<<<<
model.ProductReviewsPageSizeOnAccountPage_OverrideForStore = _settingService.SettingExists(catalogSettings, x=> x.ProductReviewsPageSizeOnAccountPage, storeScope);
model.ProductReviewsSortByCreatedDateAscending_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ProductReviewsSortByCreatedDateAscending, storeScope);
=======
model.ProductReviewsPageSizeOnAccountPage_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ProductReviewsPageSizeOnAccountPage, storeScope);
>>>>>>>
model.ProductReviewsPageSizeOnAccountPage_OverrideForStore = _settingService.SettingExists(catalogSettings, x=> x.ProductReviewsPageSizeOnAccountPage, storeScope);
model.ProductReviewsSortByCreatedDateAscending_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ProductReviewsSortByCreatedDateAscending, storeScope);
<<<<<<<
model.ExportImportAllowDownloadImages_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportAllowDownloadImages, storeScope);
=======
model.ExportImportSplitProductsFile_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportSplitProductsFile, storeScope);
>>>>>>>
model.ExportImportAllowDownloadImages_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportAllowDownloadImages, storeScope);
model.ExportImportSplitProductsFile_OverrideForStore = _settingService.SettingExists(catalogSettings, x => x.ExportImportSplitProductsFile, storeScope);
<<<<<<<
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportAllowDownloadImages, model.ExportImportAllowDownloadImages_OverrideForStore, storeScope, false);
=======
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportSplitProductsFile, model.ExportImportSplitProductsFile_OverrideForStore, storeScope, false);
>>>>>>>
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportAllowDownloadImages, model.ExportImportAllowDownloadImages_OverrideForStore, storeScope, false);
_settingService.SaveSettingOverridablePerStore(catalogSettings, x => x.ExportImportSplitProductsFile, model.ExportImportSplitProductsFile_OverrideForStore, storeScope, false); |
<<<<<<<
if (logItemId == 0)
return null;
return await _taxTransactionLogRepository.GetById(logItemId);
=======
return _taxTransactionLogRepository.GetById(logItemId);
>>>>>>>
return await _taxTransactionLogRepository.GetById(logItemId);
<<<<<<<
await _taxTransactionLogRepository.Insert(logItem);
=======
_taxTransactionLogRepository.Insert(logItem, false);
>>>>>>>
await _taxTransactionLogRepository.Insert(logItem, false);
<<<<<<<
await _taxTransactionLogRepository.Update(logItem);
=======
_taxTransactionLogRepository.Update(logItem, false);
>>>>>>>
await _taxTransactionLogRepository.Update(logItem, false);
<<<<<<<
if (logItem == null)
throw new ArgumentNullException(nameof(logItem));
await _taxTransactionLogRepository.Delete(logItem);
=======
_taxTransactionLogRepository.Delete(logItem, false);
>>>>>>>
await _taxTransactionLogRepository.Delete(logItem, false); |
<<<<<<<
using System;
using System.Linq;
using System.Threading.Tasks;
using LinqToDB;
=======
using System.Linq;
>>>>>>>
using System.Linq;
using System.Threading.Tasks;
using LinqToDB;
<<<<<<<
if (searchTerm == null)
throw new ArgumentNullException(nameof(searchTerm));
await _searchTermRepository.Delete(searchTerm);
//event notification
await _eventPublisher.EntityDeleted(searchTerm);
=======
_searchTermRepository.Delete(searchTerm);
>>>>>>>
await _searchTermRepository.Delete(searchTerm);
<<<<<<<
if (searchTermId == 0)
return null;
return await _searchTermRepository.ToCachedGetById(searchTermId);
=======
return _searchTermRepository.GetById(searchTermId, cache => default);
>>>>>>>
return await _searchTermRepository.GetById(searchTermId, cache => default);
<<<<<<<
if (searchTerm == null)
throw new ArgumentNullException(nameof(searchTerm));
await _searchTermRepository.Insert(searchTerm);
//event notification
await _eventPublisher.EntityInserted(searchTerm);
=======
_searchTermRepository.Insert(searchTerm);
>>>>>>>
await _searchTermRepository.Insert(searchTerm);
<<<<<<<
if (searchTerm == null)
throw new ArgumentNullException(nameof(searchTerm));
await _searchTermRepository.Update(searchTerm);
//event notification
await _eventPublisher.EntityUpdated(searchTerm);
=======
_searchTermRepository.Update(searchTerm);
>>>>>>>
await _searchTermRepository.Update(searchTerm); |
<<<<<<<
[NopResourceDisplayName("Admin.Configuration.Settings.Catalog.RemoveRequiredProducts")]
public bool RemoveRequiredProducts { get; set; }
public bool RemoveRequiredProducts_OverrideForStore { get; set; }
=======
[NopResourceDisplayName("Admin.Configuration.Settings.Catalog.ExportImportRelatedEntitiesByName")]
public bool ExportImportRelatedEntitiesByName { get; set; }
public bool ExportImportRelatedEntitiesByName_OverrideForStore { get; set; }
>>>>>>>
[NopResourceDisplayName("Admin.Configuration.Settings.Catalog.RemoveRequiredProducts")]
public bool RemoveRequiredProducts { get; set; }
public bool RemoveRequiredProducts_OverrideForStore { get; set; }
[NopResourceDisplayName("Admin.Configuration.Settings.Catalog.ExportImportRelatedEntitiesByName")]
public bool ExportImportRelatedEntitiesByName { get; set; }
public bool ExportImportRelatedEntitiesByName_OverrideForStore { get; set; } |
<<<<<<<
var prefix = _cacheKeyService.PrepareKeyPrefix(NopCatalogDefaults.CategoriesByParentCategoryPrefixCacheKey, category.ParentCategoryId);
await _staticCacheManager.RemoveByPrefix(prefix);
prefix = _cacheKeyService.PrepareKeyPrefix(NopCatalogDefaults.CategoriesChildIdentifiersPrefixCacheKey, category.ParentCategoryId);
await _staticCacheManager.RemoveByPrefix(prefix);
=======
_staticCacheManager.RemoveByPrefix(NopCatalogDefaults.CategoriesByParentCategoryPrefix, category.ParentCategoryId);
_staticCacheManager.RemoveByPrefix(NopCatalogDefaults.CategoriesChildIdsPrefix, category.ParentCategoryId);
>>>>>>>
await _staticCacheManager.RemoveByPrefix(NopCatalogDefaults.CategoriesByParentCategoryPrefix, category.ParentCategoryId);
await _staticCacheManager.RemoveByPrefix(NopCatalogDefaults.CategoriesChildIdsPrefix, category.ParentCategoryId); |
<<<<<<<
if (affiliateId == 0)
return null;
return await _affiliateRepository.ToCachedGetById(affiliateId);
=======
return _affiliateRepository.GetById(affiliateId, cache => default);
>>>>>>>
return await _affiliateRepository.GetById(affiliateId, cache => default);
<<<<<<<
if (affiliate == null)
throw new ArgumentNullException(nameof(affiliate));
affiliate.Deleted = true;
await UpdateAffiliate(affiliate);
//event notification
await _eventPublisher.EntityDeleted(affiliate);
=======
_affiliateRepository.Delete(affiliate);
>>>>>>>
await _affiliateRepository.Delete(affiliate);
<<<<<<<
var affiliates = await query.ToPagedList(pageIndex, pageSize);
=======
query = query.Distinct().OrderByDescending(a => a.Id);
>>>>>>>
query = query.Distinct().OrderByDescending(a => a.Id);
<<<<<<<
if (affiliate == null)
throw new ArgumentNullException(nameof(affiliate));
await _affiliateRepository.Insert(affiliate);
//event notification
await _eventPublisher.EntityInserted(affiliate);
=======
_affiliateRepository.Insert(affiliate);
>>>>>>>
await _affiliateRepository.Insert(affiliate);
<<<<<<<
if (affiliate == null)
throw new ArgumentNullException(nameof(affiliate));
await _affiliateRepository.Update(affiliate);
//event notification
await _eventPublisher.EntityUpdated(affiliate);
=======
_affiliateRepository.Update(affiliate);
>>>>>>>
await _affiliateRepository.Update(affiliate); |
<<<<<<<
//we can not use ICacheKeyService because it'll cause circular references.
//that's why we use the default cache time
return await _staticCacheManager.Get(NopConfigurationDefaults.SettingsAllAsDictionaryCacheKey, async () =>
=======
return _staticCacheManager.Get(NopConfigurationDefaults.SettingsAllAsDictionaryCacheKey, () =>
>>>>>>>
return await _staticCacheManager.Get(NopConfigurationDefaults.SettingsAllAsDictionaryCacheKey, async () =>
<<<<<<<
await ClearCache();
//event notification
await _eventPublisher.EntityUpdated(setting);
=======
ClearCache();
>>>>>>>
await ClearCache();
<<<<<<<
if (settingId == 0)
return null;
return await _settingRepository.ToCachedGetById(settingId);
=======
return _settingRepository.GetById(settingId, cache => default);
>>>>>>>
return await _settingRepository.GetById(settingId, cache => default);
<<<<<<<
var query = from s in _settingRepository.Table
orderby s.Name, s.StoreId
select s;
//we can not use ICacheKeyService because it'll cause circular references.
//that's why we use the default cache time
var settings = await query.ToCachedList(NopConfigurationDefaults.SettingsAllCacheKey);
=======
var settings = _settingRepository.GetAll(query =>
{
return from s in query
orderby s.Name, s.StoreId
select s;
}, cache => default);
>>>>>>>
var settings = await _settingRepository.GetAll(query =>
{
return from s in query
orderby s.Name, s.StoreId
select s;
}, cache => default);
<<<<<<<
await _staticCacheManager.RemoveByPrefix(NopConfigurationDefaults.SettingsPrefixCacheKey);
=======
_staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<Setting>.Prefix);
>>>>>>>
await _staticCacheManager.RemoveByPrefix(NopEntityCacheDefaults<Setting>.Prefix); |
<<<<<<<
using System.Threading.Tasks;
using Nop.Core.Domain.Catalog;
=======
using Nop.Core.Caching;
using Nop.Core.Domain.Catalog;
>>>>>>>
using System.Threading.Tasks;
using Nop.Core.Caching;
using Nop.Core.Domain.Catalog;
<<<<<<<
protected override async Task ClearCache(ProductTag entity)
=======
/// <param name="entityEventType">Entity event type</param>
protected override void ClearCache(ProductTag entity, EntityEventType entityEventType)
>>>>>>>
/// <param name="entityEventType">Entity event type</param>
protected override async Task ClearCache(ProductTag entity, EntityEventType entityEventType)
<<<<<<<
await RemoveByPrefix(NopCatalogDefaults.ProductTagPrefixCacheKey);
=======
RemoveByPrefix(NopEntityCacheDefaults<ProductTag>.Prefix);
>>>>>>>
await RemoveByPrefix(NopEntityCacheDefaults<ProductTag>.Prefix); |
<<<<<<<
var prefix = _cacheKeyService.PrepareKeyPrefix(NopCatalogDefaults.ProductsRelatedPrefixCacheKey, entity.ProductId1);
await RemoveByPrefix(prefix);
=======
RemoveByPrefix(NopCatalogDefaults.RelatedProductsPrefix, entity.ProductId1);
>>>>>>>
await RemoveByPrefix(NopCatalogDefaults.RelatedProductsPrefix, entity.ProductId1); |
<<<<<<<
await _logRepository.Delete(log);
=======
_logRepository.Delete(log, false);
>>>>>>>
await _logRepository.Delete(log, false);
<<<<<<<
if (logs == null)
throw new ArgumentNullException(nameof(logs));
await _logRepository.Delete(logs);
=======
_logRepository.Delete(logs, false);
>>>>>>>
await _logRepository.Delete(logs, false);
<<<<<<<
var logLevelId = (int)logLevel.Value;
query = query.Where(l => logLevelId == l.LogLevelId);
}
if (!string.IsNullOrEmpty(message))
query = query.Where(l => l.ShortMessage.Contains(message) || l.FullMessage.Contains(message));
query = query.OrderByDescending(l => l.CreatedOnUtc);
var log = await query.ToPagedList(pageIndex, pageSize);
return log;
=======
if (fromUtc.HasValue)
query = query.Where(l => fromUtc.Value <= l.CreatedOnUtc);
if (toUtc.HasValue)
query = query.Where(l => toUtc.Value >= l.CreatedOnUtc);
if (logLevel.HasValue)
{
var logLevelId = (int)logLevel.Value;
query = query.Where(l => logLevelId == l.LogLevelId);
}
if (!string.IsNullOrEmpty(message))
query = query.Where(l => l.ShortMessage.Contains(message) || l.FullMessage.Contains(message));
query = query.OrderByDescending(l => l.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
return logs;
>>>>>>>
if (fromUtc.HasValue)
query = query.Where(l => fromUtc.Value <= l.CreatedOnUtc);
if (toUtc.HasValue)
query = query.Where(l => toUtc.Value >= l.CreatedOnUtc);
if (logLevel.HasValue)
{
var logLevelId = (int)logLevel.Value;
query = query.Where(l => logLevelId == l.LogLevelId);
}
if (!string.IsNullOrEmpty(message))
query = query.Where(l => l.ShortMessage.Contains(message) || l.FullMessage.Contains(message));
query = query.OrderByDescending(l => l.CreatedOnUtc);
return query;
}, pageIndex, pageSize);
return logs;
<<<<<<<
if (logId == 0)
return null;
return await _logRepository.GetById(logId);
=======
return _logRepository.GetById(logId);
>>>>>>>
return await _logRepository.GetById(logId);
<<<<<<<
if (logIds == null || logIds.Length == 0)
return new List<Log>();
var query = from l in _logRepository.Table
where logIds.Contains(l.Id)
select l;
var logItems = await query.ToListAsync();
//sort by passed identifiers
var sortedLogItems = new List<Log>();
foreach (var id in logIds)
{
var log = logItems.Find(x => x.Id == id);
if (log != null)
sortedLogItems.Add(log);
}
return sortedLogItems;
=======
return _logRepository.GetByIds(logIds);
>>>>>>>
return await _logRepository.GetByIds(logIds);
<<<<<<<
await _logRepository.Insert(log);
=======
_logRepository.Insert(log, false);
>>>>>>>
await _logRepository.Insert(log, false); |
<<<<<<<
return await _staticCacheManager.GetAsync(cacheKey, () => query.CountAsync());
=======
return await _staticCacheManager.Get(cacheKey, async () => await query.ToAsyncEnumerable().CountAsync());
>>>>>>>
return await _staticCacheManager.GetAsync(cacheKey, async () => await query.ToAsyncEnumerable().CountAsync()); |
<<<<<<<
if (specificationAttributeId == 0)
return null;
return await _specificationAttributeRepository.ToCachedGetById(specificationAttributeId);
=======
return _specificationAttributeRepository.GetById(specificationAttributeId, cache => default);
>>>>>>>
return await _specificationAttributeRepository.GetById(specificationAttributeId, cache => default);
<<<<<<<
if (specificationAttributeIds == null || specificationAttributeIds.Length == 0)
return new List<SpecificationAttribute>();
var query = from p in _specificationAttributeRepository.Table
where specificationAttributeIds.Contains(p.Id)
select p;
return await query.ToListAsync();
=======
return _specificationAttributeRepository.GetByIds(specificationAttributeIds);
>>>>>>>
return await _specificationAttributeRepository.GetByIds(specificationAttributeIds);
<<<<<<<
return await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecAttributesWithOptionsCacheKey));
=======
return _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecificationAttributesWithOptionsCacheKey), query.ToList);
}
/// <summary>
/// Gets specification attributes by group identifier
/// </summary>
/// <param name="specificationAttributeGroupId">The specification attribute group identifier</param>
/// <returns>Specification attributes</returns>
public virtual IList<SpecificationAttribute> GetSpecificationAttributesByGroupId(int? specificationAttributeGroupId = null)
{
var query = _specificationAttributeRepository.Table;
if (!specificationAttributeGroupId.HasValue || specificationAttributeGroupId > 0)
query = query.Where(sa => sa.SpecificationAttributeGroupId == specificationAttributeGroupId);
query = query.OrderBy(sa => sa.DisplayOrder).ThenBy(sa => sa.Id);
return query.ToList();
>>>>>>>
return await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecificationAttributesWithOptionsCacheKey), async () => await query.ToAsyncEnumerable().ToListAsync());
}
/// <summary>
/// Gets specification attributes by group identifier
/// </summary>
/// <param name="specificationAttributeGroupId">The specification attribute group identifier</param>
/// <returns>Specification attributes</returns>
public virtual async Task<IList<SpecificationAttribute>> GetSpecificationAttributesByGroupId(int? specificationAttributeGroupId = null)
{
var query = _specificationAttributeRepository.Table;
if (!specificationAttributeGroupId.HasValue || specificationAttributeGroupId > 0)
query = query.Where(sa => sa.SpecificationAttributeGroupId == specificationAttributeGroupId);
query = query.OrderBy(sa => sa.DisplayOrder).ThenBy(sa => sa.Id);
return await query.ToAsyncEnumerable().ToListAsync();
<<<<<<<
if (specificationAttribute == null)
throw new ArgumentNullException(nameof(specificationAttribute));
await _specificationAttributeRepository.Delete(specificationAttribute);
//event notification
await _eventPublisher.EntityDeleted(specificationAttribute);
=======
_specificationAttributeRepository.Delete(specificationAttribute);
>>>>>>>
await _specificationAttributeRepository.Delete(specificationAttribute);
<<<<<<<
if (specificationAttribute == null)
throw new ArgumentNullException(nameof(specificationAttribute));
await _specificationAttributeRepository.Insert(specificationAttribute);
//event notification
await _eventPublisher.EntityInserted(specificationAttribute);
=======
_specificationAttributeRepository.Insert(specificationAttribute);
>>>>>>>
await _specificationAttributeRepository.Insert(specificationAttribute);
<<<<<<<
if (specificationAttribute == null)
throw new ArgumentNullException(nameof(specificationAttribute));
await _specificationAttributeRepository.Update(specificationAttribute);
//event notification
await _eventPublisher.EntityUpdated(specificationAttribute);
=======
_specificationAttributeRepository.Update(specificationAttribute);
>>>>>>>
await _specificationAttributeRepository.Update(specificationAttribute);
<<<<<<<
if (specificationAttributeOptionId == 0)
return null;
return await _specificationAttributeOptionRepository.ToCachedGetById(specificationAttributeOptionId);
=======
return _specificationAttributeOptionRepository.GetById(specificationAttributeOptionId, cache => default);
>>>>>>>
return await _specificationAttributeOptionRepository.GetById(specificationAttributeOptionId, cache => default);
<<<<<<<
if (specificationAttributeOptionIds == null || specificationAttributeOptionIds.Length == 0)
return new List<SpecificationAttributeOption>();
var query = from sao in _specificationAttributeOptionRepository.Table
where specificationAttributeOptionIds.Contains(sao.Id)
select sao;
var specificationAttributeOptions = await query.ToListAsync();
//sort by passed identifiers
var sortedSpecificationAttributeOptions = new List<SpecificationAttributeOption>();
foreach (var id in specificationAttributeOptionIds)
{
var sao = specificationAttributeOptions.Find(x => x.Id == id);
if (sao != null)
sortedSpecificationAttributeOptions.Add(sao);
}
return sortedSpecificationAttributeOptions;
=======
return _specificationAttributeOptionRepository.GetByIds(specificationAttributeOptionIds);
>>>>>>>
return await _specificationAttributeOptionRepository.GetByIds(specificationAttributeOptionIds);
<<<<<<<
var specificationAttributeOptions = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecAttributesOptionsCacheKey, specificationAttributeId));
=======
var specificationAttributeOptions = _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecificationAttributeOptionsCacheKey, specificationAttributeId), query.ToList);
>>>>>>>
var specificationAttributeOptions = await _staticCacheManager.Get(_staticCacheManager.PrepareKeyForDefaultCache(NopCatalogDefaults.SpecificationAttributeOptionsCacheKey, specificationAttributeId), async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (specificationAttributeOption == null)
throw new ArgumentNullException(nameof(specificationAttributeOption));
await _specificationAttributeOptionRepository.Delete(specificationAttributeOption);
//event notification
await _eventPublisher.EntityDeleted(specificationAttributeOption);
=======
_specificationAttributeOptionRepository.Delete(specificationAttributeOption);
>>>>>>>
await _specificationAttributeOptionRepository.Delete(specificationAttributeOption);
<<<<<<<
if (specificationAttributeOption == null)
throw new ArgumentNullException(nameof(specificationAttributeOption));
await _specificationAttributeOptionRepository.Insert(specificationAttributeOption);
//event notification
await _eventPublisher.EntityInserted(specificationAttributeOption);
=======
_specificationAttributeOptionRepository.Insert(specificationAttributeOption);
>>>>>>>
await _specificationAttributeOptionRepository.Insert(specificationAttributeOption);
<<<<<<<
if (specificationAttributeOption == null)
throw new ArgumentNullException(nameof(specificationAttributeOption));
await _specificationAttributeOptionRepository.Update(specificationAttributeOption);
//event notification
await _eventPublisher.EntityUpdated(specificationAttributeOption);
=======
_specificationAttributeOptionRepository.Update(specificationAttributeOption);
>>>>>>>
await _specificationAttributeOptionRepository.Update(specificationAttributeOption);
<<<<<<<
if (productSpecificationAttribute == null)
throw new ArgumentNullException(nameof(productSpecificationAttribute));
await _productSpecificationAttributeRepository.Delete(productSpecificationAttribute);
//event notification
await _eventPublisher.EntityDeleted(productSpecificationAttribute);
=======
_productSpecificationAttributeRepository.Delete(productSpecificationAttribute);
>>>>>>>
await _productSpecificationAttributeRepository.Delete(productSpecificationAttribute);
<<<<<<<
public virtual async Task<IList<ProductSpecificationAttribute>> GetProductSpecificationAttributes(int productId = 0,
int specificationAttributeOptionId = 0, bool? allowFiltering = null, bool? showOnProductPage = null)
=======
public virtual IList<ProductSpecificationAttribute> GetProductSpecificationAttributes(int productId = 0,
int specificationAttributeOptionId = 0, bool? allowFiltering = null, bool? showOnProductPage = null, int? specificationAttributeGroupId = 0)
>>>>>>>
public virtual async Task<IList<ProductSpecificationAttribute>> GetProductSpecificationAttributes(int productId = 0,
int specificationAttributeOptionId = 0, bool? allowFiltering = null, bool? showOnProductPage = null, int? specificationAttributeGroupId = 0)
<<<<<<<
var productSpecificationAttributes = await query.ToCachedList(key);
=======
var productSpecificationAttributes = _staticCacheManager.Get(key, query.ToList);
>>>>>>>
var productSpecificationAttributes = await _staticCacheManager.Get(key, async () => await query.ToAsyncEnumerable().ToListAsync());
<<<<<<<
if (productSpecificationAttributeId == 0)
return null;
return await _productSpecificationAttributeRepository.GetById(productSpecificationAttributeId);
=======
return _productSpecificationAttributeRepository.GetById(productSpecificationAttributeId);
>>>>>>>
return await _productSpecificationAttributeRepository.GetById(productSpecificationAttributeId);
<<<<<<<
if (productSpecificationAttribute == null)
throw new ArgumentNullException(nameof(productSpecificationAttribute));
await _productSpecificationAttributeRepository.Insert(productSpecificationAttribute);
//event notification
await _eventPublisher.EntityInserted(productSpecificationAttribute);
=======
_productSpecificationAttributeRepository.Insert(productSpecificationAttribute);
>>>>>>>
await _productSpecificationAttributeRepository.Insert(productSpecificationAttribute);
<<<<<<<
if (productSpecificationAttribute == null)
throw new ArgumentNullException(nameof(productSpecificationAttribute));
await _productSpecificationAttributeRepository.Update(productSpecificationAttribute);
//event notification
await _eventPublisher.EntityUpdated(productSpecificationAttribute);
=======
_productSpecificationAttributeRepository.Update(productSpecificationAttribute);
>>>>>>>
await _productSpecificationAttributeRepository.Update(productSpecificationAttribute); |
<<<<<<<
[HttpsRequirement]
public virtual async Task<IActionResult> CustomerOrders()
=======
public virtual IActionResult CustomerOrders()
>>>>>>>
public virtual async Task<IActionResult> CustomerOrders()
<<<<<<<
[HttpsRequirement]
public virtual async Task<IActionResult> CustomerRewardPoints(int? pageNumber)
=======
public virtual IActionResult CustomerRewardPoints(int? pageNumber)
>>>>>>>
public virtual async Task<IActionResult> CustomerRewardPoints(int? pageNumber)
<<<<<<<
[HttpsRequirement]
public virtual async Task<IActionResult> Details(int orderId)
=======
public virtual IActionResult Details(int orderId)
>>>>>>>
public virtual async Task<IActionResult> Details(int orderId)
<<<<<<<
[HttpsRequirement]
public virtual async Task<IActionResult> PrintOrderDetails(int orderId)
=======
public virtual IActionResult PrintOrderDetails(int orderId)
>>>>>>>
public virtual async Task<IActionResult> PrintOrderDetails(int orderId)
<<<<<<<
[HttpsRequirement]
public virtual async Task<IActionResult> ShipmentDetails(int shipmentId)
=======
public virtual IActionResult ShipmentDetails(int shipmentId)
>>>>>>>
public virtual async Task<IActionResult> ShipmentDetails(int shipmentId) |
<<<<<<<
await RemoveByPrefix(NopDiscountDefaults.DiscountAllPrefixCacheKey);
var cacheKey = _cacheKeyService.PrepareKey(NopDiscountDefaults.DiscountRequirementModelCacheKey, entity);
await Remove(cacheKey);
var prefix = _cacheKeyService.PrepareKeyPrefix(NopDiscountDefaults.DiscountCategoryIdsByDiscountPrefixCacheKey, entity);
await RemoveByPrefix(prefix);
prefix = _cacheKeyService.PrepareKeyPrefix(NopDiscountDefaults.DiscountManufacturerIdsByDiscountPrefixCacheKey, entity);
await RemoveByPrefix(prefix);
=======
Remove(NopDiscountDefaults.DiscountRequirementsByDiscountCacheKey, entity);
RemoveByPrefix(NopDiscountDefaults.CategoryIdsByDiscountPrefix, entity);
RemoveByPrefix(NopDiscountDefaults.ManufacturerIdsByDiscountPrefix, entity);
>>>>>>>
await Remove(NopDiscountDefaults.DiscountRequirementsByDiscountCacheKey, entity);
await RemoveByPrefix(NopDiscountDefaults.CategoryIdsByDiscountPrefix, entity);
await RemoveByPrefix(NopDiscountDefaults.ManufacturerIdsByDiscountPrefix, entity); |
<<<<<<<
await Remove(NopLocalizationDefaults.LocalizedPropertyAllCacheKey);
var cacheKey = _cacheKeyService.PrepareKey(NopLocalizationDefaults.LocalizedPropertyCacheKey,
entity.LanguageId, entity.EntityId, entity.LocaleKeyGroup, entity.LocaleKey);
await Remove(cacheKey);
=======
Remove(NopLocalizationDefaults.LocalizedPropertyCacheKey, entity.LanguageId, entity.EntityId, entity.LocaleKeyGroup, entity.LocaleKey);
>>>>>>>
await Remove(NopLocalizationDefaults.LocalizedPropertyCacheKey, entity.LanguageId, entity.EntityId, entity.LocaleKeyGroup, entity.LocaleKey); |
<<<<<<<
var cacheKey = _cacheKeyService.PrepareKeyForDefaultCache(NopModelCacheDefaults.HomepageNewsModelKey, await _workContext.GetWorkingLanguage(), await _storeContext.GetCurrentStore());
var cachedModel = await _staticCacheManager.Get(cacheKey, async () =>
=======
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.HomepageNewsModelKey, _workContext.WorkingLanguage, _storeContext.CurrentStore);
var cachedModel = _staticCacheManager.Get(cacheKey, () =>
>>>>>>>
var cacheKey = _staticCacheManager.PrepareKeyForDefaultCache(NopModelCacheDefaults.HomepageNewsModelKey, await _workContext.GetWorkingLanguage(), await _storeContext.GetCurrentStore());
var cachedModel = await _staticCacheManager.Get(cacheKey, async () => |
<<<<<<<
if (vendorId == 0)
return null;
return await _vendorRepository.ToCachedGetById(vendorId);
=======
return _vendorRepository.GetById(vendorId, cache => default);
>>>>>>>
return await _vendorRepository.GetById(vendorId, cache => default);
<<<<<<<
group v by p.Id into v
select v.First()).ToListAsync();
=======
select v).Distinct().ToList();
>>>>>>>
select v).Distinct().ToAsyncEnumerable().ToListAsync();
<<<<<<<
if (vendor == null)
throw new ArgumentNullException(nameof(vendor));
vendor.Deleted = true;
await UpdateVendor(vendor);
//event notification
await _eventPublisher.EntityDeleted(vendor);
=======
_vendorRepository.Delete(vendor);
>>>>>>>
await _vendorRepository.Delete(vendor);
<<<<<<<
var vendors = await query.ToPagedList(pageIndex, pageSize);
=======
>>>>>>>
<<<<<<<
var query = _vendorRepository.Table;
if (vendorIds != null)
query = query.Where(v => vendorIds.Contains(v.Id));
return await query.ToListAsync();
=======
return _vendorRepository.GetByIds(vendorIds);
>>>>>>>
return await _vendorRepository.GetByIds(vendorIds);
<<<<<<<
if (vendor == null)
throw new ArgumentNullException(nameof(vendor));
await _vendorRepository.Insert(vendor);
//event notification
await _eventPublisher.EntityInserted(vendor);
=======
_vendorRepository.Insert(vendor);
>>>>>>>
await _vendorRepository.Insert(vendor);
<<<<<<<
if (vendor == null)
throw new ArgumentNullException(nameof(vendor));
await _vendorRepository.Update(vendor);
//event notification
await _eventPublisher.EntityUpdated(vendor);
=======
_vendorRepository.Update(vendor);
>>>>>>>
await _vendorRepository.Update(vendor);
<<<<<<<
if (vendorNoteId == 0)
return null;
return await _vendorNoteRepository.ToCachedGetById(vendorNoteId);
=======
return _vendorNoteRepository.GetById(vendorNoteId, cache => default);
>>>>>>>
return await _vendorNoteRepository.GetById(vendorNoteId, cache => default);
<<<<<<<
if (vendorNote == null)
throw new ArgumentNullException(nameof(vendorNote));
await _vendorNoteRepository.Delete(vendorNote);
//event notification
await _eventPublisher.EntityDeleted(vendorNote);
=======
_vendorNoteRepository.Delete(vendorNote);
>>>>>>>
await _vendorNoteRepository.Delete(vendorNote);
<<<<<<<
if (vendorNote == null)
throw new ArgumentNullException(nameof(vendorNote));
await _vendorNoteRepository.Insert(vendorNote);
//event notification
await _eventPublisher.EntityInserted(vendorNote);
=======
_vendorNoteRepository.Insert(vendorNote);
>>>>>>>
await _vendorNoteRepository.Insert(vendorNote); |
<<<<<<<
}).Wait();
=======
["Admin.Configuration.Plugins.ChangesApplyAfterReboot"] = "Changes will be applied after restart application",
["Admin.Configuration.Plugins.Fields.IsEnabled"] = "Enabled",
});
>>>>>>>
["Admin.Configuration.Plugins.ChangesApplyAfterReboot"] = "Changes will be applied after restart application",
["Admin.Configuration.Plugins.Fields.IsEnabled"] = "Enabled",
}).Wait(); |
<<<<<<<
if (topicTemplate == null)
throw new ArgumentNullException(nameof(topicTemplate));
await _topicTemplateRepository.Delete(topicTemplate);
//event notification
await _eventPublisher.EntityDeleted(topicTemplate);
=======
_topicTemplateRepository.Delete(topicTemplate);
>>>>>>>
await _topicTemplateRepository.Delete(topicTemplate);
<<<<<<<
var query = from pt in _topicTemplateRepository.Table
orderby pt.DisplayOrder, pt.Id
select pt;
var templates = await query.ToCachedList(_cacheKeyService.PrepareKeyForDefaultCache(NopTopicDefaults.TopicTemplatesAllCacheKey));
=======
var templates = _topicTemplateRepository.GetAll(query=>
{
return from pt in query
orderby pt.DisplayOrder, pt.Id
select pt;
}, cache => default);
>>>>>>>
var templates = await _topicTemplateRepository.GetAll(query=>
{
return from pt in query
orderby pt.DisplayOrder, pt.Id
select pt;
}, cache => default);
<<<<<<<
if (topicTemplateId == 0)
return null;
return await _topicTemplateRepository.ToCachedGetById(topicTemplateId);
=======
return _topicTemplateRepository.GetById(topicTemplateId, cache => default);
>>>>>>>
return await _topicTemplateRepository.GetById(topicTemplateId, cache => default);
<<<<<<<
if (topicTemplate == null)
throw new ArgumentNullException(nameof(topicTemplate));
await _topicTemplateRepository.Insert(topicTemplate);
//event notification
await _eventPublisher.EntityInserted(topicTemplate);
=======
_topicTemplateRepository.Insert(topicTemplate);
>>>>>>>
await _topicTemplateRepository.Insert(topicTemplate);
<<<<<<<
if (topicTemplate == null)
throw new ArgumentNullException(nameof(topicTemplate));
await _topicTemplateRepository.Update(topicTemplate);
//event notification
await _eventPublisher.EntityUpdated(topicTemplate);
=======
_topicTemplateRepository.Update(topicTemplate);
>>>>>>>
await _topicTemplateRepository.Update(topicTemplate); |
<<<<<<<
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics1 { DataContext = Keyboard };
break;
=======
default:
newContent = new CommonViews.Diacritics1 { DataContext = Keyboard };
break;
>>>>>>>
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics1 { DataContext = Keyboard };
break;
default:
newContent = new CommonViews.Diacritics1 { DataContext = Keyboard };
break;
<<<<<<<
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics2 { DataContext = Keyboard };
break;
=======
default:
newContent = new CommonViews.Diacritics2 { DataContext = Keyboard };
break;
>>>>>>>
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics2 { DataContext = Keyboard };
break;
default:
newContent = new CommonViews.Diacritics2 { DataContext = Keyboard };
break;
<<<<<<<
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics3 { DataContext = Keyboard };
break;
=======
default:
newContent = new CommonViews.Diacritics3 { DataContext = Keyboard };
break;
>>>>>>>
case Languages.GermanGermany:
newContent = new GermanViews.Diacritics3 { DataContext = Keyboard };
break;
default:
newContent = new CommonViews.Diacritics3 { DataContext = Keyboard };
break; |
<<<<<<<
Log.Error("Keyboard doesn't have backaction, going back to initial keyboard instead");
InitialiseKeyboard(this.mainWindowManipulationService);
=======
if (Settings.Default.EnableCommuniKateKeyboardLayout)
{
Settings.Default.UsingCommuniKateKeyboardLayout = Settings.Default.UseCommuniKateKeyboardLayoutByDefault;
Settings.Default.CommuniKateKeyboardCurrentContext = null;
Settings.Default.CommuniKateKeyboardPrevious1Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious2Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious3Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious4Context = "_null_";
}
Keyboard = new Alpha();
>>>>>>>
Log.Error("Keyboard doesn't have backaction, going back to initial keyboard instead");
if (Settings.Default.EnableCommuniKateKeyboardLayout)
{
Settings.Default.UsingCommuniKateKeyboardLayout = Settings.Default.UseCommuniKateKeyboardLayoutByDefault;
Settings.Default.CommuniKateKeyboardCurrentContext = null;
Settings.Default.CommuniKateKeyboardPrevious1Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious2Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious3Context = "_null_";
Settings.Default.CommuniKateKeyboardPrevious4Context = "_null_";
}
InitialiseKeyboard(this.mainWindowManipulationService); |
<<<<<<<
case Languages.EnglishUS:
case Languages.EnglishUK:
case Languages.EnglishCanada:
case Languages.DutchNetherlands:
newContent = new EnglishViews.Alpha {DataContext = Keyboard};
break;
=======
>>>>>>>
case Languages.DutchNetherlands:
<<<<<<<
switch (Settings.Default.KeyboardLanguage)
{
case Languages.EnglishUS:
case Languages.EnglishUK:
case Languages.EnglishCanada:
case Languages.DutchNetherlands:
newContent = new EnglishViews.ConversationAlpha { DataContext = Keyboard };
break;
=======
switch (Settings.Default.KeyboardAndDictionaryLanguage)
{
>>>>>>>
switch (Settings.Default.KeyboardAndDictionaryLanguage)
{
case Languages.DutchNetherlands: |
<<<<<<<
using CatalanViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Catalan;
=======
using CroatianViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Croatian;
using DanishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Danish;
>>>>>>>
using CatalanViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Catalan;
using CroatianViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Croatian;
using DanishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Danish;
<<<<<<<
using SpanishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Spanish;
using TurkishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Turkish;
=======
using SlovakViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Slovak;
using SlovenianViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Slovenian;
using SpanishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Spanish;
using TurkishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Turkish;
>>>>>>>
using SlovakViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Slovak;
using SlovenianViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Slovenian;
using SpanishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Spanish;
using TurkishViews = JuliusSweetland.OptiKey.UI.Views.Keyboards.Turkish;
<<<<<<<
case Languages.CatalanSpain:
newContent = new CatalanViews.Alpha { DataContext = Keyboard };
break;
=======
case Languages.CroatianCroatia:
newContent = new CroatianViews.Alpha { DataContext = Keyboard };
break;
case Languages.DanishDenmark:
newContent = new DanishViews.Alpha { DataContext = Keyboard };
break;
>>>>>>>
case Languages.CatalanSpain:
newContent = new CatalanViews.Alpha { DataContext = Keyboard };
break;
case Languages.CroatianCroatia:
newContent = new CroatianViews.Alpha { DataContext = Keyboard };
break;
case Languages.DanishDenmark:
newContent = new DanishViews.Alpha { DataContext = Keyboard };
break;
<<<<<<<
case Languages.SpanishSpain:
newContent = new SpanishViews.Alpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.Alpha { DataContext = Keyboard };
break;
=======
case Languages.SlovakSlovakia:
newContent = new SlovakViews.Alpha { DataContext = Keyboard };
break;
case Languages.SlovenianSlovenia:
newContent = new SlovenianViews.Alpha { DataContext = Keyboard };
break;
case Languages.SpanishSpain:
newContent = new SpanishViews.Alpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.Alpha { DataContext = Keyboard };
break;
>>>>>>>
case Languages.SlovakSlovakia:
newContent = new SlovakViews.Alpha { DataContext = Keyboard };
break;
case Languages.SlovenianSlovenia:
newContent = new SlovenianViews.Alpha { DataContext = Keyboard };
break;
case Languages.SpanishSpain:
newContent = new SpanishViews.Alpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.Alpha { DataContext = Keyboard };
break;
<<<<<<<
case Languages.CatalanSpain:
newContent = new CatalanViews.ConversationAlpha { DataContext = Keyboard };
break;
=======
case Languages.CroatianCroatia:
newContent = new CroatianViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.DanishDenmark:
newContent = new DanishViews.ConversationAlpha { DataContext = Keyboard };
break;
>>>>>>>
case Languages.CatalanSpain:
newContent = new CatalanViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.CroatianCroatia:
newContent = new CroatianViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.DanishDenmark:
newContent = new DanishViews.ConversationAlpha { DataContext = Keyboard };
break;
<<<<<<<
case Languages.SpanishSpain:
newContent = new SpanishViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.ConversationAlpha { DataContext = Keyboard };
break;
=======
case Languages.SlovakSlovakia:
newContent = new SlovakViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.SlovenianSlovenia:
newContent = new SlovenianViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.SpanishSpain:
newContent = new SpanishViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.ConversationAlpha { DataContext = Keyboard };
break;
>>>>>>>
case Languages.SlovakSlovakia:
newContent = new SlovakViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.SlovenianSlovenia:
newContent = new SlovenianViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.SpanishSpain:
newContent = new SpanishViews.ConversationAlpha { DataContext = Keyboard };
break;
case Languages.TurkishTurkey:
newContent = new TurkishViews.ConversationAlpha { DataContext = Keyboard };
break; |
<<<<<<<
ConversationAlpha1Keyboard,
ConversationAlpha2Keyboard,
=======
CommuniKate,
CommuniKateKeyboard,
ConversationAlphaKeyboard,
ConversationConfirmKeyboard,
ConversationConfirmYes,
ConversationConfirmNo,
>>>>>>>
CommuniKate,
CommuniKateKeyboard,
ConversationAlpha1Keyboard,
ConversationAlpha2Keyboard,
ConversationConfirmKeyboard,
ConversationConfirmYes,
ConversationConfirmNo, |
<<<<<<<
using log4net;
using Microsoft.Practices.Prism.Interactivity.InteractionRequest;
=======
using Prism.Interactivity.InteractionRequest;
>>>>>>>
using log4net;
using Prism.Interactivity.InteractionRequest; |
<<<<<<<
new KeyValuePair<string, Languages>(Resources.GERMAN_GERMANY, Enums.Languages.GermanGermany),
new KeyValuePair<string, Languages>(Resources.DUTCH_BELGIUM, Enums.Languages.DutchBelgium),
new KeyValuePair<string, Languages>(Resources.DUTCH_NETHERLANDS, Enums.Languages.DutchNetherlands)
=======
new KeyValuePair<string, Languages>(Resources.GERMAN_GERMANY, Enums.Languages.GermanGermany),
new KeyValuePair<string, Languages>(Resources.RUSSIAN_RUSSIA, Enums.Languages.RussianRussia)
>>>>>>>
new KeyValuePair<string, Languages>(Resources.GERMAN_GERMANY, Enums.Languages.GermanGermany),
new KeyValuePair<string, Languages>(Resources.DUTCH_BELGIUM, Enums.Languages.DutchBelgium),
new KeyValuePair<string, Languages>(Resources.DUTCH_NETHERLANDS, Enums.Languages.DutchNetherlands)
new KeyValuePair<string, Languages>(Resources.RUSSIAN_RUSSIA, Enums.Languages.RussianRussia) |
<<<<<<<
StoreLastProcessedText(null);
GenerateAutoCompleteSuggestions();
=======
StoreLastTextChange(null);
GenerateSuggestions(true);
>>>>>>>
StoreLastProcessedText(null);
GenerateSuggestions(true);
<<<<<<<
private string CombineStringWithActiveDeadKeys(string input)
=======
private string ComposeDiacritics(string input)
>>>>>>>
private string CombineStringWithActiveDeadKeys(string input)
<<<<<<<
private void ProcessText(string newText, bool generateAutoCompleteSuggestions)
=======
private void ProcessText(string captureText, bool generateSuggestions)
>>>>>>>
private void ProcessText(string newText, bool generateSuggestions)
<<<<<<<
//Suppress auto space if...
if (string.IsNullOrEmpty(lastTextChange) //we have no text change history
|| (lastTextChange.Length == 1 && newText.Length == 1 && !lastTextChangeWasSuggestion) //we are capturing single chars and are on the 2nd or later key (and the last capture wasn't a suggestion, which can be 1 character)
|| !Settings.Default.KeyboardAndDictionaryLanguage.SupportsAutoSpace() //Language does not support auto space
|| (newText.Length == 1 && !char.IsLetter(newText.First())) //we have captured a single char which is not a letter
|| new[] { " ", "\n" }.Contains(lastTextChange)) //the current capture follows a space or newline
=======
//Suppress auto space if...
if (string.IsNullOrWhiteSpace(lastTextChange))
>>>>>>>
//Suppress auto space if...
if (string.IsNullOrWhiteSpace(lastProcessedText))
<<<<<<<
if (generateAutoCompleteSuggestions)
=======
StoreLastTextChange(modifiedCaptureText);
if (generateSuggestions)
>>>>>>>
if (generateSuggestions) |
<<<<<<<
new KeyValueAndTimeSpan(Resources.SPANISH_SPAIN, KeyValues.SpanishSpainKey, dictionary.ContainsKey(KeyValues.SpanishSpainKey) ? dictionary[KeyValues.SpanishSpainKey] : (TimeSpan?)null),
=======
new KeyValueAndTimeSpan(Resources.TURKISH_TURKEY, KeyValues.TurkishTurkeyKey, dictionary.ContainsKey(KeyValues.TurkishTurkeyKey) ? dictionary[KeyValues.TurkishTurkeyKey] : (TimeSpan?)null),
>>>>>>>
new KeyValueAndTimeSpan(Resources.SPANISH_SPAIN, KeyValues.SpanishSpainKey, dictionary.ContainsKey(KeyValues.SpanishSpainKey) ? dictionary[KeyValues.SpanishSpainKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.TURKISH_TURKEY, KeyValues.TurkishTurkeyKey, dictionary.ContainsKey(KeyValues.TurkishTurkeyKey) ? dictionary[KeyValues.TurkishTurkeyKey] : (TimeSpan?)null), |
<<<<<<<
CatalanSpain,
DutchBelgium,
=======
CroatianCroatia,
DanishDenmark,
DutchBelgium,
>>>>>>>
CatalanSpain,
CroatianCroatia,
DanishDenmark,
DutchBelgium,
<<<<<<<
RussianRussia,
SpanishSpain,
TurkishTurkey
=======
ItalianItaly,
PortuguesePortugal,
RussianRussia,
SlovenianSlovenia,
SlovakSlovakia,
SpanishSpain,
TurkishTurkey
>>>>>>>
ItalianItaly,
PortuguesePortugal,
RussianRussia,
SlovenianSlovenia,
SlovakSlovakia,
SpanishSpain,
TurkishTurkey
<<<<<<<
case Languages.CatalanSpain: return Resources.CATALAN_SPAIN;
=======
case Languages.CroatianCroatia: return Resources.CROATIAN_CROATIA;
case Languages.DanishDenmark: return Resources.DANISH_DENMARK;
>>>>>>>
case Languages.CatalanSpain: return Resources.CATALAN_SPAIN;
case Languages.CroatianCroatia: return Resources.CROATIAN_CROATIA;
case Languages.DanishDenmark: return Resources.DANISH_DENMARK;
<<<<<<<
case Languages.SpanishSpain: return Resources.SPANISH_SPAIN;
case Languages.TurkishTurkey: return Resources.TURKISH_TURKEY;
=======
case Languages.SlovakSlovakia: return Resources.SLOVAK_SLOVAKIA;
case Languages.SlovenianSlovenia: return Resources.SLOVENIAN_SLOVENIA;
case Languages.SpanishSpain: return Resources.SPANISH_SPAIN;
case Languages.TurkishTurkey: return Resources.TURKISH_TURKEY;
>>>>>>>
case Languages.SlovakSlovakia: return Resources.SLOVAK_SLOVAKIA;
case Languages.SlovenianSlovenia: return Resources.SLOVENIAN_SLOVENIA;
case Languages.SpanishSpain: return Resources.SPANISH_SPAIN;
case Languages.TurkishTurkey: return Resources.TURKISH_TURKEY;
<<<<<<<
case Languages.CatalanSpain: return CultureInfo.GetCultureInfo("ca-ES");
=======
case Languages.CroatianCroatia: return CultureInfo.GetCultureInfo("hr-HR");
case Languages.DanishDenmark: return CultureInfo.GetCultureInfo("da-DK");
>>>>>>>
case Languages.CatalanSpain: return CultureInfo.GetCultureInfo("ca-ES");
case Languages.CroatianCroatia: return CultureInfo.GetCultureInfo("hr-HR");
case Languages.DanishDenmark: return CultureInfo.GetCultureInfo("da-DK");
<<<<<<<
case Languages.SpanishSpain: return CultureInfo.GetCultureInfo("es-ES");
case Languages.TurkishTurkey: return CultureInfo.GetCultureInfo("tr-TR");
=======
case Languages.SlovakSlovakia: return CultureInfo.GetCultureInfo("sk-SK");
case Languages.SlovenianSlovenia: return CultureInfo.GetCultureInfo("sl-SI");
case Languages.SpanishSpain: return CultureInfo.GetCultureInfo("es-ES");
case Languages.TurkishTurkey: return CultureInfo.GetCultureInfo("tr-TR");
>>>>>>>
case Languages.SlovakSlovakia: return CultureInfo.GetCultureInfo("sk-SK");
case Languages.SlovenianSlovenia: return CultureInfo.GetCultureInfo("sl-SI");
case Languages.SpanishSpain: return CultureInfo.GetCultureInfo("es-ES");
case Languages.TurkishTurkey: return CultureInfo.GetCultureInfo("tr-TR"); |
<<<<<<<
Log.DebugFormat("GetAutoCompleteSuggestions called with root:'{0}'.", root);
=======
Log.DebugFormat("GetEntries called with hash '{0}'", hash);
>>>>>>>
Log.DebugFormat("GetAutoCompleteSuggestions called with root '{0}'", root);
<<<<<<<
Log.Debug(string.Format("IncrementOrDecrementOfEntryUsageCount called with entry '{0}' and isIncrement={1}", text, isIncrement));
=======
Log.DebugFormat("PerformIncrementOrDecrementOfEntryUsageCount called with entry '{0}' and isIncrement={1}", entry, isIncrement);
>>>>>>>
Log.DebugFormat("PerformIncrementOrDecrementOfEntryUsageCount called with entry '{0}' and isIncrement={1}", text, isIncrement); |
<<<<<<<
//Spanish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.SpanishSpain)
{
//Acute accent: Áá éÉ íÍ óÓ úÚ
if (keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Diaeresis: Üü
if (keyStateService.KeyDownStates[KeyValues.CombiningDiaeresisOrUmlautKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningDiaeresisOrUmlautKey //Allow the diaeresis to be manually released
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Turkish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.TurkishTurkey)
{
//Circumflex: Ââ Îî Ûû
if (keyStateService.KeyDownStates[KeyValues.CombiningCircumflexKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
=======
//Spanish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.SpanishSpain)
{
//Acute accent: Áá éÉ íÍ óÓ úÚ
if (keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Diaeresis: Üü
if (keyStateService.KeyDownStates[KeyValues.CombiningDiaeresisOrUmlautKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningDiaeresisOrUmlautKey //Allow the diaeresis to be manually released
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Slovak specific rules
if(Settings.Default.KeyboardAndDictionaryLanguage == Languages.SlovakSlovakia)
{
//Acute accent: Áá éÉ íÍ ĺĹ óÓ ŕŔ úÚ ýÝ
if(keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("l")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("r")
|| keyValue == new KeyValue("u")
|| keyValue == new KeyValue("y")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Caron: čČ ďĎ ľĽ ňŇ šŠ ťŤ žŽ
if (keyStateService.KeyDownStates[KeyValues.CombiningCaronOrHacekKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningCaronOrHacekKey //Allow the caron to be manually released
|| keyValue == new KeyValue("c")
|| keyValue == new KeyValue("d")
|| keyValue == new KeyValue("l")
|| keyValue == new KeyValue("n")
|| keyValue == new KeyValue("s")
|| keyValue == new KeyValue("t")
|| keyValue == new KeyValue("z")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Turkish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.TurkishTurkey)
{
//Circumflex: Ââ Îî Ûû
if (keyStateService.KeyDownStates[KeyValues.CombiningCircumflexKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
>>>>>>>
//Spanish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.SpanishSpain)
{
//Acute accent: Áá éÉ íÍ óÓ úÚ
if (keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Diaeresis: Üü
if (keyStateService.KeyDownStates[KeyValues.CombiningDiaeresisOrUmlautKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningDiaeresisOrUmlautKey //Allow the diaeresis to be manually released
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Slovak specific rules
if(Settings.Default.KeyboardAndDictionaryLanguage == Languages.SlovakSlovakia)
{
//Acute accent: Áá éÉ íÍ ĺĹ óÓ ŕŔ úÚ ýÝ
if(keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("l")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("r")
|| keyValue == new KeyValue("u")
|| keyValue == new KeyValue("y")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Caron: čČ ďĎ ľĽ ňŇ šŠ ťŤ žŽ
if (keyStateService.KeyDownStates[KeyValues.CombiningCaronOrHacekKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningCaronOrHacekKey //Allow the caron to be manually released
|| keyValue == new KeyValue("c")
|| keyValue == new KeyValue("d")
|| keyValue == new KeyValue("l")
|| keyValue == new KeyValue("n")
|| keyValue == new KeyValue("s")
|| keyValue == new KeyValue("t")
|| keyValue == new KeyValue("z")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Turkish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.TurkishTurkey)
{
//Circumflex: Ââ Îî Ûû
if (keyStateService.KeyDownStates[KeyValues.CombiningCircumflexKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Spanish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.SpanishSpain)
{
//Acute accent: Áá éÉ íÍ óÓ úÚ
if (keyStateService.KeyDownStates[KeyValues.CombiningAcuteAccentKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("e")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("o")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
//Diaeresis: Üü
if (keyStateService.KeyDownStates[KeyValues.CombiningDiaeresisOrUmlautKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningDiaeresisOrUmlautKey //Allow the diaeresis to be manually released
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
}
//Turkish specific rules
if (Settings.Default.KeyboardAndDictionaryLanguage == Languages.TurkishTurkey)
{
//Circumflex: Ââ Îî Ûû
if (keyStateService.KeyDownStates[KeyValues.CombiningCircumflexKey].Value.IsDownOrLockedDown())
{
return keyValue == KeyValues.CombiningAcuteAccentKey //Allow the acute accent to be manually released
|| keyValue == new KeyValue("a")
|| keyValue == new KeyValue("i")
|| keyValue == new KeyValue("u")
|| keyValue == KeyValues.LeftShiftKey; //Allow shift to be toggled on/off
}
} |
<<<<<<<
new KeyValueAndTimeSpan(Resources.CATALAN_SPAIN, KeyValues.CatalanSpainKey, dictionary.ContainsKey(KeyValues.CatalanSpainKey) ? dictionary[KeyValues.CatalanSpainKey] : (TimeSpan?)null),
=======
new KeyValueAndTimeSpan(Resources.CROATIAN_CROATIA, KeyValues.CroatianCroatiaKey,dictionary.ContainsKey(KeyValues.CroatianCroatiaKey) ? dictionary[KeyValues.CroatianCroatiaKey] : (TimeSpan?) null),
new KeyValueAndTimeSpan(Resources.DANISH_DENMARK, KeyValues.DanishDenmarkKey,dictionary.ContainsKey(KeyValues.DanishDenmarkKey) ? dictionary[KeyValues.DanishDenmarkKey] : (TimeSpan?) null),
>>>>>>>
new KeyValueAndTimeSpan(Resources.CATALAN_SPAIN, KeyValues.CatalanSpainKey, dictionary.ContainsKey(KeyValues.CatalanSpainKey) ? dictionary[KeyValues.CatalanSpainKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.CROATIAN_CROATIA, KeyValues.CroatianCroatiaKey,dictionary.ContainsKey(KeyValues.CroatianCroatiaKey) ? dictionary[KeyValues.CroatianCroatiaKey] : (TimeSpan?) null),
new KeyValueAndTimeSpan(Resources.DANISH_DENMARK, KeyValues.DanishDenmarkKey,dictionary.ContainsKey(KeyValues.DanishDenmarkKey) ? dictionary[KeyValues.DanishDenmarkKey] : (TimeSpan?) null),
<<<<<<<
new KeyValueAndTimeSpan(Resources.SPANISH_SPAIN, KeyValues.SpanishSpainKey, dictionary.ContainsKey(KeyValues.SpanishSpainKey) ? dictionary[KeyValues.SpanishSpainKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.TURKISH_TURKEY, KeyValues.TurkishTurkeyKey, dictionary.ContainsKey(KeyValues.TurkishTurkeyKey) ? dictionary[KeyValues.TurkishTurkeyKey] : (TimeSpan?)null),
=======
new KeyValueAndTimeSpan(Resources.SLOVAK_SLOVAKIA, KeyValues.SlovakSlovakiaKey, dictionary.ContainsKey(KeyValues.SlovakSlovakiaKey) ? dictionary[KeyValues.SlovakSlovakiaKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.SLOVENIAN_SLOVENIA, KeyValues.SlovenianSloveniaKey, dictionary.ContainsKey(KeyValues.SlovenianSloveniaKey) ? dictionary[KeyValues.SlovenianSloveniaKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.SPANISH_SPAIN, KeyValues.SpanishSpainKey, dictionary.ContainsKey(KeyValues.SpanishSpainKey) ? dictionary[KeyValues.SpanishSpainKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.TURKISH_TURKEY, KeyValues.TurkishTurkeyKey, dictionary.ContainsKey(KeyValues.TurkishTurkeyKey) ? dictionary[KeyValues.TurkishTurkeyKey] : (TimeSpan?)null),
>>>>>>>
new KeyValueAndTimeSpan(Resources.SLOVAK_SLOVAKIA, KeyValues.SlovakSlovakiaKey, dictionary.ContainsKey(KeyValues.SlovakSlovakiaKey) ? dictionary[KeyValues.SlovakSlovakiaKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.SLOVENIAN_SLOVENIA, KeyValues.SlovenianSloveniaKey, dictionary.ContainsKey(KeyValues.SlovenianSloveniaKey) ? dictionary[KeyValues.SlovenianSloveniaKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.SPANISH_SPAIN, KeyValues.SpanishSpainKey, dictionary.ContainsKey(KeyValues.SpanishSpainKey) ? dictionary[KeyValues.SpanishSpainKey] : (TimeSpan?)null),
new KeyValueAndTimeSpan(Resources.TURKISH_TURKEY, KeyValues.TurkishTurkeyKey, dictionary.ContainsKey(KeyValues.TurkishTurkeyKey) ? dictionary[KeyValues.TurkishTurkeyKey] : (TimeSpan?)null), |
<<<<<<<
result &= await this.ExtractNodeAsync(selectedItem, path);
=======
await this.ExtractNodeAsync(selectedItem, path, extractMode);
>>>>>>>
result &= await this.ExtractNodeAsync(selectedItem, path, extractMode);
<<<<<<<
private async Task<Boolean> ExtractNodeAsync(ITreeItem node, String outputRoot, String rootPath = null)
=======
private async Task ExtractNodeAsync(ITreeItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath = null)
>>>>>>>
private async Task<Boolean> ExtractNodeAsync(ITreeItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath = null)
<<<<<<<
return await this.ExtractNodeAsync(leaf, outputRoot, rootPath);
=======
await this.ExtractNodeAsync(leaf, outputRoot, extractMode, rootPath);
>>>>>>>
return await this.ExtractNodeAsync(leaf, outputRoot, extractMode, rootPath);
<<<<<<<
return await this.ExtractNodeAsync(branch, outputRoot, rootPath);
=======
await this.ExtractNodeAsync(branch, outputRoot,extractMode, rootPath);
>>>>>>>
return await this.ExtractNodeAsync(branch, outputRoot, extractMode, rootPath);
<<<<<<<
private async Task<Boolean> ExtractNodeAsync(IStreamTreeItem node, String outputRoot, String rootPath)
=======
private async Task ExtractNodeAsync(IStreamTreeItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath)
>>>>>>>
private async Task<Boolean> ExtractNodeAsync(IStreamTreeItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath)
<<<<<<<
private async Task<Boolean> ExtractNodeAsync(IBranchItem node, String outputRoot, String rootPath)
=======
private async Task ExtractNodeAsync(IBranchItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath)
>>>>>>>
private async Task<Boolean> ExtractNodeAsync(IBranchItem node, String outputRoot, ExtractModeEnum extractMode, String rootPath)
<<<<<<<
result &= await this.ExtractNodeAsync(child, outputRoot, rootPath);
=======
await this.ExtractNodeAsync(child, outputRoot, extractMode, rootPath);
>>>>>>>
result &= await this.ExtractNodeAsync(child, outputRoot, extractMode, rootPath); |
<<<<<<<
case ExtractModeEnum.New: return;
case ExtractModeEnum.NewOrLatest: if (target.LastWriteTimeUtc >= node.LastModifiedUtc) return; break;
=======
case ExtractModeEnum.New: return false;
case ExtractModeEnum.NewOrLatest: if (target.LastWriteTimeUtc >= node.LastWriteTimeUtc) return false; break;
>>>>>>>
case ExtractModeEnum.New: return false;
case ExtractModeEnum.NewOrLatest: if (target.LastWriteTimeUtc >= node.LastModifiedUtc) return false; break;
<<<<<<<
target.LastWriteTimeUtc = node.LastModifiedUtc;
=======
using (FileStream fs = File.Create(absolutePath))
{
await dataStream.CopyToAsync(fs, 4096);
}
target.LastWriteTimeUtc = node.LastWriteTimeUtc;
}
}
catch (ZStdException ex)
{
return false;
>>>>>>>
using (FileStream fs = File.Create(absolutePath))
{
await dataStream.CopyToAsync(fs, 4096);
}
target.LastWriteTimeUtc = node.LastModifiedUtc;
}
}
catch (ZStdException ex)
{
return false; |
<<<<<<<
.WithVisibleFrom(Graph.Class.Type)));
// TODO: Consider if this is necessary
AddSuggestionsWithCategory("This Variables", App.ReflectionProvider.GetVariables(
new ReflectionProviderVariableQuery()
.WithStatic(true)
.WithVisibleFrom(Graph.Class.Type)));
=======
.WithVisibleFrom(Method.Class.Type)));
>>>>>>>
.WithVisibleFrom(Graph.Class.Type)));
<<<<<<<
.WithVisibleFrom(Graph.Class.Type)));
// TODO: Consider if this is necessary
AddSuggestionsWithCategory("Static Variables", App.ReflectionProvider.GetVariables(
new ReflectionProviderVariableQuery()
.WithStatic(true)
.WithVisibleFrom(Graph.Class.Type)));
=======
.WithVisibleFrom(Method.Class.Type)));
>>>>>>>
.WithVisibleFrom(Graph.Class.Type))); |
<<<<<<<
public void FieldsTest()
{
Mapper.Register<Brand, BrandViewModel>();
Mapper.Register<Table, TableViewModel>();
Mapper.Register<Size, SizeViewModel>();
Mapper.Register<Country, CountryViewModel>();
Mapper.Compile();
var srcAndDest = Functional.FieldsTestMap();
var bvm = Mapper.Map<Table, TableViewModel>(srcAndDest.Key);
Assert.AreEqual(bvm, srcAndDest.Value);
}
[Test]
=======
public void ParallelPrecompileCollectionTest()
{
Mapper.Register<Composition, CompositionViewModel>()
.Member(dest => dest.Booking, src => src.Booking);
Mapper.Register<Booking, BookingViewModel>();
Mapper.Compile();
var actions = new List<Action>();
for (var i = 0; i < 100; i++)
{
actions.Add(() => Mapper.PrecompileCollection<List<Booking>, IEnumerable<BookingViewModel>>());
}
Parallel.Invoke(actions.ToArray());
}
[Test]
>>>>>>>
public void ParallelPrecompileCollectionTest()
{
Mapper.Register<Composition, CompositionViewModel>()
.Member(dest => dest.Booking, src => src.Booking);
Mapper.Register<Booking, BookingViewModel>();
Mapper.Compile();
var actions = new List<Action>();
for (var i = 0; i < 100; i++)
{
actions.Add(() => Mapper.PrecompileCollection<List<Booking>, IEnumerable<BookingViewModel>>());
}
Parallel.Invoke(actions.ToArray());
}
[Test]
public void FieldsTest()
{
Mapper.Register<Brand, BrandViewModel>();
Mapper.Register<Table, TableViewModel>();
Mapper.Register<Size, SizeViewModel>();
Mapper.Register<Country, CountryViewModel>();
Mapper.Compile();
var srcAndDest = Functional.FieldsTestMap();
var bvm = Mapper.Map<Table, TableViewModel>(srcAndDest.Key);
Assert.AreEqual(bvm, srcAndDest.Value);
}
[Test] |
<<<<<<<
else
{
// for Unix, skip everything else and just wire up the event handler
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
// Assembly.ReflectionOnlyLoadFrom doesn't automatically load deps, this stops it from throwing when called
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (sender, args) => Assembly.ReflectionOnlyLoad(args.Name);
=======
>>>>>>>
else
{
// for Unix, skip everything else and just wire up the event handler
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
// Assembly.ReflectionOnlyLoadFrom doesn't automatically load deps, this stops it from throwing when called
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (sender, args) => Assembly.ReflectionOnlyLoad(args.Name);
<<<<<<<
#if true // switch to if false for system-agnostic glory!
switch (EXE_PROJECT.OSTailoredCode.CurrentOS)
{
case EXE_PROJECT.OSTailoredCode.DistinctOS.Linux:
case EXE_PROJECT.OSTailoredCode.DistinctOS.macOS:
HawkFile.ArchiveHandlerFactory = new SharpCompressArchiveHandler();
break;
case EXE_PROJECT.OSTailoredCode.DistinctOS.Windows:
HawkFile.ArchiveHandlerFactory = new SevenZipSharpArchiveHandler();
break;
}
#else
HawkFile.ArchiveHandlerFactory = new SharpCompressArchiveHandler();
#endif
=======
HawkFile.ArchiveHandlerFactory = new SharpCompressArchiveHandler();
>>>>>>>
HawkFile.ArchiveHandlerFactory = new SharpCompressArchiveHandler(); |
<<<<<<<
=======
ForceDeterminism = s.ForceDeterminism,
CropSGBFrame = s.CropSGBFrame,
Profile = ss.Profile
>>>>>>>
CropSGBFrame = s.CropSGBFrame
<<<<<<<
=======
s.ForceDeterminism = dlg.ForceDeterminism;
s.CropSGBFrame = dlg.CropSGBFrame;
ss.Profile = dlg.Profile;
>>>>>>>
s.CropSGBFrame = dlg.CropSGBFrame;
<<<<<<<
=======
private void SNESOptions_Load(object sender, EventArgs e)
{
rbAccuracy.Visible = label2.Visible = VersionInfo.DeveloperBuild;
}
private string Profile
{
get
{
if (rbCompatibility.Checked)
{
return "Compatibility";
}
if (rbPerformance.Checked)
{
return "Performance";
}
if (rbAccuracy.Checked)
{
return "Accuracy";
}
throw new InvalidOperationException();
}
set
{
rbCompatibility.Checked = value == "Compatibility";
rbPerformance.Checked = value == "Performance";
rbAccuracy.Checked = value == "Accuracy";
}
}
>>>>>>>
private void SNESOptions_Load(object sender, EventArgs e)
{
rbAccuracy.Visible = label2.Visible = VersionInfo.DeveloperBuild;
}
private string Profile
{
get
{
if (rbCompatibility.Checked)
{
return "Compatibility";
}
if (rbPerformance.Checked)
{
return "Performance";
}
if (rbAccuracy.Checked)
{
return "Accuracy";
}
throw new InvalidOperationException();
}
set
{
rbCompatibility.Checked = value == "Compatibility";
rbPerformance.Checked = value == "Performance";
rbAccuracy.Checked = value == "Accuracy";
}
}
<<<<<<<
=======
private bool ForceDeterminism
{
get { return cbForceDeterminism.Checked; }
set { cbForceDeterminism.Checked = value; }
}
private bool CropSGBFrame
{
get { return cbCropSGBFrame.Checked; }
set { cbCropSGBFrame.Checked = value; }
}
>>>>>>>
private bool CropSGBFrame
{
get { return cbCropSGBFrame.Checked; }
set { cbCropSGBFrame.Checked = value; }
} |
<<<<<<<
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(125, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
=======
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(38, 17);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(125, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
>>>>>>>
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(38, 17);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(125, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
<<<<<<<
private System.Windows.Forms.ToolStripMenuItem customToolToolStripMenuItem;
=======
private System.Windows.Forms.ToolStripMenuItem CodeDataLoggerMenuItem;
>>>>>>>
private System.Windows.Forms.ToolStripMenuItem customToolToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem CodeDataLoggerMenuItem; |
<<<<<<<
var length = 0;
var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc & 0xFFFFFF, out length);
=======
var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc, out int length);
>>>>>>>
var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc & 0xFFFFFF, out int length); |
<<<<<<<
using (Api.EnterExit())
=======
byte* buf = Api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.CARTRIDGE_RAM);
var size = Api.QUERY_get_memory_size(LibsnesApi.SNES_MEMORY.CARTRIDGE_RAM);
if (buf == null && Api.QUERY_get_memory_size(LibsnesApi.SNES_MEMORY.SGB_CARTRAM)>0)
>>>>>>>
using (Api.EnterExit())
{
byte* buf = Api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.CARTRIDGE_RAM);
var size = Api.QUERY_get_memory_size(LibsnesApi.SNES_MEMORY.CARTRIDGE_RAM);
if (buf == null && Api.QUERY_get_memory_size(LibsnesApi.SNES_MEMORY.SGB_CARTRAM) > 0)
{
buf = Api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.SGB_CARTRAM);
size = Api.QUERY_get_memory_size(LibsnesApi.SNES_MEMORY.SGB_CARTRAM);
}
if (buff == null)
{
return null;
}
var ret = new byte[size];
Marshal.Copy((IntPtr)buf, ret, 0, size);
return ret;
}
}
public void StoreSaveRam(byte[] data)
{
using (Api.EnterExit())
<<<<<<<
=======
if (buf==null)
{
return null;
}
var ret = new byte[size];
Marshal.Copy((IntPtr)buf, ret, 0, size);
return ret;
>>>>>>> |
<<<<<<<
using System;
using System.IO;
namespace BizHawk.Common
{
/// <summary>
/// Starts a thread which cleans any filenames in %temp% beginning with bizhawk.bizdelete.
/// Files shouldn't be named that unless they're safe to delete, but notably, they may stil be in use. That won't hurt this component.
/// When they're no longer in use, this component will then be able to delete them.
/// </summary>
public static class TempFileCleaner
{
//todo - manage paths other than %temp%, make not static, or allow adding multiple paths to static instance
public static string GetTempFilename(string friendlyname, string extension = null, bool delete = true)
{
string guidPart = Guid.NewGuid().ToString();
var fname = string.Format("biz-{0}-{1}-{2}{3}", System.Diagnostics.Process.GetCurrentProcess().Id, friendlyname, guidPart, extension ?? "");
if (delete) fname = RenameTempFilenameForDelete(fname);
return Path.Combine(Path.GetTempPath(), fname);
}
public static string RenameTempFilenameForDelete(string path)
{
string filename = Path.GetFileName(path);
string dir = Path.GetDirectoryName(path);
if (!filename.StartsWith("biz-")) throw new InvalidOperationException();
filename = "bizdelete-" + filename.Remove(0, 4);
return Path.Combine(dir, filename);
}
public static void Start()
{
lock (typeof(TempFileCleaner))
{
if (thread != null)
return;
thread = new System.Threading.Thread(ThreadProc);
thread.IsBackground = true;
thread.Priority = System.Threading.ThreadPriority.Lowest;
thread.Start();
}
}
static void ThreadProc()
{
var di = new DirectoryInfo(Path.GetTempPath());
for (; ; )
{
var fis = di.GetFiles("bizdelete-*");
foreach (var fi in fis)
{
try
{
fi.Delete();
}
catch
{
}
//try not to do more than one thing per frame
System.Threading.Thread.Sleep(100);
}
//try not to slam the filesystem too hard, we dont want this to cause any hiccups
System.Threading.Thread.Sleep(5000);
}
}
public static void Stop()
{
}
static System.Threading.Thread thread;
}
=======
using System;
using System.IO;
namespace BizHawk.Common
{
/// <summary>
/// Starts a thread which cleans any filenames in %temp% beginning with bizhawk.bizdelete.
/// Files shouldn't be named that unless they're safe to delete, but notably, they may stil be in use. That won't hurt this component.
/// When they're no longer in use, this component will then be able to delete them.
/// </summary>
public static class TempFileCleaner
{
//todo - manage paths other than %temp%, make not static, or allow adding multiple paths to static instance
public static string GetTempFilename(string friendlyname, string extension = null, bool delete = true)
{
string guidPart = Guid.NewGuid().ToString();
var fname = string.Format("biz-{0}-{1}-{2}{3}", System.Diagnostics.Process.GetCurrentProcess().Id, friendlyname, guidPart, extension ?? "");
if (delete) fname = RenameTempFilenameForDelete(fname);
return Path.Combine(Path.GetTempPath(), fname);
}
public static string RenameTempFilenameForDelete(string path)
{
string filename = Path.GetFileName(path);
string dir = Path.GetDirectoryName(path);
if (!filename.StartsWith("biz-")) throw new InvalidOperationException();
filename = "bizdelete-" + filename.Remove(0, 4);
return Path.Combine(dir, filename);
}
public static void Start()
{
lock (typeof(TempFileCleaner))
{
if (thread != null)
return;
thread = new System.Threading.Thread(ThreadProc);
thread.IsBackground = true;
thread.Priority = System.Threading.ThreadPriority.Lowest;
thread.Start();
}
}
static void ThreadProc()
{
var di = new DirectoryInfo(Path.GetTempPath());
for (; ; )
{
if (!System.Diagnostics.Debugger.IsAttached) //exceptions due to can't-delete are annoying. see this for another approach: http://www.codeproject.com/Articles/14402/Testing-File-Access-Rights-in-NET
{
var fis = di.GetFiles("bizdelete-*");
foreach (var fi in fis)
{
try
{
fi.Delete();
}
catch
{
}
//try not to do more than one thing per frame
System.Threading.Thread.Sleep(100);
}
}
//try not to slam the filesystem too hard, we dont want this to cause any hiccups
System.Threading.Thread.Sleep(5000);
}
}
public static void Stop()
{
}
static System.Threading.Thread thread;
}
>>>>>>>
using System;
using System.IO;
namespace BizHawk.Common
{
/// <summary>
/// Starts a thread which cleans any filenames in %temp% beginning with bizhawk.bizdelete.
/// Files shouldn't be named that unless they're safe to delete, but notably, they may stil be in use. That won't hurt this component.
/// When they're no longer in use, this component will then be able to delete them.
/// </summary>
public static class TempFileCleaner
{
//todo - manage paths other than %temp%, make not static, or allow adding multiple paths to static instance
public static string GetTempFilename(string friendlyname, string extension = null, bool delete = true)
{
string guidPart = Guid.NewGuid().ToString();
var fname = string.Format("biz-{0}-{1}-{2}{3}", System.Diagnostics.Process.GetCurrentProcess().Id, friendlyname, guidPart, extension ?? "");
if (delete) fname = RenameTempFilenameForDelete(fname);
return Path.Combine(Path.GetTempPath(), fname);
}
public static string RenameTempFilenameForDelete(string path)
{
string filename = Path.GetFileName(path);
string dir = Path.GetDirectoryName(path);
if (!filename.StartsWith("biz-")) throw new InvalidOperationException();
filename = "bizdelete-" + filename.Remove(0, 4);
return Path.Combine(dir, filename);
}
public static void Start()
{
lock (typeof(TempFileCleaner))
{
if (thread != null)
return;
thread = new System.Threading.Thread(ThreadProc);
thread.IsBackground = true;
thread.Priority = System.Threading.ThreadPriority.Lowest;
thread.Start();
}
}
static void ThreadProc()
{
var di = new DirectoryInfo(Path.GetTempPath());
for (; ; )
{
var fis = di.GetFiles("bizdelete-*");
foreach (var fi in fis)
{
try
{
fi.Delete();
}
catch
{
}
//try not to do more than one thing per frame
System.Threading.Thread.Sleep(100);
}
//try not to slam the filesystem too hard, we dont want this to cause any hiccups
System.Threading.Thread.Sleep(5000);
}
}
public static void Stop()
{
}
static System.Threading.Thread thread; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.