Add Method
Adds a cache to the end of the CommerceCacheCollection.
Namespace: Microsoft.CommerceServer.Runtime.Caching
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub Add ( _
cacheName As String, _
cache As CommerceCache _
)
'Usage
Dim instance As CommerceCacheCollection
Dim cacheName As String
Dim cache As CommerceCache
instance.Add(cacheName, cache)
public void Add(
string cacheName,
CommerceCache cache
)
public:
void Add(
String^ cacheName,
CommerceCache^ cache
)
public function Add(
cacheName : String,
cache : CommerceCache
)
Parameters
- cacheName
Type: System..::.String
The CommerceCache to be added into the collection. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
- cache
Type: Microsoft.CommerceServer.Runtime.Caching..::.CommerceCache
The CommerceCache object. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Either cacheName or cache is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
Adds a member to the CommerceCacheCollection collection object. The paymentMethod object is added to the end of the CommerceCacheCollection. The Count of the collection is incremented.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.