Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can use the IWMSCacheItem object to retrieve information about cached content.
The IWMSCacheItem object exposes the following properties.
Property |
Description |
|---|---|
ContentSize |
Retrieves the size of the content in bytes. |
OriginUrl |
Retrieves the relative URL for the cached content. |
Example
The following example illustrates how to retrieve an IWMSCacheItem object.
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSCacheItem CacheItem;
IWMSCacheItems CacheItems;
IWMSCacheProxyPlugin CacheProxyPlugin;
IWMSPlugins Plugins;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlugins object
// containing cache proxy plug-ins.
Plugins = Server.CacheProxy;
// Retrieve the IWMSCacheProxyPlugin object.
CacheProxyPlugin = (IWMSCacheProxyPlugin)Plugins[0];
// Retrieve the IWMSCacheItems object.
CacheItems = CacheProxyPlugin.CacheItems;
// Retrieve information on each cache item.
for (int i = 0; i < CacheItems.Count; i++)
{
CacheItem = CacheItems[i];
}
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}