Share via


BuildManager.GetCachedBuildDependencySet 方法

定義

從 ASP.NET 快取傳回組建相依性集合。

多載

GetCachedBuildDependencySet(HttpContext, String)

傳回虛擬路徑的組建相依性集合 (如果此路徑位於 ASP.NET 快取區)。

GetCachedBuildDependencySet(HttpContext, String, Boolean)

如果此路徑位於 ASP.NET 快取,則傳回虛擬路徑的組建相依性集合,即使不是最新的內容也要傳回。

GetCachedBuildDependencySet(HttpContext, String)

傳回虛擬路徑的組建相依性集合 (如果此路徑位於 ASP.NET 快取區)。

public:
 static System::Web::Compilation::BuildDependencySet ^ GetCachedBuildDependencySet(System::Web::HttpContext ^ context, System::String ^ virtualPath);
public static System.Web.Compilation.BuildDependencySet GetCachedBuildDependencySet (System.Web.HttpContext context, string virtualPath);
static member GetCachedBuildDependencySet : System.Web.HttpContext * string -> System.Web.Compilation.BuildDependencySet
Public Shared Function GetCachedBuildDependencySet (context As HttpContext, virtualPath As String) As BuildDependencySet

參數

context
HttpContext

要求的內容。

virtualPath
String

用來判斷組建相依性集合的虛擬路徑。

傳回

存放在快取中的 BuildDependencySet 物件,如果無法從快取擷取 BuildDependencySet 物件,則為 null

另請參閱

適用於

GetCachedBuildDependencySet(HttpContext, String, Boolean)

如果此路徑位於 ASP.NET 快取,則傳回虛擬路徑的組建相依性集合,即使不是最新的內容也要傳回。

public:
 static System::Web::Compilation::BuildDependencySet ^ GetCachedBuildDependencySet(System::Web::HttpContext ^ context, System::String ^ virtualPath, bool ensureIsUpToDate);
public static System.Web.Compilation.BuildDependencySet GetCachedBuildDependencySet (System.Web.HttpContext context, string virtualPath, bool ensureIsUpToDate);
static member GetCachedBuildDependencySet : System.Web.HttpContext * string * bool -> System.Web.Compilation.BuildDependencySet
Public Shared Function GetCachedBuildDependencySet (context As HttpContext, virtualPath As String, ensureIsUpToDate As Boolean) As BuildDependencySet

參數

context
HttpContext

要求的內容。

virtualPath
String

用來判斷組建相依性集合的虛擬路徑。

ensureIsUpToDate
Boolean

true 表示指定只有目前的組建相依性集合需要傳回,否則為 false,表示即使不是最新的內容,任何可用的組建相依性集合都要傳回。 預設為 true

傳回

存放在快取中的 BuildDependencySet 物件,如果無法從快取擷取 BuildDependencySet 物件,則為 null

備註

ensureIsUpToDate如果參數值設定為 true ,方法 BuildManager.GetCachedBuildDependencySet 多載的行為就像方法多載一樣 BuildManager.GetCachedBuildDependencySet 。 如果存在,這兩個多載都會傳回目前的組建相依性集合,否則會傳回 null

不過, BuildManager.GetCachedBuildDependencySet 方法多載包含可傳回任何可用組建相依性集合的選項,甚至是過期的相依性集合。 ensureIsUpToDate如果參數值設定為 false ,方法會傳回任何可用的組建相依性集合。

適用於