本文整理汇总了C#中PatchInjection类的典型用法代码示例。如果您正苦于以下问题:C# PatchInjection类的具体用法?C# PatchInjection怎么用?C# PatchInjection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PatchInjection类属于命名空间,在下文中一共展示了PatchInjection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Patch
/// <summary>
/// Patch
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.ContactPropertyValue source, dataModel.ContactPropertyValue target)
{
var patchInjectionPolicy = new PatchInjection<dataModel.ContactPropertyValue>(x => x.BooleanValue, x => x.DateTimeValue,
x => x.DecimalValue, x => x.IntegerValue,
x => x.ShortTextValue, x => x.LongTextValue, x => x.ValueType);
target.InjectFrom(patchInjectionPolicy, source);
}
示例2: Patch
/// <summary>
/// Patch CatalogBase type
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this ShipmentEntity source, ShipmentEntity target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<ShipmentEntity>(x => x.ShippingPrice, x => x.TaxTotal,
x => x.TaxIncluded, x => x.Currency,
x => x.WeightUnit, x => x.WeightValue,
x => x.DimensionHeight, x => x.DimensionLength, x => x.DimensionUnit,
x => x.DimensionWidth, x => x.TaxType);
target.InjectFrom(patchInjection, source);
if (!source.Addresses.IsNullCollection())
{
source.Addresses.Patch(target.Addresses, new AddressComparer(), (sourceAddress, targetAddress) => sourceAddress.Patch(targetAddress));
}
if (source.Items != null)
{
source.Items.Patch(target.Items, (sourceItem, targetItem) => sourceItem.Patch(targetItem));
}
if (!source.TaxDetails.IsNullCollection())
{
var taxDetailComparer = AnonymousComparer.Create((TaxDetailEntity x) => x.Name);
source.TaxDetails.Patch(target.TaxDetails, taxDetailComparer, (sourceTaxDetail, targetTaxDetail) => sourceTaxDetail.Patch(targetTaxDetail));
}
}
示例3: Patch
public static void Patch(this dataModel.PermissionEntity source, dataModel.PermissionEntity target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.PermissionEntity>(x => x.Name, x => x.Description);
target.InjectFrom(patchInjection, source);
}
示例4: Patch
public static void Patch(this NotificationTemplateEntity source, NotificationTemplateEntity target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<NotificationTemplateEntity>(x => x.Subject, x => x.Body, x => x.IsDefault);
target.InjectFrom(patchInjection, source);
}
示例5: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.Price source, dataModel.Price target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.Price>(x => x.ProductId, x => x.List,
x => x.MinQuantity, x => x.Sale);
target.InjectFrom(patchInjection, source);
}
示例6: Patch
public static void Patch(this OperationLogEntity source, OperationLogEntity target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<OperationLogEntity>(x => x.ModifiedBy, x => x.ModifiedDate, x=>x.Detail);
target.InjectFrom(patchInjection, source);
}
示例7: Patch
/// <summary>
/// Patch CatalogLanguage type
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.PropertyAttribute source, dataModel.PropertyAttribute target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjectionPolicy = new PatchInjection<dataModel.PropertyAttribute>(x => x.PropertyAttributeName, x => x.PropertyAttributeValue);
target.InjectFrom(patchInjectionPolicy, source);
}
示例8: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.ApiAccountEntity source, dataModel.ApiAccountEntity target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.ApiAccountEntity>(x => x.Name, x => x.ApiAccountType, x => x.IsActive, x => x.SecretKey, x => x.AppId);
target.InjectFrom(patchInjection, source);
}
示例9: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.SeoUrlKeyword source, dataModel.SeoUrlKeyword target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.SeoUrlKeyword>(x => x.ImageAltDescription, x => x.IsActive,
x => x.Keyword, x => x.Language,
x => x.MetaDescription, x => x.MetaKeywords, x => x.Title);
target.InjectFrom(patchInjection, source);
}
示例10: Patch
/// <summary>
/// Patch CatalogLanguage type
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.CatalogLanguage source, dataModel.CatalogLanguage target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjectionPolicy = new PatchInjection<dataModel.CatalogLanguage>(x => x.Language);
target.InjectFrom(patchInjectionPolicy, source);
}
示例11: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.DynamicContentFolder source, dataModel.DynamicContentFolder target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.DynamicContentFolder>(x => x.Name, x => x.Description, x => x.ImageUrl);
target.InjectFrom(patchInjection, source);
}
示例12: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.ItemAsset source, dataModel.ItemAsset target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjectionPolicy = new PatchInjection<dataModel.ItemAsset>(x => x.AssetType, x=> x.SortOrder );
target.InjectFrom(patchInjectionPolicy, source);
}
示例13: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.Currency source, dataModel.Currency target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjection = new PatchInjection<dataModel.Currency>(x => x.Name,
x => x.Symbol, x => x.ExchangeRate, x => x.IsPrimary,
x => x.CustomFormatting);
target.InjectFrom(patchInjection, source);
}
示例14: Patch
/// <summary>
/// Patch changes
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void Patch(this dataModel.StoreShippingMethod source, dataModel.StoreShippingMethod target)
{
if (target == null)
throw new ArgumentNullException("target");
var patchInjectionPolicy = new PatchInjection<dataModel.StoreShippingMethod>(x => x.LogoUrl, x => x.Name,
x => x.Description, x => x.Priority,
x => x.IsActive);
target.InjectFrom(patchInjectionPolicy, source);
}
示例15: Patch
public override void Patch(MemberDataEntity target)
{
var patchInjection = new PatchInjection<OrganizationDataEntity>(x => x.Name, x => x.Description,
x => x.OwnerId, x => x.OrgType,
x => x.BusinessCategory);
target.InjectFrom(patchInjection, this);
base.Patch(target);
}