CacheDependency.NotifyDependencyChanged メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CacheDependency.NotifyDependencyChanged メソッドの意味・解説 

CacheDependency.NotifyDependencyChanged メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

派生クラス CacheDependency によって表される依存関係変更されたことを、基本オブジェクトCacheDependency通知します

名前空間: System.Web.Caching
アセンブリ: System.Web (system.web.dll 内)
構文構文

Protected Sub NotifyDependencyChanged ( _
    sender As Object, _
    e As EventArgs _
)
Dim sender As Object
Dim e As EventArgs

Me.NotifyDependencyChanged(sender, e)
protected void NotifyDependencyChanged (
    Object sender,
    EventArgs e
)
protected:
void NotifyDependencyChanged (
    Object^ sender, 
    EventArgs^ e
)
protected void NotifyDependencyChanged (
    Object sender, 
    EventArgs e
)
protected function NotifyDependencyChanged
 (
    sender : Object, 
    e : EventArgs
)

パラメータ

sender

イベントソース

e

イベント データ格納している System.EventArgs オブジェクト

解説解説
使用例使用例

CacheDependency クラスから継承されるクラスコード例次に示します。SetUtcLastModified メソッド使用して依存関係変更され時刻変更するパブリック メソッド ResetDependency作成してから、NotifyDependencyChanged メソッド呼び出します。

' 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CacheDependency クラス
CacheDependency メンバ
System.Web.Caching 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

CacheDependency.NotifyDependencyChanged メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CacheDependency.NotifyDependencyChanged メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS