You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler GeneratorSupport Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
// Marek Safar (marek.safar@seznam.cz)
|
||||
//
|
||||
// (C) 2002 Ximian, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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
|
||||
{
|
||||
[Flags]
|
||||
[Serializable]
|
||||
public enum GeneratorSupport {
|
||||
ArraysOfArrays = 1,
|
||||
EntryPointMethod = 1 << 1,
|
||||
GotoStatements = 1 << 2,
|
||||
MultidimensionalArrays = 1 << 3,
|
||||
StaticConstructors = 1 << 4,
|
||||
TryCatchStatements = 1 << 5,
|
||||
ReturnTypeAttributes = 1 << 6,
|
||||
DeclareValueTypes = 1 << 7,
|
||||
DeclareEnums = 1 << 8,
|
||||
DeclareDelegates = 1 << 9,
|
||||
DeclareInterfaces = 1 << 10,
|
||||
DeclareEvents = 1 << 11,
|
||||
AssemblyAttributes = 1 << 12,
|
||||
ParameterAttributes = 1 << 13,
|
||||
ReferenceParameters = 1 << 14,
|
||||
ChainedConstructorArguments = 1 << 15,
|
||||
NestedTypes = 1 << 16,
|
||||
MultipleInterfaceMembers = 1 << 17,
|
||||
PublicStaticMembers = 1 << 18,
|
||||
ComplexExpressions = 1 << 19,
|
||||
Win32Resources = 1 << 20,
|
||||
Resources = 1 << 21,
|
||||
PartialTypes = 1 << 22,
|
||||
GenericTypeReference = 1 << 23,
|
||||
GenericTypeDeclaration = 1 << 24,
|
||||
DeclareIndexerProperties = 1 << 25,
|
||||
}
|
||||
}
|
||||
|
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler ICodeCompiler Interface
|
||||
//
|
||||
// Author:
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
//
|
||||
// (C) 2002 Ximian, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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
|
||||
{
|
||||
public interface ICodeCompiler
|
||||
{
|
||||
CompilerResults CompileAssemblyFromDom( CompilerParameters options,
|
||||
CodeCompileUnit compilationUnit );
|
||||
|
||||
CompilerResults CompileAssemblyFromDomBatch( CompilerParameters options,
|
||||
CodeCompileUnit[] batch );
|
||||
|
||||
CompilerResults CompileAssemblyFromFile( CompilerParameters options,
|
||||
string fileName );
|
||||
|
||||
CompilerResults CompileAssemblyFromFileBatch( CompilerParameters options,
|
||||
string[] batch );
|
||||
|
||||
CompilerResults CompileAssemblyFromSource( CompilerParameters options,
|
||||
string source );
|
||||
|
||||
CompilerResults CompileAssemblyFromSourceBatch( CompilerParameters options,
|
||||
string[] batch );
|
||||
}
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler ICodeGenerator Interface
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza (miguel@ximian.com)
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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
|
||||
{
|
||||
using System.CodeDom;
|
||||
using System.IO;
|
||||
|
||||
public interface ICodeGenerator
|
||||
{
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
string CreateEscapedIdentifier( string value );
|
||||
|
||||
string CreateValidIdentifier( string value );
|
||||
|
||||
void GenerateCodeFromCompileUnit( CodeCompileUnit compileUnit,
|
||||
TextWriter output,
|
||||
CodeGeneratorOptions options );
|
||||
|
||||
void GenerateCodeFromExpression( CodeExpression expression,
|
||||
TextWriter output,
|
||||
CodeGeneratorOptions options );
|
||||
|
||||
void GenerateCodeFromNamespace( CodeNamespace ns,
|
||||
TextWriter output,
|
||||
CodeGeneratorOptions options );
|
||||
|
||||
void GenerateCodeFromStatement( CodeStatement statement,
|
||||
TextWriter output,
|
||||
CodeGeneratorOptions options );
|
||||
|
||||
void GenerateCodeFromType( CodeTypeDeclaration typeDeclaration,
|
||||
TextWriter output,
|
||||
CodeGeneratorOptions options );
|
||||
|
||||
string GetTypeOutput( CodeTypeReference type );
|
||||
|
||||
bool IsValidIdentifier( string value );
|
||||
|
||||
bool Supports( GeneratorSupport supports );
|
||||
|
||||
void ValidateIdentifier( string value );
|
||||
}
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler ICodeParser Interface
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza (miguel@ximian.com)
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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
|
||||
{
|
||||
using System.CodeDom;
|
||||
using System.IO;
|
||||
|
||||
public interface ICodeParser
|
||||
{
|
||||
CodeCompileUnit Parse( TextReader codeStream );
|
||||
}
|
||||
}
|
@@ -1,320 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler IndentedTextWriter class
|
||||
//
|
||||
// Author:
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
//
|
||||
// (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.IO;
|
||||
using System.Security.Permissions;
|
||||
using System.Text;
|
||||
|
||||
namespace System.CodeDom.Compiler {
|
||||
|
||||
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
|
||||
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
|
||||
public class IndentedTextWriter
|
||||
: TextWriter
|
||||
{
|
||||
private TextWriter writer;
|
||||
private string tabString;
|
||||
private int indent;
|
||||
private bool newline;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public IndentedTextWriter( TextWriter writer )
|
||||
{
|
||||
this.writer = writer;
|
||||
this.tabString = DefaultTabString;
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public IndentedTextWriter( TextWriter writer, string tabString )
|
||||
{
|
||||
this.writer = writer;
|
||||
this.tabString = tabString;
|
||||
newline = true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Fields
|
||||
//
|
||||
public const string DefaultTabString = " ";
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public override Encoding Encoding {
|
||||
get {
|
||||
return writer.Encoding;
|
||||
}
|
||||
}
|
||||
|
||||
public int Indent {
|
||||
get {
|
||||
return indent;
|
||||
}
|
||||
set {
|
||||
if (value < 0) {
|
||||
value = 0;
|
||||
}
|
||||
indent = value;
|
||||
}
|
||||
}
|
||||
|
||||
public TextWriter InnerWriter {
|
||||
get {
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
|
||||
public override string NewLine {
|
||||
get {
|
||||
return writer.NewLine;
|
||||
}
|
||||
set {
|
||||
writer.NewLine = value;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public override void Close()
|
||||
{
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
public override void Write( bool value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( char value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( char[] value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( double value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( int value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( long value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( object value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( float value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( string value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( value );
|
||||
}
|
||||
|
||||
public override void Write( string format, object arg )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( format, arg );
|
||||
}
|
||||
|
||||
public override void Write( string format, params object[] args )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( format, args );
|
||||
}
|
||||
|
||||
public override void Write( char[] buffer, int index, int count )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( buffer, index, count );
|
||||
}
|
||||
|
||||
public override void Write( string format, object arg0, object arg1 )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.Write( format, arg0, arg1 );
|
||||
}
|
||||
|
||||
|
||||
public override void WriteLine()
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine();
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( bool value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( char value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( char[] value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( double value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( int value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( long value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( object value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( float value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( string value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
[CLSCompliant(false)]
|
||||
public override void WriteLine( uint value )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( string format, object arg )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( format, arg );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( string format, params object[] args )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( format, args );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( char[] buffer, int index, int count )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( buffer, index, count );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
public override void WriteLine( string format, object arg0, object arg1 )
|
||||
{
|
||||
OutputTabs();
|
||||
writer.WriteLine( format, arg0, arg1 );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
|
||||
public void WriteLineNoTabs( string value )
|
||||
{
|
||||
writer.WriteLine( value );
|
||||
newline = true;
|
||||
}
|
||||
|
||||
|
||||
protected virtual void OutputTabs()
|
||||
{
|
||||
if ( newline ) {
|
||||
for ( int i = 0; i < indent; ++i )
|
||||
writer.Write( tabString );
|
||||
newline = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// System.CodeDom.Compiler LanguageOptions Enum implementation
|
||||
//
|
||||
// Author:
|
||||
// Daniel Stodden (stodden@in.tum.de)
|
||||
//
|
||||
// (C) 2002 Ximian, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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
|
||||
{
|
||||
[Flags]
|
||||
[Serializable]
|
||||
public enum LanguageOptions {
|
||||
None = 0,
|
||||
CaseInsensitive = 1
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user