Class ILineItemExtensions

Extensions method for ILineItem

Inheritance
System.Object
ILineItemExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Order.Internal
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public static class ILineItemExtensions

Methods

TryGetDiscountValue(ILineItem, Expression<Func<ILineItemDiscountAmount, Decimal>>)

Access to the line item discount amount writable properties.

Declaration
public static decimal TryGetDiscountValue(this ILineItem lineItem, Expression<Func<ILineItemDiscountAmount, decimal>> property)
Parameters
Type Name Description
ILineItem lineItem

The line item to be casted

System.Linq.Expressions.Expression<System.Func<ILineItemDiscountAmount, System.Decimal>> property

The property to get the value from.

Returns
Type Description
System.Decimal

The value from property.

TrySetDiscountValue(ILineItem, Expression<Func<ILineItemDiscountAmount, Decimal>>, Decimal)

Updates the line item discount with the following action.

Declaration
public static void TrySetDiscountValue(this ILineItem lineItem, Expression<Func<ILineItemDiscountAmount, decimal>> property, decimal value)
Parameters
Type Name Description
ILineItem lineItem

The line item.

System.Linq.Expressions.Expression<System.Func<ILineItemDiscountAmount, System.Decimal>> property

The property to set.

System.Decimal value

The value to set.