Imported Upstream version 4.2.0.179

Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent 183bba2c9a
commit 6992685b86
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -1 +1 @@
19abc66bacf9bd88ce26809cf2517df552c3ef79
7495c537b73162b4caa66ab57492b016728c321c

View File

@@ -25,7 +25,7 @@ TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data -r:Sy
REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
TEST_MCS_FLAGS += -r:System.Configuration
PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
RESOURCE_STRINGS = ../../../external/referencesource/System/System.txt
@@ -35,6 +35,9 @@ endif
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
ifeq (monotouch_watch, $(PROFILE))
LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
ifeq (monodroid, $(PROFILE))
LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
@@ -47,14 +50,16 @@ endif
#
ifeq (secxml/, $(intermediate))
LOCAL_MCS_FLAGS = -lib:$(bare_libdir)
LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll -r:System.Xml.dll -r:MonoSecurity=Mono.Security.dll
LIB_REFS += System.Xml MonoSecurity=Mono.Security
LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll
endif
#
# Flags used to build the final version of System (when intermediate is not defined)
#
ifndef intermediate
LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll -r:System.Xml.dll -r:MonoSecurity=Mono.Security.dll $(FINAL_MCS_FLAGS)
LIB_REFS += System.Xml MonoSecurity=Mono.Security
LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll $(FINAL_MCS_FLAGS)
endif
EXTRA_DISTFILES = \

View File

@@ -50,6 +50,7 @@ namespace Mono.CSharp
{
static string windowsMcsPath;
static string windowsMonoPath;
static string unixMcsCommand;
Mutex mcsOutMutex;
StringCollection mcsOutput;
@@ -85,6 +86,13 @@ namespace Mono.CSharp
if (!File.Exists (windowsMcsPath))
throw new FileNotFoundException ("Windows mcs path not found: " + windowsMcsPath);
} else {
var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
var unixMcsPath = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
if (File.Exists (unixMcsPath))
unixMcsCommand = unixMcsPath;
else
unixMcsCommand = "mcs";
}
}
@@ -173,7 +181,7 @@ namespace Mono.CSharp
mcs.StartInfo.Arguments = "\"" + windowsMcsPath + "\" " +
BuildArgs (options, fileNames, ProviderOptions);
} else {
mcs.StartInfo.FileName="mcs";
mcs.StartInfo.FileName=unixMcsCommand;
mcs.StartInfo.Arguments=BuildArgs(options, fileNames, ProviderOptions);
}

View File

@@ -205,13 +205,15 @@ namespace Mono.CSharp
foreach (CodeNamespace codeNamespace in compileUnit.Namespaces) {
if (string.IsNullOrEmpty (codeNamespace.Name)) {
global_imports = codeNamespace.Imports;
codeNamespace.Imports = new CodeNamespaceImportCollection ();
codeNamespace.Imports.Clear ();
}
GenerateNamespace (codeNamespace);
if (global_imports != null) {
codeNamespace.Imports = global_imports;
codeNamespace.Imports.Clear ();
foreach (CodeNamespaceImport ns in global_imports)
codeNamespace.Imports.Add (ns);
global_imports = null;
}
}

View File

@@ -50,6 +50,7 @@ namespace Microsoft.VisualBasic
{
static string windowsMonoPath;
static string windowsvbncPath;
static string unixVbncCommand;
static VBCodeCompiler ()
{
@@ -69,6 +70,13 @@ namespace Microsoft.VisualBasic
"bin\\mono.exe");
windowsvbncPath =
Path.Combine (p, "2.0\\vbnc.exe");
} else {
var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
var unixMcsPath = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "vbnc"));
if (File.Exists (unixMcsPath))
unixVbncCommand = unixMcsPath;
else
unixVbncCommand = "vbnc";
}
}

View File

@@ -93,6 +93,9 @@ namespace Microsoft.VisualBasic
"While", "With", "WithEvents", "WriteOnly",
"Xor"
};
private CodeAttributeDeclarationCollection assemblyCustomAttributes;
public VBCodeGenerator()
{
}
@@ -229,13 +232,17 @@ namespace Microsoft.VisualBasic
protected override void GenerateCompileUnit (CodeCompileUnit compileUnit)
{
assemblyCustomAttributes = compileUnit.AssemblyCustomAttributes;
GenerateCompileUnitStart (compileUnit);
OutputAttributes (compileUnit.AssemblyCustomAttributes,
"Assembly: ", LineHandling.NewLine);
GenerateNamespaces (compileUnit);
// In the case there are no namespaces, and hence no Import statements, now
// is the time to emit assembly level attributes.
if (assemblyCustomAttributes != null)
GenerateAssemblyAttributes ();
GenerateCompileUnitEnd (compileUnit);
}
@@ -1026,7 +1033,14 @@ namespace Microsoft.VisualBasic
protected override void GenerateNamespace(CodeNamespace ns)
{
GenerateNamespaceImports (ns);
// Assembly level attributes can't be emitted before the Import statements
// in the file.
if (assemblyCustomAttributes != null)
GenerateAssemblyAttributes ();
Output.WriteLine ();
GenerateCommentStatements (ns.Comments);
GenerateNamespaceStart (ns);
GenerateTypes (ns);
@@ -1650,6 +1664,13 @@ namespace Microsoft.VisualBasic
return (attributes & MemberAttributes.ScopeMask) == MemberAttributes.Abstract;
}
private void GenerateAssemblyAttributes ()
{
OutputAttributes (assemblyCustomAttributes,
"Assembly: ", LineHandling.NewLine);
assemblyCustomAttributes = null;
}
private enum LineHandling
{
InLine,

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections;
using System.IO;
namespace System.Diagnostics
{
class AssertWrapper
{
public static void ShowAssert(string stackTrace, StackFrame frame, string message, string detailMessage)
{
new DefaultTraceListener ().Fail (message, detailMessage);
}
}
}

View File

@@ -0,0 +1,12 @@
using System;
namespace System.Diagnostics
{
class ConfigurationManagerInternalFactory
{
public class Instance
{
public static bool SetConfigurationSystemInProgress = false;
}
}
}

View File

@@ -0,0 +1,8 @@
namespace System.Net
{
static class HttpSysSettings
{
public const bool EnableNonUtf8 = true;
public const bool FavorUtf8 = true;
}
}

View File

@@ -14,6 +14,12 @@ namespace System.Net {
}
}
internal static TraceSource HttpListener {
get {
return null;
}
}
[Conditional ("TRACE")]
internal static void Enter(TraceSource traceSource, object obj, string method, object paramObject) {
}
@@ -21,6 +27,9 @@ namespace System.Net {
[Conditional ("TRACE")]
internal static void Exit(TraceSource traceSource, object obj, string method, object retObject) {
}
internal static void PrintWarning(TraceSource traceSource, object obj, string method, string msg) {
}
}
#if MOBILE

View File

@@ -879,4 +879,48 @@ partial class SR
public const string net_wrongversion = "net_wrongversion";
public const string security_ExtendedProtection_NoOSSupport = "security_ExtendedProtection_NoOSSupport";
public const string Argument_FrameworkNameInvalid = "Argument_FrameworkNameInvalid";
public const string Argument_FrameworkNameInvalidVersion = "Argument_FrameworkNameInvalidVersion";
public const string Argument_FrameworkNameMissingVersion = "Argument_FrameworkNameMissingVersion";
public const string Argument_FrameworkNameTooShort = "Argument_FrameworkNameTooShort";
public const string DebugAssertBanner = @"---- DEBUG ASSERTION FAILED ----";
public const string ExceptionOccurred = @"An exception occurred writing trace output to log file '{0}'. {1}";
public const string TraceSwitchLevelTooHigh = @"Attempted to set {0} to a value that is too high. Setting level to TraceLevel.Verbose";
public const string TraceSwitchLevelTooLow = @"Attempted to set {0} to a value that is too low. Setting level to TraceLevel.Off";
public const string TraceSwitchInvalidLevel = @"The Level must be set to a value in the enumeration TraceLevel.";
public const string TraceListenerIndentSize = @"The IndentSize property must be non-negative.";
public const string TraceListenerFail = @"Fail:";
public const string TraceAsTraceSource = @"Trace";
public const string MustAddListener = @"Only TraceListeners can be added to a TraceListenerCollection.";
public const string DebugAssertShortMessage = @"---- Assert Short Message ----";
public const string DebugAssertLongMessage = @"---- Assert Long Message ----";
public const string BadConfigSwitchValue = @"The config value for Switch '{0}' was invalid.";
public const string AttributeNotSupported = @"'{0}' is not a valid configuration attribute for type '{1}'.";
public const string Could_not_create_listener = @"Couldn't create listener '{0}'.";
public const string TL_InitializeData_NotSpecified = @"initializeData needs to be valid for this TraceListener.";
public const string Could_not_create_type_instance = @"Could not create {0}.";
public const string Could_not_find_type = @"Couldn't find type for class {0}.";
public const string Could_not_get_constructor = @"Couldn't find constructor for class {0}.";
public const string EmptyTypeName_NotAllowed = @"switchType needs to be a valid class name. It can't be empty.";
public const string Incorrect_base_type = @"The specified type, '{0}' is not derived from the appropriate base type, '{1}'.";
public const string Only_specify_one = @"'switchValue' and 'switchName' cannot both be specified on source '{0}'.";
public const string Reference_listener_cant_have_properties = @"A listener with no type name specified references the sharedListeners section and cannot have any attributes other than 'Name'. Listener: '{0}'.";
public const string Reference_to_nonexistent_listener = @"Listener '{0}' does not exist in the sharedListeners section.";
public const string Argument_NullComment = @"The 'Comment' property of the CodeCommentStatement '{0}' cannot be null.";
public const string CodeGenOutputWriter = @"The output writer for code generation and the writer supplied don't match and cannot be used. This is generally caused by a bad implementation of a CodeGenerator derived class.";
public const string CodeGenReentrance = @"This code generation API cannot be called while the generator is being used to generate something else.";
public const string InvalidElementType = @"Element type {0} is not supported.";
public const string InvalidIdentifier = @"Identifier '{0}' is not valid.";
public const string InvalidPrimitiveType = @"Invalid Primitive Type: {0}. Consider using CodeObjectCreateExpression.";
public const string ArityDoesntMatch = @"The total arity specified in '{0}' does not match the number of TypeArguments supplied. There were '{1}' TypeArguments supplied.
";
public const string InvalidPathCharsInChecksum = @"The CodeChecksumPragma file name '{0}' contains invalid path characters.";
public const string InvalidLanguageIdentifier = @"The identifier:""{0}"" on the property:""{1}"" of type:""{2}"" is not a valid language-independent identifier name. Check to see if CodeGenerator.IsValidLanguageIndependentIdentifier allows the identifier name.";
public const string InvalidTypeName = @"The type name:""{0}"" on the property:""{1}"" of type:""{2}"" is not a valid language-independent type name.";
public const string InvalidRegion = "The region directive '{0}' contains invalid characters. RegionText cannot contain any new line characters.";
}

View File

@@ -9,7 +9,11 @@ namespace System.Net.Configuration {
}
}
#if !MOBILE
internal UnicodeEncodingConformance WebUtilityUnicodeEncodingConformance = UnicodeEncodingConformance.Auto;
internal UnicodeDecodingConformance WebUtilityUnicodeDecodingConformance = UnicodeDecodingConformance.Auto;
#endif
internal bool HttpListenerUnescapeRequestUrl = true;
}
}
}

View File

@@ -37,10 +37,10 @@ namespace System.Net.Sockets
// this version does not throw.
internal void InternalShutdown (SocketShutdown how)
{
if (!connected || disposed)
if (!is_connected || is_disposed)
return;
int error;
Shutdown_internal (socket, how, out error);
Shutdown_internal (safe_handle, how, out error);
}
internal IAsyncResult UnsafeBeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
@@ -86,7 +86,7 @@ namespace System.Net.Sockets
internal void SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int optionValue, bool silent)
{
if (disposed && closed) {
if (is_disposed && is_closed) {
if (silent)
return;
throw new ObjectDisposedException (GetType ().ToString ());
@@ -94,7 +94,7 @@ namespace System.Net.Sockets
int error;
SetSocketOption_internal (socket, optionLevel, optionName, null,
SetSocketOption_internal (safe_handle, optionLevel, optionName, null,
null, optionValue, out error);
if (!silent && error != 0)

View File

@@ -233,6 +233,10 @@ namespace System.CodeDom.Compiler {
return Config.Compilers.GetLanguageFromExtension (extension);
return null;
}
#else
public static CompilerInfo[] GetAllCompilerInfo () { return null; }
public static CompilerInfo GetCompilerInfo (string language) { return null; }
public static string GetLanguageFromExtension (string extension) { return null; }
#endif
public virtual string GetTypeOutput (CodeTypeReference type)

File diff suppressed because it is too large Load Diff

View File

@@ -1,133 +0,0 @@
//
// System.CodeDom.Compiler CodeGeneratorOptions class
//
// Authors:
// Daniel Stodden (stodden@in.tum.de)
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2002 Ximian, Inc.
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
using System.Security.Permissions;
namespace System.CodeDom.Compiler {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
public class CodeGeneratorOptions {
private IDictionary properties;
//
// Constructors
//
public CodeGeneratorOptions()
{
properties = new ListDictionary();
}
//
// Properties
//
/// <summary>
/// Whether to insert blank lines between individual members.
/// Default is true.
/// </summary>
public bool BlankLinesBetweenMembers {
get {
object o = properties["BlankLinesBetweenMembers"];
return ((o == null) ? true : (bool) o);
}
set {
properties["BlankLinesBetweenMembers"] = value;
}
}
/// <summary>
/// "Block" puts braces on the same line as the associated statement or declaration.
/// "C" puts braces on the following line.
/// Default is "C"
/// </summary>
public string BracingStyle {
get {
object o = properties["BracingStyle"];
return ((o == null) ? "Block" : (string) o);
}
set {
properties["BracingStyle"] = value;
}
}
/// <summary>
/// Whether to start <code>else</code>,
/// <code>catch</code>, or <code>finally</code>
/// blocks on the same line as the previous block.
/// Default is false.
/// </summary>
public bool ElseOnClosing {
get {
object o = properties["ElseOnClosing"];
return ((o == null) ? false : (bool) o);
}
set {
properties["ElseOnClosing"] = value;
}
}
/// <summary>
/// The string used for individual indentation levels. Default is four spaces.
/// </summary>
public string IndentString {
get {
object o = properties["IndentString"];
return ((o == null) ? " " : (string) o);
}
set {
properties["IndentString"] = value;
}
}
public Object this[string index] {
get {
return properties[index];
}
set {
properties[index] = value;
}
}
[ComVisible (false)]
public bool VerbatimOrder {
get {
object o = properties["VerbatimOrder"];
return ((o == null) ? false : (bool) o);
}
set {
properties["VerbatimOrder"] = value;
}
}
}
}

View File

@@ -1,102 +0,0 @@
//
// System.CodeDom.Compiler.CompilerError
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace System.CodeDom.Compiler {
[Serializable]
public class CompilerError {
string fileName;
int line;
int column;
string errorNumber;
string errorText;
bool isWarning = false;
public CompilerError () :
this (String.Empty, 0, 0, String.Empty, String.Empty)
{
}
public CompilerError (string fileName, int line, int column, string errorNumber, string errorText)
{
this.fileName = fileName;
this.line = line;
this.column = column;
this.errorNumber = errorNumber;
this.errorText = errorText;
}
public override string ToString ()
{
string type = isWarning ? "warning" : "error";
return String.Format (System.Globalization.CultureInfo.InvariantCulture,
"{0}({1},{2}) : {3} {4}: {5}", fileName, line, column, type,
errorNumber, errorText);
}
public int Line
{
get { return line; }
set { line = value; }
}
public int Column
{
get { return column; }
set { column = value; }
}
public string ErrorNumber
{
get { return errorNumber; }
set { errorNumber = value; }
}
public string ErrorText
{
get { return errorText; }
set { errorText = value; }
}
public bool IsWarning
{
get { return isWarning; }
set { isWarning = value; }
}
public string FileName
{
get { return fileName; }
set { fileName = value; }
}
}
}

View File

@@ -1,115 +0,0 @@
//
// System.CodeDom.Compiler.CompilerErrorCollection.cs
//
// Authors:
// Daniel Stodden (stodden@in.tum.de)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.Security.Permissions;
namespace System.CodeDom.Compiler {
[Serializable]
public class CompilerErrorCollection : CollectionBase
{
public CompilerErrorCollection ()
{
}
public CompilerErrorCollection (CompilerErrorCollection value)
{
InnerList.AddRange(value.InnerList);
}
public CompilerErrorCollection (CompilerError[] value)
{
InnerList.AddRange(value);
}
public int Add (CompilerError value)
{
return InnerList.Add(value);
}
public void AddRange (CompilerError[] value)
{
InnerList.AddRange(value);
}
public void AddRange (CompilerErrorCollection value)
{
InnerList.AddRange(value.InnerList);
}
public bool Contains (CompilerError value)
{
return InnerList.Contains(value);
}
public void CopyTo (CompilerError[] array, int index)
{
InnerList.CopyTo(array,index);
}
public int IndexOf (CompilerError value)
{
return InnerList.IndexOf(value);
}
public void Insert (int index, CompilerError value)
{
InnerList.Insert(index,value);
}
public void Remove (CompilerError value)
{
InnerList.Remove(value);
}
public CompilerError this [int index] {
get { return (CompilerError) InnerList[index]; }
set { InnerList[index]=value; }
}
public bool HasErrors {
get {
foreach (CompilerError error in InnerList)
if (!error.IsWarning) return true;
return false;
}
}
public bool HasWarnings {
get {
foreach (CompilerError error in InnerList)
if (error.IsWarning) return true;
return false;
}
}
}
}

View File

@@ -1,224 +0,0 @@
//
// System.CodeDom.Compiler.CompilerParameters.cs
//
// Authors:
// Daniel Stodden (stodden@in.tum.de)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Ximian, Inc.
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections.Specialized;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Security.Policy;
namespace System.CodeDom.Compiler {
[Serializable]
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class CompilerParameters {
private string compilerOptions;
private Evidence evidence;
private bool generateExecutable = false;
private bool generateInMemory = false;
private bool includeDebugInformation = false;
private string mainClass;
private string outputAssembly;
private StringCollection referencedAssemblies;
private TempFileCollection tempFiles;
private bool treatWarningsAsErrors = false;
private IntPtr userToken = IntPtr.Zero;
private int warningLevel = -1;
private string win32Resource;
private StringCollection embedded_resources;
private StringCollection linked_resources;
//
// Constructors
//
public CompilerParameters()
{
}
public CompilerParameters (string[] assemblyNames)
{
referencedAssemblies = new StringCollection();
referencedAssemblies.AddRange (assemblyNames);
}
public CompilerParameters (string[] assemblyNames, string output)
{
referencedAssemblies = new StringCollection();
referencedAssemblies.AddRange (assemblyNames);
outputAssembly = output;
}
public CompilerParameters (string[] assemblyNames, string output, bool includeDebugInfo)
{
referencedAssemblies = new StringCollection();
referencedAssemblies.AddRange (assemblyNames);
outputAssembly = output;
includeDebugInformation = includeDebugInfo;
}
//
// Properties
//
public string CompilerOptions {
get {
return compilerOptions;
}
set {
compilerOptions = value;
}
}
[Obsolete]
public Evidence Evidence {
get { return evidence; }
[SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
set { evidence = value; }
}
public bool GenerateExecutable {
get {
return generateExecutable;
}
set {
generateExecutable = value;
}
}
public bool GenerateInMemory {
get {
return generateInMemory;
}
set {
generateInMemory = value;
}
}
public bool IncludeDebugInformation {
get {
return includeDebugInformation;
}
set {
includeDebugInformation = value;
}
}
public string MainClass {
get {
return mainClass;
}
set {
mainClass = value;
}
}
public string OutputAssembly {
get {
return outputAssembly;
}
set {
outputAssembly = value;
}
}
public StringCollection ReferencedAssemblies {
get {
if (referencedAssemblies == null)
referencedAssemblies = new StringCollection ();
return referencedAssemblies;
}
}
public TempFileCollection TempFiles {
get {
if (tempFiles == null)
tempFiles = new TempFileCollection ();
return tempFiles;
}
set {
tempFiles = value;
}
}
public bool TreatWarningsAsErrors {
get {
return treatWarningsAsErrors;
}
set {
treatWarningsAsErrors = value;
}
}
public IntPtr UserToken {
get {
return userToken;
}
set {
userToken = value;
}
}
public int WarningLevel {
get {
return warningLevel;
}
set {
warningLevel = value;
}
}
public string Win32Resource {
get {
return win32Resource;
}
set {
win32Resource = value;
}
}
[ComVisible (false)]
public StringCollection EmbeddedResources {
get {
if (embedded_resources == null)
embedded_resources = new StringCollection ();
return embedded_resources;
}
}
[ComVisible (false)]
public StringCollection LinkedResources {
get {
if (linked_resources == null)
linked_resources = new StringCollection ();
return linked_resources;
}
}
}
}

View File

@@ -1,53 +0,0 @@
//
// System.CodeDom.Compiler.GeneratedCodeAttribute class
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.CodeDom.Compiler {
[AttributeUsage (AttributeTargets.All, Inherited = false, AllowMultiple = false)]
public sealed class GeneratedCodeAttribute : Attribute {
private string tool;
private string version;
public GeneratedCodeAttribute (string tool, string version)
{
this.tool = tool;
this.version = version;
}
public string Tool {
get { return tool; }
}
public string Version {
get { return version; }
}
}
}

Some files were not shown because too many files have changed in this diff Show More