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



CacheDependency クラスから継承され、DependencyDispose メソッドをオーバーライドするクラスのコード例を次に示します。このメソッドは、呼び出されると、Disposed という名前のブール値のカスタム プロパティを true に設定します。
' Declare the class. Public Class CustomCacheDependency Inherits CacheDependency ' Constructor with no arguments ' provided by CacheDependency class. Public Sub New() End Sub ' New ' Declare a Boolean field named disposedValue. ' This will be used by Disposed property. Private disposedValue As Boolean ' Create accessors for the Disposed property. Public Property Disposed As Boolean Get Return disposedValue End Get Set (ByVal value As Boolean) disposedValue = value End Set End Property ' Create a public method that sets the latest ' changed time of the CustomCacheDependency ' and notifies the underlying CacheDependency that the ' dependency has changed, even though the HasChanged ' property is false. Public Sub ResetDependency() If Me.HasChanged = False SetUtcLastModified(DateTime.MinValue) NotifyDependencyChanged(Me, EventArgs.Empty) End If End Sub ' Overrides the DependencyDispose method to set the ' Disposed proerty to true. This method automatically ' notifies the underlying CacheDependency object to ' release any resources associated with this class. Protected Overrides Sub DependencyDispose() Disposed = True End Sub End Class

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に収録されているすべての辞書からCacheDependency.DependencyDispose メソッドを検索する場合は、下記のリンクをクリックしてください。

- CacheDependency.DependencyDispose メソッドのページへのリンク