当前位置: 首页>>代码示例>>C#>>正文


C# PatchInjection类代码示例

本文整理汇总了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);
 }
开发者ID:alt-soft,项目名称:vc-community,代码行数:12,代码来源:PropertyConverter.cs

示例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));
			}

		}
开发者ID:nisarzahid,项目名称:vc-community,代码行数:34,代码来源:ShipmentConverter.cs

示例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);
        }
开发者ID:adwardliu,项目名称:vc-community,代码行数:8,代码来源:PermissionConverter.cs

示例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);
		}
开发者ID:rajendra1809,项目名称:VirtoCommerce,代码行数:8,代码来源:NotificationConverter.cs

示例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);
 }
开发者ID:afandylamusu,项目名称:vc-community,代码行数:13,代码来源:PriceConverter.cs

示例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);
		}
开发者ID:adwardliu,项目名称:vc-community,代码行数:8,代码来源:ChangeLogConverter.cs

示例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);
		}
开发者ID:adwardliu,项目名称:vc-community,代码行数:13,代码来源:PropertyAttributeConverter.cs

示例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);
        }
开发者ID:adwardliu,项目名称:vc-community,代码行数:13,代码来源:ApiAccountConverter.cs

示例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);
		}
开发者ID:rajendra1809,项目名称:VirtoCommerce,代码行数:14,代码来源:SeoUrlKeywordConverter.cs

示例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);

		}
开发者ID:adwardliu,项目名称:vc-community,代码行数:14,代码来源:CatalogLanguageConverter.cs

示例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);
		}
开发者ID:adwardliu,项目名称:vc-community,代码行数:14,代码来源:ContentFolderConverter.cs

示例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);

		}
开发者ID:alt-soft,项目名称:vc-community,代码行数:14,代码来源:AssetConverter.cs

示例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);
 }
开发者ID:sameerkattel,项目名称:vc-community,代码行数:14,代码来源:CurrencyConverter.cs

示例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);
		}
开发者ID:alt-soft,项目名称:vc-community,代码行数:14,代码来源:SoreShippingMethodConverter.cs

示例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);
        }
开发者ID:sameerkattel,项目名称:vc-community,代码行数:9,代码来源:OrganizationDataEntity.cs


注:本文中的PatchInjection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。