|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
BuildProvider (Clase)
System.Web.Compilation.BuildProvider
System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider
System.Data.Entity.Design.AspNet.EntityModelBuildProvider
System.Data.Entity.Design.AspNet.MappingModelBuildProvider
System.Data.Entity.Design.AspNet.StorageModelBuildProvider
System.Data.Services.BuildProvider.DataServiceBuildProvider
System.ServiceModel.Activation.ServiceBuildProvider
System.Web.Compilation.WCFBuildProvider
System.Xaml.Hosting.XamlBuildProvider
Espacio de nombres: System.Web.Compilation
Ensamblado: System.Web (en System.Web.dll)
El tipo BuildProvider expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | CodeCompilerType | |
![]() | ReferencedAssemblies | |
![]() | VirtualPath | |
![]() | VirtualPathDependencies |
| Nombre | Descripción | |
|---|---|---|
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | GenerateCode | |
![]() | GetCodeCompileUnit | |
![]() | GetCustomString | Infraestructura. |
![]() | GetDefaultCompilerType | |
![]() | GetDefaultCompilerTypeForLanguage | |
![]() | GetGeneratedType | |
![]() | GetHashCode | |
![]() | GetResultFlags | |
![]() | GetType | |
![]() | MemberwiseClone | |
![]() | OpenReader() | |
![]() | OpenReader(String) | |
![]() | OpenStream() | |
![]() | OpenStream(String) | |
![]() | ProcessCompileErrors | |
![]() ![]() | RegisterBuildProvider | |
![]() | ToString |
Nota |
|---|
| Topic | Location |
|---|---|
| Cómo: Proteger una aplicación ASP.NET en un servidor compartido | Generar aplicaciones Web ASP .NET |
| Cómo: Proteger una aplicación ASP.NET en un servidor compartido | Generar aplicaciones Web ASP .NET en Visual Studio |
using System; using System.Collections; using System.IO; using System.Text; using System.Web; using System.Web.Compilation; using System.CodeDom.Compiler; using System.CodeDom; using System.Security; using System.Security.Permissions; // Define a simple build provider implementation. [PermissionSet(SecurityAction.Demand, Unrestricted = true)] public class SampleBuildProvider : BuildProvider { // Define an internal member for the compiler type. protected CompilerType _compilerType = null; public SampleBuildProvider() { _compilerType = GetDefaultCompilerTypeForLanguage("C#"); } // Return the internal CompilerType member // defined in this implementation. public override CompilerType CodeCompilerType { get { return _compilerType; } } // Define the build provider implementation of the GenerateCode method. public override void GenerateCode(AssemblyBuilder assemBuilder) { // Generate a code compile unit, and add it to // the assembly builder. TextWriter tw = assemBuilder.CreateCodeFile(this); if (tw != null) { try { // Generate the code compile unit from the virtual path. CodeCompileUnit compileUnit = SampleClassGenerator.BuildCompileUnitFromPath(VirtualPath); // Generate the source for the code compile unit, // and write it to a file specified by the assembly builder. CodeDomProvider provider = assemBuilder.CodeDomProvider; provider.GenerateCodeFromCompileUnit(compileUnit, tw, null); } finally { tw.Close(); } } } public override System.Type GetGeneratedType(CompilerResults results) { string typeName = SampleClassGenerator.TypeName; return results.CompiledAssembly.GetType(typeName); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
