Class ExtensionMethods

Class that implements a number of extension methods for various object types

Inheritance
System.Object
ExtensionMethods
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.Business.Commerce.Extensions
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
[Obsolete("Methods has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static class ExtensionMethods

Methods

FormatContentText(String)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static string FormatContentText(this string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
System.String

FormatTimeSince(DateTime)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static string FormatTimeSince(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime
Returns
Type Description
System.String

GetAllCommerceLanguages(SiteContext)

Declaration
[Obsolete("Use the service 'EPiServer.DataAbstraction.ILanguageBranchRepository' instead. Will remain at least until November 2016.")]
public static IEnumerable<string> GetAllCommerceLanguages(this SiteContext siteContext)
Parameters
Type Name Description
SiteContext siteContext
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetProductLink(Entry, String)

Declaration
[Obsolete("This method has been moved to the namespace 'Mediachase.Commerce.Catalog.Objects'. Will remain at least until November 2016.")]
public static string GetProductLink(this Entry entry, string language)
Parameters
Type Name Description
Entry entry
System.String language
Returns
Type Description
System.String

GetUserGuid(IPrincipal)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static Guid GetUserGuid(this IPrincipal principal)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal
Returns
Type Description
System.Guid

IsAvailable(CatalogDto.CatalogRow)

Declaration
[Obsolete("This method has been moved to the namespace 'Mediachase.Commerce.Catalog.Dto'. Will remain at least until November 2016.")]
public static bool IsAvailable(this CatalogDto.CatalogRow catalogRow)
Parameters
Type Name Description
CatalogDto.CatalogRow catalogRow
Returns
Type Description
System.Boolean

IsAvailable(CatalogNodeDto.CatalogNodeRow)

Declaration
[Obsolete("This method has been moved to the namespace 'Mediachase.Commerce.Catalog.Dto'. Will remain at least until November 2016.")]
public static bool IsAvailable(this CatalogNodeDto.CatalogNodeRow catalogNodeRow)
Parameters
Type Name Description
CatalogNodeDto.CatalogNodeRow catalogNodeRow
Returns
Type Description
System.Boolean

IsAvailable(CatalogNode)

Declaration
[Obsolete("This method has been moved to the namespace 'Mediachase.Commerce.Catalog.Objects'. Will remain at least until November 2016.")]
public static bool IsAvailable(this CatalogNode catalogNode)
Parameters
Type Name Description
CatalogNode catalogNode
Returns
Type Description
System.Boolean

IsAvailable(Entry)

Declaration
[Obsolete("This method has been moved to the namespace 'Mediachase.Commerce.Catalog.Objects'. Will remain at least until November 2016.")]
public static bool IsAvailable(this Entry catalogEntry)
Parameters
Type Name Description
Entry catalogEntry
Returns
Type Description
System.Boolean

JavascriptEncode(String)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static string JavascriptEncode(this string source)
Parameters
Type Name Description
System.String source
Returns
Type Description
System.String

RegisterClientScriptFile(Page, String, String)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static void RegisterClientScriptFile(this Page page, string key, string rootRelativePath)
Parameters
Type Name Description
System.Web.UI.Page page
System.String key
System.String rootRelativePath

RegisterStyleSheetFile(Page, String, String)

Declaration
[Obsolete("This method has been moved to the namespace 'EPiServer.Commerce.Extensions'. Will remain at least until November 2016.")]
public static void RegisterStyleSheetFile(this Page page, string key, string rootRelativePath)
Parameters
Type Name Description
System.Web.UI.Page page
System.String key
System.String rootRelativePath

Validate(CartHelper)

Declaration
[Obsolete("This method has been moved to the namespace Mediachase.Commerce.Website.Helpers'. Will remain at least until November 2016.")]
public static void Validate(this CartHelper cart)
Parameters
Type Name Description
CartHelper cart