BuildManager.GetObjectFactory(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an object factory for the specified virtual path.
public:
static System::Web::Util::IWebObjectFactory ^ GetObjectFactory(System::String ^ virtualPath, bool throwIfNotFound);
public static System.Web.Util.IWebObjectFactory GetObjectFactory (string virtualPath, bool throwIfNotFound);
static member GetObjectFactory : string * bool -> System.Web.Util.IWebObjectFactory
Public Shared Function GetObjectFactory (virtualPath As String, throwIfNotFound As Boolean) As IWebObjectFactory
Parameters
- virtualPath
- String
The virtual path.
- throwIfNotFound
- Boolean
true
to throw an error if the virtual path does not exist; otherwise, false
. If the virtual path does not exist and throwIfNotFound
is false
, this method returns null
.
Returns
The object factory.
Exceptions
The virtual path does not exist.
-or-
A higher-level exception already existed when this method was called.
-or-
This method was called while the compilation process was building top-level files.
-or-
This is a precompiled application and the virtual path was not found in the cache.
-or-
A circular reference was detected.
Remarks
This method returns an object that enables you to generate a type by compiling the virtual path. It returns an object regardless of whether the Web site is precompiled.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기