語言

BuildManager.GetCachedBuildDependencySet 方法

定義

會從 ASP.NET 快取回傳建置相依性集。

多載

名稱 Description
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 儲存在快取中的物件,或 null 是 BuildDependencySet 無法從快取中擷取該物件的物件。

另請參閱

適用於

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 儲存在快取中的物件,或 null 是 BuildDependencySet 無法從快取中擷取該物件的物件。

備註

若參數 ensureIsUpToDate 值設為 true, BuildManager.GetCachedBuildDependencySet 方法過載的行為與方法過載相同 BuildManager.GetCachedBuildDependencySet 。 兩個過載如果存在一個,則會回傳一個目前建置的依賴集合,否則會回傳 null。

然而, BuildManager.GetCachedBuildDependencySet 方法過載包含回傳任何可用的建置依賴集合的選項,即使是過時的。 若參數 ensureIsUpToDate 值設為 false,該方法將回傳任何可用的建置依賴集合。

適用於