Method | Description | |
---|---|---|
GetAssemblyPath ( Version version ) : string |
Gets full path to a folder that contains ASP.NET WebPages assemblies for a given version. Used by WebMatrix and Visual Studio so they know what to copy to an app's Bin folder or deploy to a hoster.
|
|
GetExplicitWebPagesVersion ( string path ) : Version | ||
GetVersionWithoutEnabledCheck ( string path ) : Version | In a non-hosted scenario, this method would only look at a web.config that is present at the current path. Any config settings at an ancestor directory would not be considered. If we are unable to determine a version, we would assume that this is a v1 app. | |
IsEnabled ( string path ) : bool |
Determines if Asp.Net Web Pages is enabled. Web Pages is enabled if there's a webPages:Enabled key in AppSettings is set to "true" or if there's a cshtml file in the current path and the key is not present. In a non-hosted scenario, this method would only look at a web.config that is present at the current path. Any config settings at an ancestor directory would not be considered. |
|
IsExplicitlyDisabled ( string path ) : bool | In a non-hosted scenario, this method would only look at a web.config that is present at the current path. Any config settings at an ancestor directory would not be considered. |
Method | Description | |
---|---|---|
AppRootContainsWebPagesFile ( IFileSystem fileSystem, string path ) : bool | ||
ForceRecompile ( IFileSystem fileSystem, string binDirectory ) : void | ||
GetAppSettings ( string path ) : |
||
GetBinDirectory ( string path ) : string |
HttpRuntime.BinDirectory is unavailable in design time and throws if we try to access it. To workaround this, if we aren't hosted, we will assume that the path that was passed to us is the application root.
|
|
GetCachedFileName ( ) : string |
Name of the the temporary file used by BuildManager.CreateCachedFile / BuildManager.ReadCachedFile where we cache WebPages's version number.
|
|
GetEnabled ( |
Returns the value for webPages:Enabled AppSetting value in web.config.
|
|
GetIncompatibleDependencies ( string appPath ) : Version>.IDictionary |
||
GetMaxVersion ( ) : Version | ||
GetObsoleteVersionInternal ( string path, |
This is meant to test an obsolete method. Don't use this! | |
GetPreviousRuntimeVersion ( IBuildManager buildManagerFileSystem ) : Version | ||
GetVersion ( string path ) : Version | ||
GetVersionFromConfig ( |
||
GetVersionInternal ( |
Returns the version of WebPages to be used for a specified path. This method would always returns a value regardless of web pages is explicitly disabled (via config) or implicitly disabled (by virtue of not having a cshtml file) at the specified path. |
|
GetVersionWithoutEnabledCheckInternal ( string path, Version defaultVersion ) : Version | ||
GetWebPagesAssemblies ( ) : IEnumerable |
||
IsEnabled ( IFileSystem fileSystem, string path, |
||
IsExplicitlyDisabled ( |
||
IsWebPagesFile ( string file ) : bool | ||
PersistRuntimeVersion ( IBuildManager buildManager, Version version ) : void | ||
RemoveTrailingSlash ( string path ) : string |
public static GetAssemblyPath ( Version version ) : string | ||
version | Version | |
return | string |
public static GetExplicitWebPagesVersion ( string path ) : Version | ||
path | string | |
return | Version |
public static GetVersionWithoutEnabledCheck ( string path ) : Version | ||
path | string | Physical or virtual path to a directory where we need to determine the version of WebPages to be used. |
return | Version |
public static IsEnabled ( string path ) : bool | ||
path | string | The path at which to determine if web pages is enabled. |
return | bool |
public static IsExplicitlyDisabled ( string path ) : bool | ||
path | string | |
return | bool |