Dynamicweb 8 Documentation
DefaultPriceProvider Class
Members  Example 

Represents a default price provider.
Syntax
'Declaration
 
Public Class DefaultPriceProvider 
   Inherits PriceProvider
public class DefaultPriceProvider : PriceProvider 
Example
class MyPage : System.Web.UI.Page
{
    private void CheckProviderTypesInCache()
    {
        // Check if a cache item for PriceResolverTypes is already created
        if (((HttpContext.Current.Cache["PriceProviderTypes"] == null)))
        {
            // Create a new arraylist
            ArrayList PriceProviderTypes = new ArrayList();

            // and fill it with ResolverTypes Types
            foreach (Type t in AddInManager.GetAddInClasses(typeof(Dynamicweb.eCommerce.Prices.PriceProvider)))
            {
                if ((!object.ReferenceEquals(t, typeof(Dynamicweb.eCommerce.Prices.DefaultPriceProvider))))
                {
                    PriceProviderTypes.Add(t);
                }
            }

            PriceProviderTypes.Add(typeof(Dynamicweb.eCommerce.Prices.DefaultPriceProvider));

            // Create a new cache item with for 5 min. expiration.
            // TODO: Change to inherited cache dependency object when switching to .net 2,0. Use Appdomain.OnLoad to flush the dependency.
            HttpContext.Current.Cache.Add("PriceProviderTypes", PriceProviderTypes, null, DateTime.Now.AddSeconds(300), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.High, null);
        }
    }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Prices.PriceProvider
      Dynamicweb.eCommerce.Prices.DefaultPriceProvider

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DefaultPriceProvider Members
Dynamicweb.eCommerce.Prices Namespace

Send Feedback