BuildManager.GetCachedBuildDependencySet 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 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存储在缓存中的对象,或者nullBuildDependencySet无法从缓存中检索对象。
另请参阅
适用于
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存储在缓存中的对象,或者nullBuildDependencySet无法从缓存中检索对象。
注解
ensureIsUpToDate如果参数值设置为true,则BuildManager.GetCachedBuildDependencySet方法重载的行为与方法重载类似BuildManager.GetCachedBuildDependencySet。 如果存在,两个重载将返回当前生成依赖项集,否则返回 null。
但是, BuildManager.GetCachedBuildDependencySet 方法重载包括用于返回任何可用生成依赖项集的选项,甚至返回过时的依赖项集。
ensureIsUpToDate如果参数值设置为false,该方法将返回任何可用的生成依赖项集。