AggregateCacheDependency コンストラクタ
アセンブリ: System.Web (system.web.dll 内)



引数を受け取らないコンストラクタを使用して、AggregateCacheDependency クラスのインスタンスを作成するコード例を次に示します。2 つの CacheDependency オブジェクトが作成され、CacheDependency 配列 (myDepArray) に追加されます。このコンストラクタを Add メソッドと組み合わせて使用し、Cache に格納されている項目を両方の CacheDependency オブジェクトに依存させます。
' Create two CacheDependency objects, one to a ' text file and the other to an XML file. ' Create a CacheDependency array with these ' two objects as items in the array. txtDep = New CacheDependency(Server.MapPath("Storage.txt")) xmlDep = New CacheDependency(Server.MapPath("authors.xml")) Dim DepArray() As CacheDependency = {txtDep, xmlDep} ' Create an AggregateCacheDependency object and ' use the Add method to add the array to it. aggDep = New AggregateCacheDependency() aggDep.Add(DepArray) ' Call the GetUniqueId method to generate ' an ID for each dependency in the array. msg1.Text = aggDep.GetUniqueId() ' Add the new data set to the cache with ' dependencies on both files in the array. Cache.Insert("XMLDataSet", Source, aggDep)

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- AggregateCacheDependency コンストラクタのページへのリンク