AggregateCacheDependency.GetUniqueID メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As AggregateCacheDependency Dim returnValue As String returnValue = instance.GetUniqueID
AggregateCacheDependency オブジェクトの一意の識別子。関連付けられている依存関係オブジェクトのいずれかに一意の識別子がない場合、GetUniqueId メソッドは null 参照 (Visual Basic では Nothing) を返します。

このメソッドは配列内の各依存関係に一意の識別子を割り当て、割り当てた各識別子を返します。識別子は、ファイル名 (ファイルに依存する場合) またはキー名 (キャッシュ キーに依存する場合) のいずれかと、このメソッドが依存関係に割り当てる文字列の組み合わせです。

GetUniqueID メソッドを使用して、AggregateCacheDependency クラス (aggDep) のインスタンスの識別子を作成し、設定された識別子を表示するコード例を次に示します。
' 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からAggregateCacheDependency.GetUniqueID メソッドを検索する場合は、下記のリンクをクリックしてください。

- AggregateCacheDependency.GetUniqueID メソッドのページへのリンク