1 using Microsoft.Win32.SafeHandles;
13 [PermissionSet(
SecurityAction.InheritanceDemand, Name =
"FullTrust")]
17 private string coreAssemblyFileName =
string.Empty;
27 private string outputName;
29 private string mainClass;
31 private bool generateInMemory;
33 private bool includeDebugInformation;
35 private int warningLevel = -1;
37 private string compilerOptions;
39 private string win32Resource;
41 private bool treatWarningsAsErrors;
43 private bool generateExecutable;
48 private SafeUserTokenHandle userToken;
58 return coreAssemblyFileName;
62 coreAssemblyFileName = value;
73 return generateExecutable;
77 generateExecutable = value;
88 return generateInMemory;
92 generateInMemory = value;
134 if (tempFiles ==
null)
153 return includeDebugInformation;
157 includeDebugInformation = value;
168 return treatWarningsAsErrors;
172 treatWarningsAsErrors = value;
186 warningLevel = value;
196 return compilerOptions;
200 compilerOptions = value;
210 return win32Resource;
214 win32Resource = value;
225 return embeddedResources;
236 return linkedResources;
246 if (userToken !=
null)
248 return userToken.DangerousGetHandle();
254 if (userToken !=
null)
258 userToken =
new SafeUserTokenHandle(value, ownsHandle:
false);
262 internal SafeUserTokenHandle SafeUserToken => userToken;
266 [Obsolete(
"CAS policy is obsolete and will be removed in a future release of the .NET Framework. Please see http://go2.microsoft.com/fwlink/?LinkId=131738 for more information.")]
272 if (evidence !=
null)
274 result = evidence.
Clone();
283 evidence = value.Clone();
301 : this(assemblyNames, null, includeDebugInformation: false)
309 : this(assemblyNames, outputName, includeDebugInformation: false)
320 if (assemblyNames !=
null)
324 this.outputName = outputName;
325 this.includeDebugInformation = includeDebugInformation;
Describes a set of security permissions applied to code. This class cannot be inherited.
TempFileCollection TempFiles
Gets or sets the collection that contains the temporary files.
bool IncludeDebugInformation
Gets or sets a value indicating whether to include debug information in the compiled executable.
StringCollection ReferencedAssemblies
Gets the assemblies referenced by the current project.
CompilerParameters()
Initializes a new instance of the T:System.CodeDom.Compiler.CompilerParameters class.
StringCollection EmbeddedResources
Gets the .NET Framework resource files to include when compiling the assembly output.
bool GenerateExecutable
Gets or sets a value indicating whether to generate an executable.
StringCollection LinkedResources
Gets the .NET Framework resource files that are referenced in the current source.
Evidence Clone()
Returns a duplicate copy of this evidence object.
string Win32Resource
Gets or sets the file name of a Win32 resource file to link into the compiled assembly.
Represents the parameters used to invoke a compiler.
CompilerParameters(string[] assemblyNames)
Initializes a new instance of the T:System.CodeDom.Compiler.CompilerParameters class using the specif...
string CoreAssemblyFileName
Gets or sets the name of the core or standard assembly that contains basic types such as T:System....
Represents a collection of strings.
string CompilerOptions
Gets or sets optional command-line arguments to use when invoking the compiler.
SecurityAction
Specifies the security actions that can be performed using declarative security.
void AddRange(string[] value)
Copies the elements of a string array to the end of the T:System.Collections.Specialized....
string OutputAssembly
Gets or sets the name of the output assembly.
A platform-specific type that is used to represent a pointer or a handle.
string MainClass
Gets or sets the name of the main class.
Ability to provide evidence, including the ability to alter the evidence provided by the common langu...
int WarningLevel
Gets or sets the warning level at which the compiler aborts compilation.
bool TreatWarningsAsErrors
Gets or sets a value indicating whether to treat warnings as errors.
bool GenerateInMemory
Gets or sets a value indicating whether to generate the output in memory.
Defines the set of information that constitutes input to security policy decisions....
CompilerParameters(string[] assemblyNames, string outputName)
Initializes a new instance of the T:System.CodeDom.Compiler.CompilerParameters class using the specif...
static readonly IntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
Specifies that the class can be serialized.
CompilerParameters(string[] assemblyNames, string outputName, bool includeDebugInformation)
Initializes a new instance of the T:System.CodeDom.Compiler.CompilerParameters class using the specif...
IntPtr UserToken
Gets or sets the user token to use when creating the compiler process.
Represents a collection of temporary files.