Imported Upstream version 5.18.0.142

Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-09 08:20:59 +00:00
parent e52655b4dc
commit 0abdbe5a7d
1547 changed files with 93792 additions and 47893 deletions

View File

@@ -1,54 +0,0 @@
//
// System.AssemblyLoadEventArgs.cs
//
// Author:
// Chris Hynes (chrish@assistedsolutions.com)
//
// (C) 2001 Chris Hynes
//
//
// Copyright (C) 2004 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.Reflection;
using System.Runtime.InteropServices;
namespace System
{
[ComVisible (true)]
public class AssemblyLoadEventArgs: EventArgs
{
private Assembly m_loadedAssembly;
public AssemblyLoadEventArgs (Assembly loadedAssembly)
{
this.m_loadedAssembly = loadedAssembly;
}
public Assembly LoadedAssembly {
get {
return m_loadedAssembly;
}
}
}
}

View File

@@ -1,37 +0,0 @@
//
// System.AssemblyLoadEventHandler.cs
//
// Paolo Molaro
//
// (C) 2002 Ximian, Inc.
//
//
// Copyright (C) 2004 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
{
[Serializable]
[System.Runtime.InteropServices.ComVisible (true)]
public delegate void AssemblyLoadEventHandler (object sender, AssemblyLoadEventArgs args);
}

View File

@@ -48,11 +48,11 @@ namespace System {
public static partial class Environment {
/*
* This is the version number of the corlib-runtime interface.
* This is the version of the corlib-runtime interface.
* It is defined in configure.ac.
*/
#pragma warning disable 169
private const int mono_corlib_version = Consts.MonoCorlibVersion;
private const string mono_corlib_version = Consts.MonoCorlibVersion;
#pragma warning restore 169
[ComVisible (true)]

View File

@@ -295,13 +295,219 @@ namespace System
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern CustomAttributeData [] GetCustomAttributesDataInternal (ICustomAttributeProvider obj);
internal static IList<CustomAttributeData> GetCustomAttributesData (ICustomAttributeProvider obj)
internal static IList<CustomAttributeData> GetCustomAttributesData (ICustomAttributeProvider obj, bool inherit = false)
{
if (obj == null)
throw new ArgumentNullException ("obj");
throw new ArgumentNullException (nameof (obj));
CustomAttributeData [] attrs = GetCustomAttributesDataInternal (obj);
return Array.AsReadOnly<CustomAttributeData> (attrs);
if (!inherit)
return GetCustomAttributesDataBase (obj, null, false);
return GetCustomAttributesData (obj, typeof (MonoCustomAttrs), inherit);
}
internal static IList<CustomAttributeData> GetCustomAttributesData (ICustomAttributeProvider obj, Type attributeType, bool inherit)
{
if (obj == null)
throw new ArgumentNullException (nameof (obj));
if (attributeType == null)
throw new ArgumentNullException (nameof (attributeType));
if (attributeType == typeof (MonoCustomAttrs))
attributeType = null;
const string Message = "Invalid custom attribute data format";
IList<CustomAttributeData> r;
IList<CustomAttributeData> res = GetCustomAttributesDataBase (obj, attributeType, false);
// shortcut
if (!inherit && res.Count == 1) {
if (res [0] == null)
throw new CustomAttributeFormatException (Message);
if (attributeType != null) {
if (attributeType.IsAssignableFrom (res [0].AttributeType))
r = new CustomAttributeData[] { res [0] };
else
r = Array.Empty<CustomAttributeData> ();
} else {
r = new CustomAttributeData[] { res [0] };
}
return r;
}
if (inherit && GetBase (obj) == null)
inherit = false;
// if AttributeType is sealed, and Inherited is set to false, then
// there's no use in scanning base types
if ((attributeType != null && attributeType.IsSealed) && inherit) {
var usageAttribute = RetrieveAttributeUsage (attributeType);
if (!usageAttribute.Inherited)
inherit = false;
}
var initialSize = Math.Max (res.Count, 16);
List<CustomAttributeData> a = null;
ICustomAttributeProvider btype = obj;
/* Non-inherit case */
if (!inherit) {
if (attributeType == null) {
foreach (CustomAttributeData attrData in res) {
if (attrData == null)
throw new CustomAttributeFormatException (Message);
}
var result = new CustomAttributeData [res.Count];
res.CopyTo (result, 0);
return result;
} else {
a = new List<CustomAttributeData> (initialSize);
foreach (CustomAttributeData attrData in res) {
if (attrData == null)
throw new CustomAttributeFormatException (Message);
if (!attributeType.IsAssignableFrom (attrData.AttributeType))
continue;
a.Add (attrData);
}
return a.ToArray ();
}
}
/* Inherit case */
var attributeInfos = new Dictionary<Type, AttributeInfo> (initialSize);
int inheritanceLevel = 0;
a = new List<CustomAttributeData> (initialSize);
do {
foreach (CustomAttributeData attrData in res) {
AttributeUsageAttribute usage;
if (attrData == null)
throw new CustomAttributeFormatException (Message);
Type attrType = attrData.AttributeType;
if (attributeType != null) {
if (!attributeType.IsAssignableFrom (attrType))
continue;
}
AttributeInfo firstAttribute;
if (attributeInfos.TryGetValue (attrType, out firstAttribute))
usage = firstAttribute.Usage;
else
usage = RetrieveAttributeUsage (attrType);
// The same as for CustomAttributes.
//
// Only add attribute to the list of attributes if
// - we are on the first inheritance level, or the attribute can be inherited anyway
// and (
// - multiple attributes of the type are allowed
// or (
// - this is the first attribute we've discovered
// or
// - the attribute is on same inheritance level than the first
// attribute that was discovered for this attribute type ))
if ((inheritanceLevel == 0 || usage.Inherited) && (usage.AllowMultiple ||
(firstAttribute == null || (firstAttribute != null
&& firstAttribute.InheritanceLevel == inheritanceLevel))))
a.Add(attrData);
if (firstAttribute == null)
attributeInfos.Add (attrType, new AttributeInfo (usage, inheritanceLevel));
}
if ((btype = GetBase (btype)) != null) {
inheritanceLevel++;
res = GetCustomAttributesDataBase (btype, attributeType, true);
}
} while (inherit && btype != null);
return a.ToArray ();
}
internal static IList<CustomAttributeData> GetCustomAttributesDataBase (ICustomAttributeProvider obj, Type attributeType, bool inheritedOnly)
{
CustomAttributeData[] attrsData;
if (IsUserCattrProvider (obj)) {
//FIXME resolve this case if it makes sense. Assign empty array for now.
//attrsData = obj.GetCustomAttributesData(attributeType, true);
attrsData = Array.Empty<CustomAttributeData> ();
} else
attrsData = GetCustomAttributesDataInternal (obj);
//
// All pseudo custom attributes are Inherited = false hence we can avoid
// building attributes data array which would be discarded by inherited checks
//
if (!inheritedOnly) {
CustomAttributeData[] pseudoAttrsData = GetPseudoCustomAttributesData (obj, attributeType);
if (pseudoAttrsData != null) {
if (attrsData.Length == 0)
return Array.AsReadOnly (pseudoAttrsData);
CustomAttributeData[] res = new CustomAttributeData [attrsData.Length + pseudoAttrsData.Length];
Array.Copy (attrsData, res, attrsData.Length);
Array.Copy (pseudoAttrsData, 0, res, attrsData.Length, pseudoAttrsData.Length);
return Array.AsReadOnly (res);
}
}
return Array.AsReadOnly (attrsData);
}
internal static CustomAttributeData[] GetPseudoCustomAttributesData (ICustomAttributeProvider obj, Type attributeType)
{
CustomAttributeData[] pseudoAttrsData = null;
/* FIXME: Add other types */
if (obj is MonoMethod)
pseudoAttrsData = ((MonoMethod)obj).GetPseudoCustomAttributesData ();
else if (obj is FieldInfo)
pseudoAttrsData = ((FieldInfo)obj).GetPseudoCustomAttributesData ();
else if (obj is ParameterInfo)
pseudoAttrsData = ((ParameterInfo)obj).GetPseudoCustomAttributesData ();
else if (obj is Type)
pseudoAttrsData = GetPseudoCustomAttributesData (((Type)obj));
if ((attributeType != null) && (pseudoAttrsData != null)) {
for (int i = 0; i < pseudoAttrsData.Length; ++i) {
if (attributeType.IsAssignableFrom (pseudoAttrsData [i].AttributeType)) {
if (pseudoAttrsData.Length == 1)
return pseudoAttrsData;
else
return new CustomAttributeData[] { pseudoAttrsData[i] };
}
}
return Array.Empty<CustomAttributeData> ();
}
return pseudoAttrsData;
}
static CustomAttributeData[] GetPseudoCustomAttributesData (Type type)
{
int count = 0;
var Attributes = type.Attributes;
/* IsSerializable returns true for delegates/enums as well */
if ((Attributes & TypeAttributes.Serializable) != 0)
count++;
if ((Attributes & TypeAttributes.Import) != 0)
count++;
if (count == 0)
return null;
CustomAttributeData[] attrsData = new CustomAttributeData [count];
count = 0;
if ((Attributes & TypeAttributes.Serializable) != 0)
attrsData [count++] = new CustomAttributeData ((typeof (SerializableAttribute)).GetConstructor (Type.EmptyTypes));
if ((Attributes & TypeAttributes.Import) != 0)
attrsData [count++] = new CustomAttributeData ((typeof (ComImportAttribute)).GetConstructor (Type.EmptyTypes));
return attrsData;
}
internal static bool IsDefined (ICustomAttributeProvider obj, Type attributeType, bool inherit)

View File

@@ -38,133 +38,8 @@ using System.Diagnostics;
namespace System
{
[ComVisible (true)]
public static class Nullable {
#if MOBILE
[ComVisible (false)]
#endif
public static int Compare<T> (T? n1, T? n2) where T: struct
{
if (n1.has_value) {
if (!n2.has_value)
return 1;
return Comparer<T>.Default.Compare (n1.value, n2.value);
}
return n2.has_value ? -1 : 0;
}
#if MOBILE
[ComVisible (false)]
#endif
public static bool Equals<T> (T? n1, T? n2) where T: struct
{
if (n1.has_value != n2.has_value)
return false;
if (!n1.has_value)
return true;
return EqualityComparer<T>.Default.Equals (n1.value, n2.value);
}
public static Type GetUnderlyingType (Type nullableType)
{
if (nullableType == null)
throw new ArgumentNullException ("nullableType");
return nullableType.IsGenericType && !nullableType.IsGenericTypeDefinition && nullableType.GetGenericTypeDefinition () == typeof(Nullable<>) ?
nullableType.GetGenericArguments () [0] : null;
}
}
[Serializable]
[DebuggerStepThrough]
public struct Nullable<T> where T: struct
public partial struct Nullable<T> where T: struct
{
#region Sync with runtime code
internal T value;
internal bool has_value;
#endregion
public Nullable (T value)
{
this.has_value = true;
this.value = value;
}
public bool HasValue {
get { return has_value; }
}
public T Value {
get {
if (!has_value)
throw new InvalidOperationException ("Nullable object must have a value.");
return value;
}
}
public override bool Equals (object other)
{
if (other == null)
return has_value == false;
if (!(other is Nullable<T>))
return false;
return Equals ((Nullable <T>) other);
}
bool Equals (Nullable<T> other)
{
if (other.has_value != has_value)
return false;
if (has_value == false)
return true;
return other.value.Equals (value);
}
public override int GetHashCode ()
{
if (!has_value)
return 0;
return value.GetHashCode ();
}
public T GetValueOrDefault ()
{
return value;
}
public T GetValueOrDefault (T defaultValue)
{
return has_value ? value : defaultValue;
}
public override string ToString ()
{
if (has_value)
return value.ToString ();
else
return String.Empty;
}
public static implicit operator Nullable<T> (T value)
{
return new Nullable<T> (value);
}
public static explicit operator T (Nullable<T> value)
{
return value.Value;
}
//
// These are called by the JIT
//
@@ -174,7 +49,7 @@ namespace System
//
static object Box (T? o)
{
if (!o.has_value)
if (!o.hasValue)
return null;
return o.value;

View File

@@ -1,141 +0,0 @@
//
// System.OperatingSystem.cs
//
// Author:
// Jim Richardson (develop@wtfo-guru.com)
//
// (C) 2001 Moonlight Enterprises, All Rights Reserved
// Copyright (C) 2004, 2006 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.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System {
[ComVisible (true)]
[Serializable]
public sealed class OperatingSystem : ICloneable, ISerializable
{
private System.PlatformID _platform;
private Version _version;
private string _servicePack = String.Empty;
public OperatingSystem (PlatformID platform, Version version)
{
if (version == null) {
throw new ArgumentNullException ("version");
}
_platform = platform;
_version = version;
if (platform == PlatformID.Win32NT) {
// The service pack is encoded in the upper bits of the revision
if (version.Revision != 0)
_servicePack = "Service Pack " + (version.Revision >> 16);
}
}
private OperatingSystem (SerializationInfo information, StreamingContext context)
{
_platform = (System.PlatformID)information.GetValue("_platform", typeof(System.PlatformID));
_version = (Version)information.GetValue("_version", typeof(Version));
_servicePack = information.GetString("_servicePack");
}
public PlatformID Platform {
get {
return _platform;
}
}
public Version Version {
get {
return _version;
}
}
public string ServicePack {
get { return _servicePack; }
}
public string VersionString {
get { return ToString (); }
}
public object Clone ()
{
return new OperatingSystem (_platform, _version);
}
public void GetObjectData (SerializationInfo info, StreamingContext context)
{
info.AddValue ("_platform", _platform);
info.AddValue ("_version", _version);
info.AddValue ("_servicePack", _servicePack);
}
public override string ToString ()
{
string str;
switch ((int) _platform) {
case (int) System.PlatformID.Win32NT:
str = "Microsoft Windows NT";
break;
case (int) System.PlatformID.Win32S:
str = "Microsoft Win32S";
break;
case (int) System.PlatformID.Win32Windows:
str = "Microsoft Windows 98";
break;
case (int) System.PlatformID.WinCE:
str = "Microsoft Windows CE";
break;
case 4:
/* PlatformID.Unix */
case 128:
/* reported for 1.1 mono */
str = "Unix";
break;
case 5:
str = "XBox";
break;
case 6:
str = "OSX";
break;
default:
str = Locale.GetText ("<unknown>");
break;
}
string sstr = "";
if (ServicePack != String.Empty)
sstr = " " + ServicePack;
return str + " " + _version.ToString() + sstr;
}
}
}

View File

@@ -1,65 +0,0 @@
//
// System.ResolveEventArgs.cs
//
// Author:
// Nick Drochak (ndrochak@gol.com)
//
// (C) 2001 Nick Drochak, All Rights Reserved
//
//
// Copyright (C) 2004 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.Runtime.InteropServices;
using System.Reflection;
namespace System
{
[ComVisible (true)]
public class ResolveEventArgs : EventArgs
{
private string m_Name;
private Assembly m_Requesting;
public ResolveEventArgs (string name)
{
m_Name = name;
}
public ResolveEventArgs (string name, Assembly requestingAssembly) {
this.m_Name = name;
this.m_Requesting = requestingAssembly;
}
public string Name {
get {
return m_Name;
}
}
public Assembly RequestingAssembly {
get {
return m_Requesting;
}
}
}
}

View File

@@ -1,38 +0,0 @@
//
// System.ResolveEventHandler.cs
//
// Author:
// Sean MacIsaac
//
// (C) 2001 Ximian, Inc.
//
//
// Copyright (C) 2004 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
{
[System.Runtime.InteropServices.ComVisible (true)]
[Serializable]
public delegate Reflection.Assembly ResolveEventHandler (object sender, ResolveEventArgs args);
}

View File

@@ -1,44 +0,0 @@
//
// System.StringComparison enumeration
//
// 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.
//
using System.Runtime.InteropServices;
namespace System {
[ComVisible (true)]
[Serializable]
public enum StringComparison {
CurrentCulture,
CurrentCultureIgnoreCase,
InvariantCulture,
InvariantCultureIgnoreCase,
Ordinal,
OrdinalIgnoreCase
}
}

View File

@@ -1,65 +0,0 @@
//
// System.TypeCode.cs
//
// This code was automatically generated from
// ECMA CLI XML Library Specification.
// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
// Created: Wed, 5 Sep 2001 06:34:09 UTC
// Source file: all.xml
// URL: http://devresource.hp.com/devresource/Docs/TechPapers/CSharp/all.xml
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
//
//
// Copyright (C) 2004-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.Runtime.InteropServices;
namespace System {
[ComVisible (true)]
[Serializable]
public enum TypeCode {
Empty = 0,
Object = 1,
DBNull = 2,
Boolean = 3,
Char = 4,
SByte = 5,
Byte = 6,
Int16 = 7,
UInt16 = 8,
Int32 = 9,
UInt32 = 10,
Int64 = 11,
UInt64 = 12,
Single = 13,
Double = 14,
Decimal = 15,
DateTime = 16,
String = 18
}
}

View File

@@ -1,40 +0,0 @@
//
// System.Void.cs
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Copyright (C) 2004 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
{
[Serializable]
[System.Runtime.InteropServices.ComVisible (true)]
public struct Void
{
}
}