Community supported architectures:
-| debian-ppc64el | centos-s390x |
-|-----------------------------|---------------------------|
-| [![debian-ppc64el][11]][12] | [![centos-s390x][13]][14] |
+| centos-s390x |
+|---------------------------|
+| [![centos-s390x][11]][12] |
[1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
[2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
[8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
[9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
[10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
-[11]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=debian-ppc64el/badge/icon
-[12]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=debian-ppc64el/
-[13]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=centos-s390x/badge/icon
-[14]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=centos-s390x/
+[11]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=nealef-s390x-1/badge/icon
+[12]: http://jenkins.mono-project.com/job/test-mono-mainline-communityarchitectures/label=nealef-s390x-1/
Compilation and Installation
============================
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
-* `../olive/` - Incubation code from [Olive](https://github.com/mono/olive).
-
- * If the directory ../olive is present (as an
-independent checkout) from the Mono module, that
-directory is automatically configured to share the
-same prefix than this module gets.
-
Contributing to Mono
====================
host_win32=yes
mono_cv_clang=no
if test "x$cross_compiling" = "xno"; then
- target_win32=yes
if test "x$host" == "x$build" -a "x$host" == "x$target"; then
- AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
+ target_win32=yes
fi
else
target_win32=yes
- AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
- AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW])
fi
HOST_CC="gcc"
# Windows XP SP2 is required
AC_SUBST([mcs_topdir])
AC_SUBST([mcs_topdir_from_srcdir])
-# Where's the 'olive' source tree?
-if test -d $srcdir/olive; then
- olivedir=olive
-else
- olivedir=../olive
-fi
-
-if test -d $srcdir/$olivedir; then
-olive_topdir='$(top_srcdir)/'$olivedir
-fi
-
# gettext: prepare the translation directories.
# we do not configure the full gettext, as we consume it dynamically from C#
AM_PO_SUBDIRS
# in mono-compiler.h
with_tls=pthread
target_mach=no
+ target_win32=no
;;
aarch64*-linux-*)
TARGET=ARM64;
fi
- # if we have an olive folder, override the default settings
- if test -d $olivedir; then
-
- if test x$cross_compiling = xno && test x$enable_olive_build != xno; then
-
- test -w $srcdir/$olivedir/build || chmod +w $srcdir/$olivedir/build
-
- echo "prefix=$prefix" > $srcdir/$olivedir/build/config.make
- echo "exec_prefix=$exec_prefix" >> $srcdir/$olivedir/build/config.make
- echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$olivedir/build/config.make
- echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
- echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
- echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
- fi
- fi
-
)
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
public \
public-api \
README \
- release-notes-1.0.html \
remoting \
ssapre.txt \
stack-overflow.txt \
-Subproject commit dc94cc0420ceea51363b1d622f075e502980c2f0
+Subproject commit 0b8d054523f1e88a057cd4cbf1fe808afc3e361d
available on a typical dotnet framework installation, notice that this
does not include all of the Mono libraries, only the System.* ones. This
is a convenient shortcut for those porting code.
-.TP
-.I \-pkg:olive
-Use this to reference the "Olive" libraries (the 3.0 and 3.5 extended
-libraries).
-.TP
-.I \-pkg:silver
-References the assemblies for creating Moonlight/Silverlight
-applications.
-.TP
-.I \-pkg:silverdesktop
-Use this option to create Moonlight/Silverlight applications that
-target the desktop. This option allows developers to consume the
-Silverlight APIs with the full 2.0 profile API available to them,
-unlike
-.I smcs
-it gives full access to all the APIs that are part of Mono. The only
-downside is that applications created with silverdesktop will not run
-on the browser. Typically these applications will be launched
-with the
-.I mopen
-command line tool.
-.TP
-For more details see the PACKAGE section in this document
.ne
.RE
.TP
resources/collation.cjkKO.bin \
resources/collation.cjkKOlv2.bin
-REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID
+REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
ifndef MOBILE_STATIC
-REFERENCE_SOURCES_FLAGS += -d:FEATURE_REMOTING,MONO_COM,FEATURE_FUSION
+REFERENCE_SOURCES_FLAGS += -d:FEATURE_REMOTING,MONO_COM
endif
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
--- /dev/null
+namespace System
+{
+ partial class Buffer
+ {
+ public static int ByteLength (Array array)
+ {
+ // note: the other methods in this class also use ByteLength to test for
+ // null and non-primitive arguments as a side-effect.
+
+ if (array == null)
+ throw new ArgumentNullException ("array");
+
+ int length = _ByteLength (array);
+ if (length < 0)
+ throw new ArgumentException (Locale.GetText ("Object must be an array of primitives."));
+
+ return length;
+ }
+
+ public static byte GetByte (Array array, int index)
+ {
+ if (index < 0 || index >= ByteLength (array))
+ throw new ArgumentOutOfRangeException ("index");
+
+ return _GetByte (array, index);
+ }
+
+ public static void SetByte (Array array, int index, byte value)
+ {
+ if (index < 0 || index >= ByteLength (array))
+ throw new ArgumentOutOfRangeException ("index");
+
+ _SetByte (array, index, value);
+ }
+
+ public static void BlockCopy (Array src, int srcOffset, Array dst, int dstOffset, int count)
+ {
+ if (src == null)
+ throw new ArgumentNullException ("src");
+
+ if (dst == null)
+ throw new ArgumentNullException ("dst");
+
+ if (srcOffset < 0)
+ throw new ArgumentOutOfRangeException ("srcOffset", Locale.GetText(
+ "Non-negative number required."));
+
+ if (dstOffset < 0)
+ throw new ArgumentOutOfRangeException ("dstOffset", Locale.GetText (
+ "Non-negative number required."));
+
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count", Locale.GetText (
+ "Non-negative number required."));
+
+ // We do the checks in unmanaged code for performance reasons
+ bool res = InternalBlockCopy (src, srcOffset, dst, dstOffset, count);
+ if (!res) {
+ // watch for integer overflow
+ if ((srcOffset > ByteLength (src) - count) || (dstOffset > ByteLength (dst) - count))
+ throw new ArgumentException (Locale.GetText (
+ "Offset and length were out of bounds for the array or count is greater than " +
+ "the number of elements from index to the end of the source collection."));
+ }
+ }
+
+ internal static unsafe void memcpy4 (byte *dest, byte *src, int size) {
+ /*while (size >= 32) {
+ // using long is better than int and slower than double
+ // FIXME: enable this only on correct alignment or on platforms
+ // that can tolerate unaligned reads/writes of doubles
+ ((double*)dest) [0] = ((double*)src) [0];
+ ((double*)dest) [1] = ((double*)src) [1];
+ ((double*)dest) [2] = ((double*)src) [2];
+ ((double*)dest) [3] = ((double*)src) [3];
+ dest += 32;
+ src += 32;
+ size -= 32;
+ }*/
+ while (size >= 16) {
+ ((int*)dest) [0] = ((int*)src) [0];
+ ((int*)dest) [1] = ((int*)src) [1];
+ ((int*)dest) [2] = ((int*)src) [2];
+ ((int*)dest) [3] = ((int*)src) [3];
+ dest += 16;
+ src += 16;
+ size -= 16;
+ }
+ while (size >= 4) {
+ ((int*)dest) [0] = ((int*)src) [0];
+ dest += 4;
+ src += 4;
+ size -= 4;
+ }
+ while (size > 0) {
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ dest += 1;
+ src += 1;
+ --size;
+ }
+ }
+ internal static unsafe void memcpy2 (byte *dest, byte *src, int size) {
+ while (size >= 8) {
+ ((short*)dest) [0] = ((short*)src) [0];
+ ((short*)dest) [1] = ((short*)src) [1];
+ ((short*)dest) [2] = ((short*)src) [2];
+ ((short*)dest) [3] = ((short*)src) [3];
+ dest += 8;
+ src += 8;
+ size -= 8;
+ }
+ while (size >= 2) {
+ ((short*)dest) [0] = ((short*)src) [0];
+ dest += 2;
+ src += 2;
+ size -= 2;
+ }
+ if (size > 0)
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ }
+ static unsafe void memcpy1 (byte *dest, byte *src, int size) {
+ while (size >= 8) {
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ ((byte*)dest) [1] = ((byte*)src) [1];
+ ((byte*)dest) [2] = ((byte*)src) [2];
+ ((byte*)dest) [3] = ((byte*)src) [3];
+ ((byte*)dest) [4] = ((byte*)src) [4];
+ ((byte*)dest) [5] = ((byte*)src) [5];
+ ((byte*)dest) [6] = ((byte*)src) [6];
+ ((byte*)dest) [7] = ((byte*)src) [7];
+ dest += 8;
+ src += 8;
+ size -= 8;
+ }
+ while (size >= 2) {
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ ((byte*)dest) [1] = ((byte*)src) [1];
+ dest += 2;
+ src += 2;
+ size -= 2;
+ }
+ if (size > 0)
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ }
+
+ internal static unsafe void Memcpy (byte *dest, byte *src, int size) {
+ // FIXME: if pointers are not aligned, try to align them
+ // so a faster routine can be used. Handle the case where
+ // the pointers can't be reduced to have the same alignment
+ // (just ignore the issue on x86?)
+ if ((((int)dest | (int)src) & 3) != 0) {
+ if (((int)dest & 1) != 0 && ((int)src & 1) != 0 && size >= 1) {
+ dest [0] = src [0];
+ ++dest;
+ ++src;
+ --size;
+ }
+ if (((int)dest & 2) != 0 && ((int)src & 2) != 0 && size >= 2) {
+ ((short*)dest) [0] = ((short*)src) [0];
+ dest += 2;
+ src += 2;
+ size -= 2;
+ }
+ if ((((int)dest | (int)src) & 1) != 0) {
+ memcpy1 (dest, src, size);
+ return;
+ }
+ if ((((int)dest | (int)src) & 2) != 0) {
+ memcpy2 (dest, src, size);
+ return;
+ }
+ }
+ memcpy4 (dest, src, size);
+ }
+ }
+}
\ No newline at end of file
{
static internal T UnsafeCast<T>(Object o) where T : class
{
- return (T)o;
+ return Array.UnsafeMov<object, T> (o);
+ }
+
+ static internal int UnsafeEnumCast<T>(T val) where T : struct
+ {
+ return Array.UnsafeMov<T, int> (val);
+ }
+
+ static internal long UnsafeEnumCastLong<T>(T val) where T : struct
+ {
+ throw new NotImplementedException ();
}
}
}
\ No newline at end of file
return constraints;
}
- public override Type MakeGenericType (params Type[] typeArguments)
+ internal static object CreateInstanceForAnotherGenericParameter (Type genericType, RuntimeType genericArgument)
{
- if (IsUserType)
- throw new NotSupportedException ();
- if (!IsGenericTypeDefinition)
- throw new InvalidOperationException ("not a generic type definition");
- if (typeArguments == null)
- throw new ArgumentNullException ("typeArguments");
- if (GetGenericArguments().Length != typeArguments.Length)
- throw new ArgumentException (String.Format ("The type or method has {0} generic parameter(s) but {1} generic argument(s) where provided. A generic argument must be provided for each generic parameter.", GetGenericArguments ().Length, typeArguments.Length), "typeArguments");
-
- bool hasUserType = false;
-
- Type[] systemTypes = new Type[typeArguments.Length];
- for (int i = 0; i < typeArguments.Length; ++i) {
- Type t = typeArguments [i];
- if (t == null)
- throw new ArgumentNullException ("typeArguments");
-
- if (!(t is MonoType))
- hasUserType = true;
- systemTypes [i] = t;
- }
-
- if (hasUserType) {
-#if FULL_AOT_RUNTIME
- throw new NotSupportedException ("User types are not supported under full aot");
-#else
- return new MonoGenericClass (this, typeArguments);
-#endif
- }
-
- Type res = MakeGenericType (this, systemTypes);
- if (res == null)
- throw new TypeLoadException ();
- return res;
+ var gt = (RuntimeType) MakeGenericType (genericType, new Type [] { genericArgument });
+ var ctor = gt.GetDefaultConstructor ();
+ return ctor.InternalInvoke (null, null);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern string getFullName(bool full_name, bool assembly_qualified);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- public extern override Type [] GetGenericArguments ();
+ extern Type[] GetGenericArgumentsInternal (bool runtimeArray);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern GenericParameterAttributes GetGenericParameterAttributes ();
+++ /dev/null
-namespace System
-{
- [Flags]
- internal enum TimeZoneInfoOptions {
- None = 1,
- NoThrowOnInvalidTime = 2
- };
-}
\ No newline at end of file
--- /dev/null
+namespace System.Reflection.Emit
+{
+ abstract class TypeBuilderInstantiation : TypeInfo
+ {
+ internal static Type MakeGenericType (Type type, Type[] typeArguments)
+ {
+#if FULL_AOT_RUNTIME
+ throw new NotSupportedException ("User types are not supported under full aot");
+#else
+ return new MonoGenericClass (type, typeArguments);
+#endif
+ }
+ }
+}
\ No newline at end of file
+++ /dev/null
-//
-// Comparer.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.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;
-using System.Runtime.InteropServices;
-
-namespace System.Collections.Generic {
- [Serializable]
- public abstract class Comparer<T> : IComparer<T>, IComparer
- {
- static readonly Comparer <T> _default = typeof (IComparable<T>).IsAssignableFrom (typeof (T)) ?
- (Comparer<T>) Activator.CreateInstance (typeof (GenericComparer <>).MakeGenericType (typeof (T))) :
- new DefaultComparer ();
-
- public abstract int Compare (T x, T y);
-
- public static Comparer<T> Default {
- get {
- return _default;
- }
- }
-
- public static Comparer<T> Create (Comparison<T> comparison)
- {
- if (comparison == null)
- throw new ArgumentNullException ("comparison");
-
- return new ComparisonComparer<T> (comparison);
- }
-
- int IComparer.Compare (object x, object y)
- {
- if (x == y)
- return 0;
- if (x == null)
- return y == null ? 0 : -1;
- if (y == null)
- return 1;
-
- if (x is T && y is T)
- return Compare ((T) x, (T) y);
-
- throw new ArgumentException ();
- }
-
- [Serializable]
- sealed class DefaultComparer : Comparer<T>
- {
- public override int Compare (T x, T y)
- {
- // `null' is less than any other ref type
- if (x == null)
- return y == null ? 0 : -1;
- if (y == null)
- return 1;
-
- var i = x as IComparable;
- if (i != null)
- return i.CompareTo (y);
-
- i = y as IComparable;
- if (i != null)
- return -i.CompareTo (x);
-
- throw new ArgumentException ("At least one argument has to implement IComparable interface");
- }
- }
- }
-
- [Serializable]
- sealed class GenericComparer<T> : Comparer<T> where T : IComparable<T>
- {
- public override int Compare (T x, T y)
- {
- // `null' is less than any other ref type
- if (x == null)
- return y == null ? 0 : -1;
- if (y == null)
- return 1;
-
- return x.CompareTo (y);
- }
- }
- [Serializable]
- sealed class ComparisonComparer<T> : Comparer<T>
- {
- readonly Comparison<T> comparison;
-
- public ComparisonComparer (Comparison<T> comparison)
- {
- this.comparison = comparison;
- }
-
- public override int Compare (T x, T y)
- {
- return comparison (x, y);
- }
- }
-}
+++ /dev/null
-//
-// EqualityComparer.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.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;
-using System.Runtime.InteropServices;
-
-namespace System.Collections.Generic {
- [Serializable]
- public abstract class EqualityComparer <T> : IEqualityComparer, IEqualityComparer <T> {
-
- static EqualityComparer ()
- {
- var t = typeof (T);
- if (t == typeof (string)) {
- _default = (EqualityComparer<T>) (object) new InternalStringComparer ();
- return;
- }
-
- if (t == typeof (int)) {
- _default = (EqualityComparer<T>) (object) new IntEqualityComparer ();
- return;
- }
-
- if (t.IsEnum && Enum.GetUnderlyingType (t) == typeof (int)) {
- _default = new EnumIntEqualityComparer<T> ();
- return;
- }
-
- if (typeof (IEquatable <T>).IsAssignableFrom (t))
- _default = (EqualityComparer <T>) Activator.CreateInstance (typeof (GenericEqualityComparer <>).MakeGenericType (t));
- else
- _default = new DefaultComparer<T> ();
- }
-
- public abstract int GetHashCode (T obj);
- public abstract bool Equals (T x, T y);
-
- static readonly EqualityComparer <T> _default;
-
- public static EqualityComparer <T> Default {
- get {
- return _default;
- }
- }
-
- int IEqualityComparer.GetHashCode (object obj)
- {
- if (obj == null)
- return 0;
-
- if (!(obj is T))
- throw new ArgumentException ("Argument is not compatible", "obj");
-
- return GetHashCode ((T)obj);
- }
-
- bool IEqualityComparer.Equals (object x, object y)
- {
- if (x == y)
- return true;
-
- if (x == null || y == null)
- return false;
-
- if (!(x is T))
- throw new ArgumentException ("Argument is not compatible", "x");
- if (!(y is T))
- throw new ArgumentException ("Argument is not compatible", "y");
- return Equals ((T)x, (T)y);
- }
-
- internal virtual int IndexOf (T[] array, T value, int startIndex, int endIndex)
- {
- for (int i = startIndex; i < endIndex; ++i) {
- if (Equals (Array.UnsafeLoad (array, i), value))
- return i;
- }
-
- return -1;
- }
- }
-
- [Serializable]
- sealed class DefaultComparer<T> : EqualityComparer<T> {
-
- public override int GetHashCode (T obj)
- {
- if (obj == null)
- return 0;
- return obj.GetHashCode ();
- }
-
- public override bool Equals (T x, T y)
- {
- if (x == null)
- return y == null;
-
- return x.Equals (y);
- }
- }
-
- [Serializable]
- sealed class InternalStringComparer : EqualityComparer<string> {
-
- public override int GetHashCode (string obj)
- {
- if (obj == null)
- return 0;
- return obj.GetHashCode ();
- }
-
- public override bool Equals (string x, string y)
- {
- if (x == null)
- return y == null;
-
- if ((object) x == (object) y)
- return true;
-
- return x.Equals (y);
- }
-
- internal override int IndexOf (string[] array, string value, int startIndex, int endIndex)
- {
- for (int i = startIndex; i < endIndex; ++i) {
- if (Array.UnsafeLoad (array, i) == value)
- return i;
- }
-
- return -1;
- }
- }
-
- [Serializable]
- sealed class IntEqualityComparer : EqualityComparer<int>
- {
- public override int GetHashCode (int obj)
- {
- return obj;
- }
-
- public override bool Equals (int x, int y)
- {
- return x == y;
- }
-
- internal override int IndexOf (int[] array, int value, int startIndex, int endIndex)
- {
- for (int i = startIndex; i < endIndex; ++i) {
- if (Array.UnsafeLoad (array, i) == value)
- return i;
- }
-
- return -1;
- }
- }
-
- [Serializable]
- sealed class EnumIntEqualityComparer<T> : EqualityComparer<T>
- {
- public override int GetHashCode (T obj)
- {
- return Array.UnsafeMov<T, int> (obj);
- }
-
- public override bool Equals (T x, T y)
- {
- return Array.UnsafeMov<T, int> (x) == Array.UnsafeMov<T, int> (y);
- }
-
- internal override int IndexOf (T[] array, T value, int startIndex, int endIndex)
- {
- int v = Array.UnsafeMov<T, int> (value);
- var a = Array.UnsafeMov<T[], int[]> (array);
- for (int i = startIndex; i < endIndex; ++i) {
- if (Array.UnsafeLoad (a, i) == v)
- return i;
- }
-
- return -1;
- }
- }
-
- [Serializable]
- sealed class GenericEqualityComparer <T> : EqualityComparer <T> where T : IEquatable <T> {
-
- public override int GetHashCode (T obj)
- {
- if (obj == null)
- return 0;
- return obj.GetHashCode ();
- }
-
- public override bool Equals (T x, T y)
- {
- if (x == null)
- return y == null;
-
- return x.Equals (y);
- }
- }
-}
if (count > 0) {
// Use the fastest method, all range checks has been done
- Buffer.BlockCopyInternal (buf, buf_offset, dest, dest_offset, count);
+ Buffer.InternalBlockCopy (buf, buf_offset, dest, dest_offset, count);
buf_offset += count;
}
return rp.ObjectIdentity.ClientDynamicProperties;
}
else
+ {
+#if FEATURE_REMOTING
return obj.ObjectIdentity.ServerDynamicProperties;
+#else
+ throw new NotSupportedException ();
+#endif
+ }
}
else if (ctx != null && obj == null)
{
+++ /dev/null
-//
-// Action.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004, 2010 Novell
-//
-// 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.CompilerServices;
-
-namespace System
-{
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate void Action ();
-
- public delegate void Action <in T> (T obj);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate void Action <in T1, in T2> (T1 arg1, T2 arg2);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate void Action <in T1, in T2, in T3> (T1 arg1, T2 arg2, T3 arg3);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate void Action <in T1, in T2, in T3, in T4> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-
- public delegate void Action <in T1, in T2, in T3, in T4, in T5> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
- public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
- public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
- public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-}
+++ /dev/null
-//
-// System.ApplicationId class
-//
-// Author:
-// Sebastien Pouliot <sebastien@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;
-using System.Text;
-
-namespace System {
-
- [Serializable]
- [ComVisible (true)]
- public sealed class ApplicationId {
-
- private byte[] _token;
- private string _name;
- private Version _version;
- private string _proc;
- private string _culture;
-
- public ApplicationId (byte[] publicKeyToken, string name, Version version, string processorArchitecture, string culture)
- {
- if (publicKeyToken == null)
- throw new ArgumentNullException ("publicKeyToken");
- if (name == null)
- throw new ArgumentNullException ("name");
- if (version == null)
- throw new ArgumentNullException ("version");
-
- _token = (byte[]) publicKeyToken.Clone ();
- _name = name;
- _version = version;
- _proc = processorArchitecture;
- _culture = culture;
- }
-
- // properties
-
- public string Culture {
- get { return _culture; }
- }
-
- public string Name {
- get { return _name; }
- }
-
- public string ProcessorArchitecture {
- get { return _proc; }
- }
-
- public byte[] PublicKeyToken {
- get { return (byte[]) _token.Clone (); }
- }
-
- public Version Version {
- get { return _version; }
- }
-
- // methods
-
- public ApplicationId Copy ()
- {
- return new ApplicationId (_token, _name, _version, _proc, _culture);
- }
-
- public override bool Equals (object o)
- {
- if (o == null)
- return false;
- ApplicationId appid = (o as ApplicationId);
- if (appid == null)
- return false;
- if (_name != appid._name)
- return false;
- if (_proc != appid._proc)
- return false;
- if (_culture != appid._culture)
- return false;
- if (!_version.Equals (appid._version))
- return false;
- if (_token.Length != appid._token.Length)
- return false;
- for (int i=0; i < _token.Length; i++)
- if (_token [i] != appid._token [i])
- return false;
- return true;
- }
-
- public override int GetHashCode ()
- {
- int code = _name.GetHashCode () ^ _version.GetHashCode ();
- for (int i=0; i < _token.Length; i++)
- code ^= _token [i];
- // ProcessorArchitecture and Culture aren't part of the hash code
- // Confirmed by Microsoft in FDBK13339
- return code;
- }
-
- public override string ToString ()
- {
- StringBuilder sb = new StringBuilder ();
- sb.Append (_name);
- if (_culture != null)
- sb.AppendFormat (", culture=\"{0}\"", _culture);
- sb.AppendFormat (", version=\"{0}\", publicKeyToken=\"", _version);
- for (int i=0; i < _token.Length; i++)
- sb.Append (_token [i].ToString ("X2"));
- if (_proc != null)
- sb.AppendFormat ("\", processorArchitecture =\"{0}\"", _proc);
- else
- sb.Append ("\"");
- return sb.ToString ();
- }
- }
-}
if (count < 0 || startIndex < array.GetLowerBound (0) || startIndex - 1 > array.GetUpperBound (0) - count)
throw new ArgumentOutOfRangeException ();
- return EqualityComparer<T>.Default.IndexOf (array, value, startIndex, startIndex + count);
+ return EqualityComparer<T>.Default.IndexOf (array, value, startIndex, count);
}
public static int LastIndexOf<T> (T [] array, T value)
+++ /dev/null
-//
-// System.AsyncCallback.cs
-//
-// Author:
-// Paolo Molaro (lupus@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
-{
- [System.Runtime.InteropServices.ComVisible (true)]
- [Serializable]
- public delegate void AsyncCallback (IAsyncResult ar);
-}
+++ /dev/null
-//
-// System.Buffer.cs
-//
-// Authors:
-// Paolo Molaro (lupus@ximian.com)
-// Dan Lewis (dihlewis@yahoo.co.uk)
-//
-// (C) 2001 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.
-//
-
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
-
-namespace System {
- [ComVisible (true)]
- public static class Buffer {
-
- public static int ByteLength (Array array)
- {
- // note: the other methods in this class also use ByteLength to test for
- // null and non-primitive arguments as a side-effect.
-
- if (array == null)
- throw new ArgumentNullException ("array");
-
- int length = ByteLengthInternal (array);
- if (length < 0)
- throw new ArgumentException (Locale.GetText ("Object must be an array of primitives."));
-
- return length;
- }
-
- public static byte GetByte (Array array, int index)
- {
- if (index < 0 || index >= ByteLength (array))
- throw new ArgumentOutOfRangeException ("index", Locale.GetText(
- "Value must be non-negative and less than the size of the collection."));
-
- return GetByteInternal (array, index);
- }
-
- public static void SetByte (Array array, int index, byte value)
- {
- if (index < 0 || index >= ByteLength (array))
- throw new ArgumentOutOfRangeException ("index", Locale.GetText(
- "Value must be non-negative and less than the size of the collection."));
-
- SetByteInternal (array, index, value);
- }
-
- public static void BlockCopy (Array src, int srcOffset, Array dst, int dstOffset, int count)
- {
- if (src == null)
- throw new ArgumentNullException ("src");
-
- if (dst == null)
- throw new ArgumentNullException ("dst");
-
- if (srcOffset < 0)
- throw new ArgumentOutOfRangeException ("srcOffset", Locale.GetText(
- "Non-negative number required."));
-
- if (dstOffset < 0)
- throw new ArgumentOutOfRangeException ("dstOffset", Locale.GetText (
- "Non-negative number required."));
-
- if (count < 0)
- throw new ArgumentOutOfRangeException ("count", Locale.GetText (
- "Non-negative number required."));
-
- // We do the checks in unmanaged code for performance reasons
- bool res = BlockCopyInternal (src, srcOffset, dst, dstOffset, count);
- if (!res) {
- // watch for integer overflow
- if ((srcOffset > ByteLength (src) - count) || (dstOffset > ByteLength (dst) - count))
- throw new ArgumentException (Locale.GetText (
- "Offset and length were out of bounds for the array or count is greater than " +
- "the number of elements from index to the end of the source collection."));
- }
- }
-
- // private
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern static int ByteLengthInternal (Array array);
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern static byte GetByteInternal (Array array, int index);
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern static void SetByteInternal (Array array, int index, int value);
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- internal extern static bool BlockCopyInternal (Array src, int src_offset, Array dest, int dest_offset, int count);
-
- internal static bool InternalBlockCopy (Array src, int src_offset, Array dest, int dest_offset, int count)
- {
- return BlockCopyInternal (src, src_offset, dest, dest_offset, count);
- }
-
- internal unsafe static void ZeroMemory (byte* src, long len)
- {
- while(len-- > 0)
- *(src + len) = 0;
- }
-
- internal unsafe static void Memcpy (byte* pDest, int destIndex, byte[] src, int srcIndex, int len)
- {
- Contract.Assert( (srcIndex >= 0) && (destIndex >= 0) && (len >= 0), "Index and length must be non-negative!");
- Contract.Assert(src.Length - srcIndex >= len, "not enough bytes in src");
- // If dest has 0 elements, the fixed statement will throw an
- // IndexOutOfRangeException. Special-case 0-byte copies.
- if (len==0)
- return;
- fixed(byte* pSrc = src) {
- Memcpy(pDest + destIndex, pSrc + srcIndex, len);
- }
- }
-
- internal unsafe static void Memcpy(byte[] dest, int destIndex, byte* src, int srcIndex, int len) {
- Contract.Assert( (srcIndex >= 0) && (destIndex >= 0) && (len >= 0), "Index and length must be non-negative!");
- Contract.Assert(dest.Length - destIndex >= len, "not enough bytes in dest");
- // If dest has 0 elements, the fixed statement will throw an
- // IndexOutOfRangeException. Special-case 0-byte copies.
- if (len==0)
- return;
- fixed(byte* pDest = dest) {
- Memcpy(pDest + destIndex, src + srcIndex, len);
- }
- }
-
- internal static unsafe void memcpy4 (byte *dest, byte *src, int size) {
- /*while (size >= 32) {
- // using long is better than int and slower than double
- // FIXME: enable this only on correct alignment or on platforms
- // that can tolerate unaligned reads/writes of doubles
- ((double*)dest) [0] = ((double*)src) [0];
- ((double*)dest) [1] = ((double*)src) [1];
- ((double*)dest) [2] = ((double*)src) [2];
- ((double*)dest) [3] = ((double*)src) [3];
- dest += 32;
- src += 32;
- size -= 32;
- }*/
- while (size >= 16) {
- ((int*)dest) [0] = ((int*)src) [0];
- ((int*)dest) [1] = ((int*)src) [1];
- ((int*)dest) [2] = ((int*)src) [2];
- ((int*)dest) [3] = ((int*)src) [3];
- dest += 16;
- src += 16;
- size -= 16;
- }
- while (size >= 4) {
- ((int*)dest) [0] = ((int*)src) [0];
- dest += 4;
- src += 4;
- size -= 4;
- }
- while (size > 0) {
- ((byte*)dest) [0] = ((byte*)src) [0];
- dest += 1;
- src += 1;
- --size;
- }
- }
- internal static unsafe void memcpy2 (byte *dest, byte *src, int size) {
- while (size >= 8) {
- ((short*)dest) [0] = ((short*)src) [0];
- ((short*)dest) [1] = ((short*)src) [1];
- ((short*)dest) [2] = ((short*)src) [2];
- ((short*)dest) [3] = ((short*)src) [3];
- dest += 8;
- src += 8;
- size -= 8;
- }
- while (size >= 2) {
- ((short*)dest) [0] = ((short*)src) [0];
- dest += 2;
- src += 2;
- size -= 2;
- }
- if (size > 0)
- ((byte*)dest) [0] = ((byte*)src) [0];
- }
- static unsafe void memcpy1 (byte *dest, byte *src, int size) {
- while (size >= 8) {
- ((byte*)dest) [0] = ((byte*)src) [0];
- ((byte*)dest) [1] = ((byte*)src) [1];
- ((byte*)dest) [2] = ((byte*)src) [2];
- ((byte*)dest) [3] = ((byte*)src) [3];
- ((byte*)dest) [4] = ((byte*)src) [4];
- ((byte*)dest) [5] = ((byte*)src) [5];
- ((byte*)dest) [6] = ((byte*)src) [6];
- ((byte*)dest) [7] = ((byte*)src) [7];
- dest += 8;
- src += 8;
- size -= 8;
- }
- while (size >= 2) {
- ((byte*)dest) [0] = ((byte*)src) [0];
- ((byte*)dest) [1] = ((byte*)src) [1];
- dest += 2;
- src += 2;
- size -= 2;
- }
- if (size > 0)
- ((byte*)dest) [0] = ((byte*)src) [0];
- }
-
- internal static unsafe void Memcpy (byte *dest, byte *src, int size) {
- // FIXME: if pointers are not aligned, try to align them
- // so a faster routine can be used. Handle the case where
- // the pointers can't be reduced to have the same alignment
- // (just ignore the issue on x86?)
- if ((((int)dest | (int)src) & 3) != 0) {
- if (((int)dest & 1) != 0 && ((int)src & 1) != 0 && size >= 1) {
- dest [0] = src [0];
- ++dest;
- ++src;
- --size;
- }
- if (((int)dest & 2) != 0 && ((int)src & 2) != 0 && size >= 2) {
- ((short*)dest) [0] = ((short*)src) [0];
- dest += 2;
- src += 2;
- size -= 2;
- }
- if ((((int)dest | (int)src) & 1) != 0) {
- memcpy1 (dest, src, size);
- return;
- }
- if ((((int)dest | (int)src) & 2) != 0) {
- memcpy2 (dest, src, size);
- return;
- }
- }
- memcpy4 (dest, src, size);
- }
- }
-}
+++ /dev/null
-//
-// Comparison.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004 Novell
-//
-// 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
-{
- public delegate int Comparison <in T> (T x, T y);
-}
-
+++ /dev/null
-//
-// System.ConsoleCancelEventArgs
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- [Serializable]
- public sealed class ConsoleCancelEventArgs : EventArgs {
- bool cancel;
- ConsoleSpecialKey specialKey;
-
- internal ConsoleCancelEventArgs (ConsoleSpecialKey key)
- {
- specialKey = key;
- }
-
- public bool Cancel {
- get { return cancel; }
- set { cancel = value; }
- }
-
- public ConsoleSpecialKey SpecialKey {
- get { return specialKey; }
- }
- }
-}
-
+++ /dev/null
-//
-// System.ConsoleCancelEventHandler
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- public delegate void ConsoleCancelEventHandler (object sender, ConsoleCancelEventArgs e);
-}
-
+++ /dev/null
-//
-// System.ConsoleColor
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- [Serializable]
- public enum ConsoleColor {
- Black,
- DarkBlue,
- DarkGreen,
- DarkCyan,
- DarkRed,
- DarkMagenta,
- DarkYellow,
- Gray,
- DarkGray,
- Blue,
- Green,
- Cyan,
- Red,
- Magenta,
- Yellow,
- White
- }
-}
-
+++ /dev/null
-//
-// System.ConsoleKey
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
-
- [Serializable]
- public enum ConsoleKey {
- Backspace = 8,
- Tab = 9,
- Clear = 12,
- Enter = 13,
- Pause = 19,
- Escape = 27,
- Spacebar = 32,
- PageUp = 33,
- PageDown = 34,
- End = 35,
- Home = 36,
- LeftArrow = 37,
- UpArrow = 38,
- RightArrow = 39,
- DownArrow = 40,
- Select = 41,
- Print = 42,
- Execute = 43,
- PrintScreen = 44,
- Insert = 45,
- Delete = 46,
- Help = 47,
- D0 = 48,
- D1 = 49,
- D2 = 50,
- D3 = 51,
- D4 = 52,
- D5 = 53,
- D6 = 54,
- D7 = 55,
- D8 = 56,
- D9 = 57,
- A = 65,
- B = 66,
- C = 67,
- D = 68,
- E = 69,
- F = 70,
- G = 71,
- H = 72,
- I = 73,
- J = 74,
- K = 75,
- L = 76,
- M = 77,
- N = 78,
- O = 79,
- P = 80,
- Q = 81,
- R = 82,
- S = 83,
- T = 84,
- U = 85,
- V = 86,
- W = 87,
- X = 88,
- Y = 89,
- Z = 90,
- LeftWindows = 91,
- RightWindows = 92,
- Applications = 93,
- Sleep = 95,
- NumPad0 = 96,
- NumPad1 = 97,
- NumPad2 = 98,
- NumPad3 = 99,
- NumPad4 = 100,
- NumPad5 = 101,
- NumPad6 = 102,
- NumPad7 = 103,
- NumPad8 = 104,
- NumPad9 = 105,
- Multiply = 106,
- Add = 107,
- Separator = 108,
- Subtract = 109,
- Decimal = 110,
- Divide = 111,
- F1 = 112,
- F2 = 113,
- F3 = 114,
- F4 = 115,
- F5 = 116,
- F6 = 117,
- F7 = 118,
- F8 = 119,
- F9 = 120,
- F10 = 121,
- F11 = 122,
- F12 = 123,
- F13 = 124,
- F14 = 125,
- F15 = 126,
- F16 = 127,
- F17 = 128,
- F18 = 129,
- F19 = 130,
- F20 = 131,
- F21 = 132,
- F22 = 133,
- F23 = 134,
- F24 = 135,
- BrowserBack = 166,
- BrowserForward = 167,
- BrowserRefresh = 168,
- BrowserStop = 169,
- BrowserSearch = 170,
- BrowserFavorites = 171,
- BrowserHome = 172,
- VolumeMute = 173,
- VolumeDown = 174,
- VolumeUp = 175,
- MediaNext = 176,
- MediaPrevious = 177,
- MediaStop = 178,
- MediaPlay = 179,
- LaunchMail = 180,
- LaunchMediaSelect = 181,
- LaunchApp1 = 182,
- LaunchApp2 = 183,
- Oem1 = 186,
- OemPlus = 187,
- OemComma = 188,
- OemMinus = 189,
- OemPeriod = 190,
- Oem2 = 191,
- Oem3 = 192,
- Oem4 = 219,
- Oem5 = 220,
- Oem6 = 221,
- Oem7 = 222,
- Oem8 = 223,
- Oem102 = 226,
- Process = 229,
- Packet = 231,
- Attention = 246,
- CrSel = 247,
- ExSel = 248,
- EraseEndOfFile = 249,
- Play = 250,
- Zoom = 251,
- NoName = 252,
- Pa1 = 253,
- OemClear = 254,
- }
-}
-
+++ /dev/null
-//
-// System.ConsoleKeyInfo.cs
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- [Serializable]
- public struct ConsoleKeyInfo {
- internal static ConsoleKeyInfo Empty = new ConsoleKeyInfo ('\0', 0, false, false, false);
- ConsoleKey _key;
- char _keyChar;
- ConsoleModifiers _mods;
-
- public ConsoleKeyInfo (char keyChar, ConsoleKey key, bool shift, bool alt, bool control)
- {
- _key = key;
- _keyChar = keyChar;
- _mods = 0;
- SetModifiers (shift, alt, control);
- }
-
- internal ConsoleKeyInfo (ConsoleKeyInfo other)
- {
- _key = other._key;
- _keyChar = other._keyChar;
- _mods = other._mods;
- }
-
- internal void SetKey (ConsoleKey key)
- {
- _key = key;
- }
-
- internal void SetKeyChar (char keyChar)
- {
- _keyChar = keyChar;
- }
-
- internal void SetModifiers (bool shift, bool alt, bool control)
- {
- _mods = (shift) ? ConsoleModifiers.Shift : 0;
- _mods |= (alt) ? ConsoleModifiers.Alt : 0;
- _mods |= (control) ? ConsoleModifiers.Control : 0;
- }
-
- public ConsoleKey Key
- {
- get { return _key; }
- }
-
- public char KeyChar
- {
- get { return _keyChar; }
- }
-
- public ConsoleModifiers Modifiers
- {
- get { return _mods; }
- }
-
- public override bool Equals (object value)
- {
- if (!(value is ConsoleKeyInfo))
- return false;
-
- return Equals ((ConsoleKeyInfo) value);
- }
-
- public static bool operator == (ConsoleKeyInfo a, ConsoleKeyInfo b)
- {
- return a.Equals (b);
- }
-
- public static bool operator != (ConsoleKeyInfo a, ConsoleKeyInfo b)
- {
- return !a.Equals (b);
- }
-
- public bool Equals (ConsoleKeyInfo obj)
- {
- return _key == obj._key && _keyChar == obj._keyChar && _mods == obj._mods;
- }
-
- public override int GetHashCode ()
- {
- return _key.GetHashCode () ^ _keyChar.GetHashCode () ^ _mods.GetHashCode ();
- }
- }
-}
+++ /dev/null
-//
-// System.ConsoleModifiers
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- [Flags]
- [Serializable]
- public enum ConsoleModifiers {
- Alt = 1,
- Shift = 2,
- Control = 4
- }
-}
-
+++ /dev/null
-//
-// System.ConsoleSpecialKey
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (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 {
- [Serializable]
- public enum ConsoleSpecialKey {
- ControlC,
- ControlBreak
- }
-}
-
-
+++ /dev/null
-//
-// System.ContextBoundObject.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System
-{
- [Serializable]
- [ComVisible (true)]
- public abstract class ContextBoundObject : MarshalByRefObject
- {
- protected ContextBoundObject ()
- {
- }
- }
-}
+++ /dev/null
-//
-// Converter.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004 Novell
-//
-// 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
-{
- public delegate TOutput Converter <in TInput, out TOutput> (TInput input);
-}
* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 125;
+ private const int mono_corlib_version = 127;
#pragma warning restore 169
[ComVisible (true)]
+++ /dev/null
-//
-// System.EventArgs.cs
-//
-// Author:
-// Michael Lambert (michaellambert@email.com)
-//
-// (C) 2001 Michael Lambert, 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;
-
-namespace System
-{
- [Serializable]
- [ComVisible (true)]
- public class EventArgs
- {
- public static readonly EventArgs Empty = new EventArgs ();
-
- public EventArgs ()
- {
- }
- }
-}
+++ /dev/null
-//
-// System.EventHandler.cs
-//
-// Author:
-// Miguel de Icaza (miguel@ximian.com)
-// Marek Safar (marek.safar@gmail.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]
- public delegate void EventHandler<TEventArgs> (object sender, TEventArgs e)
- ;
-
- [Serializable]
- [System.Runtime.InteropServices.ComVisible (true)]
- public delegate void EventHandler (object sender, EventArgs e);
-}
+++ /dev/null
-//
-// System.Func.cs
-//
-// Authors:
-// Alejandro Serrano "Serras" (trupill@yahoo.es)
-// Marek Safar (marek.safar@gmail.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 TArg 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
-//
-
-using System.Runtime.CompilerServices;
-
-namespace System {
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate TResult Func<out TResult> ();
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate TResult Func<in T, out TResult> (T arg);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate TResult Func<in T1, in T2, out TResult> (T1 arg1, T2 arg2);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate TResult Func<in T1, in T2, in T3, out TResult> (T1 arg1, T2 arg2, T3 arg3);
-
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public delegate TResult Func<in T1, in T2, in T3, in T4, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-
- public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
- public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
- public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
- public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-}
+++ /dev/null
-//
-// System.IAppDomainSetup.cs
-//
-// Author:
-// Dietmar Maurer (dietmar@ximian.com)
-//
-// (C) 2001 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.
-//
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
- [Guid ("27FFF232-A7A8-40DD-8D4A-734AD59FCD41")]
- [ComVisible(true)]
- public interface IAppDomainSetup {
-
- string ApplicationBase { get; set; }
-
- string ApplicationName { get; set; }
-
- string CachePath { get; set; }
-
- string ConfigurationFile { get; set; }
-
- string DynamicBase { get; set; }
-
- string LicenseFile { get; set; }
-
- string PrivateBinPath { get; set; }
-
- string PrivateBinPathProbe { get; set; }
-
- string ShadowCopyDirectories { get; set; }
-
- string ShadowCopyFiles { get; set; }
- }
-}
+++ /dev/null
-//
-// System.IApplicationDescription interface
-//
-// Author:
-// Sebastien Pouliot <sebastien@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 {
-
- public interface IApplicationDescription : ICloneable {
-
- string ApplicationCodeBase {
- get;
- }
-
- string ApplicationManifest {
- get;
- }
-
- string ApplicationManifestPath {
- get;
- }
-
- string DeploymentCodeBase {
- get;
- }
-
- string DeploymentManifest {
- get;
- }
-
- string DeploymentManifestPath {
- get;
- }
- }
-}
+++ /dev/null
-//------------------------------------------------------------------------------
-//
-// System.IAsyncResult.cs
-//
-// Copyright (C) 2001 Michael Lambert, All Rights Reserved
-//
-// Author: Michael Lambert, michaellambert@email.com
-// Created: Mon 08/24/2001
-//
-//------------------------------------------------------------------------------
-//
-// 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;
-using System.Threading;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface IAsyncResult
- {
- object AsyncState
- {
- get;
- }
-
- WaitHandle AsyncWaitHandle
- {
- get;
- }
-
- bool CompletedSynchronously
- {
- get;
- }
-
- bool IsCompleted
- {
- get;
- }
- }
-
-} // Namespace System
-
-
+++ /dev/null
-//
-// System.ICloneable.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
- [ComVisible(true)]
-#if INSIDE_CORLIB
- public
-#else
- internal
-#endif
- interface ICloneable {
- object Clone ();
- }
-}
+++ /dev/null
-//
-// System.IComparable.cs
-//
-// Author:
-// Miguel de Icaza (miguel@ximian.com)
-// Marek Safar (marek.safar@gmail.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface IComparable {
- int CompareTo (object obj);
- }
-
- public interface IComparable <in T> {
- int CompareTo (T other);
- }
-}
+++ /dev/null
-//
-// System.IConvertible.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.
-//
-
-//
-// Functions Implementing this interface should check out
-// System.Convert. Most of these methods are implemented
-// there for all these data types.
-//
-// System.Convert has ToType helper method for the object
-// ToType (Type conversionType, IFormatProvider provider)
-// method. In most cases you can specify your ToType function
-// as calling
-//
-// public Type value; // value of this data type
-// public object ToType(Type conversionType, IFormatProvider provider) {
-// Convert.ToType (value, conversionType, provider);
-// }
-//
-// Which is just a wrapper for your ToType methods.
-//
-// See http://lists.ximian.com/archives/public/mono-list/2001-July/000525.html
-// for more discussion on the topic
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- [CLSCompliant(false)]
- public interface IConvertible {
-
- TypeCode GetTypeCode ();
-
- bool ToBoolean (IFormatProvider provider);
- byte ToByte (IFormatProvider provider);
- char ToChar (IFormatProvider provider);
- DateTime ToDateTime (IFormatProvider provider);
- decimal ToDecimal (IFormatProvider provider);
- double ToDouble (IFormatProvider provider);
- short ToInt16 (IFormatProvider provider);
- int ToInt32 (IFormatProvider provider);
- long ToInt64 (IFormatProvider provider);
- sbyte ToSByte (IFormatProvider provider);
- float ToSingle (IFormatProvider provider);
- string ToString (IFormatProvider provider);
- object ToType (Type conversionType, IFormatProvider provider);
- ushort ToUInt16 (IFormatProvider provider);
- uint ToUInt32 (IFormatProvider provider);
- ulong ToUInt64 (IFormatProvider provider);
- }
-}
+++ /dev/null
-//
-// System.ICustomFormatter.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface ICustomFormatter {
- string Format (string format, object arg, IFormatProvider formatProvider);
- }
-}
+++ /dev/null
-//
-// System.IDisposable.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface IDisposable {
-
- void Dispose ();
-
- }
-}
+++ /dev/null
-//
-// System.IEquatable.cs
-//
-// Author:
-// Ben Maurer <bmaurer@novell.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 {
- public interface IEquatable <T> {
- bool Equals (T other);
- }
-}
+++ /dev/null
-//
-// System.IFormatProvider.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface IFormatProvider {
- object GetFormat (Type formatType);
- }
-}
+++ /dev/null
-//
-// System.IFormattable.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.
-//
-using System.Runtime.InteropServices;
-
-namespace System {
-
- [ComVisible(true)]
- public interface IFormattable {
- string ToString (string format, IFormatProvider formatProvider);
- }
-}
+++ /dev/null
-//
-// System.IHostContext interface
-//
-// Author:
-// Sebastien Pouliot <sebastien@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 {
-
- public interface IHostContext {
-
- bool AssumeTrust {
- get;
- }
-
- bool ExclusiveGrant {
- get;
- }
-
- bool IsFirstTimeInstall {
- get;
- }
-
- bool NoPrompt {
- get;
- }
-
- bool Persist {
- get;
- }
- }
-}
+++ /dev/null
-//
-// IObservable.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2009 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
-{
- public interface IObservable<out T>
- {
- IDisposable Subscribe (IObserver<T> observer);
- }
-}
-
+++ /dev/null
-//
-// IObserver.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2009 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
-{
- public interface IObserver<in T>
- {
- void OnCompleted ();
- void OnError (Exception error);
- void OnNext(T value);
- }
-}
-
+++ /dev/null
-//
-// IProgress.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2011 Xamarin, Inc (http://www.xamarin.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
-{
- public interface IProgress<in T>
- {
- void Report (T value);
- }
-}
-
+++ /dev/null
-//
-// System.IServiceProvider.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.
-//
-
-using System.Runtime.InteropServices;
-
-namespace System
-{
- public interface IServiceProvider
- {
- object GetService (Type serviceType);
- }
-}
+++ /dev/null
-/*
- * System.InvalidimeZoneException
- *
- * Author(s)
- * Stephane Delcroix <stephane@delcroix.org>
- *
- * 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.CompilerServices;
-
-namespace System
-{
- [Serializable]
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public
- class InvalidTimeZoneException : Exception
- {
- public InvalidTimeZoneException () : base ()
- {}
-
- public InvalidTimeZoneException (string message) : base (message)
- {}
-
- public InvalidTimeZoneException (string message, Exception innerException) : base (message, innerException)
- {}
-
- protected InvalidTimeZoneException (Runtime.Serialization.SerializationInfo info, Runtime.Serialization.StreamingContext context) : base (info, context)
- {}
- }
-}
using System.Runtime.InteropServices;
using System.Text;
namespace System {
- class NullConsoleDriver : IConsoleDriver {
+ class NullConsoleDriver : IConsoleDriver
+ {
+ static readonly ConsoleKeyInfo EmptyConsoleKeyInfo = new ConsoleKeyInfo ('\0', 0, false, false, false);
+
public ConsoleColor BackgroundColor {
get { return ConsoleColor.Black; }
set {
public ConsoleKeyInfo ReadKey (bool intercept)
{
- return ConsoleKeyInfo.Empty;
+ return EmptyConsoleKeyInfo;
}
public void ResetColor ()
+++ /dev/null
-//
-// System.Predicate.cs
-//
-// Authors:
-// Ben Maurer (bmaurer@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2004 Novell
-//
-// 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
-{
- public delegate bool Predicate <in T> (T obj);
-}
-
length++;
byte [] result = new byte [length];
- Buffer.BlockCopyInternal (buffer, offset, result, 0, length);
+ Buffer.InternalBlockCopy (buffer, offset, result, 0, length);
return result;
}
+++ /dev/null
-/*
- * System.TimeZoneInfo.AdjustmentRule
- *
- * Author(s)
- * Stephane Delcroix <stephane@delcroix.org>
- *
- * 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.CompilerServices;
-using System.Runtime.Serialization;
-
-namespace System
-{
- public
- sealed partial class TimeZoneInfo {
- [SerializableAttribute]
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public sealed class AdjustmentRule : IEquatable<TimeZoneInfo.AdjustmentRule>, ISerializable, IDeserializationCallback
- {
- DateTime dateEnd;
- public DateTime DateEnd {
- get { return dateEnd; }
- }
-
- DateTime dateStart;
- public DateTime DateStart {
- get { return dateStart; }
- }
-
- TimeSpan daylightDelta;
- public TimeSpan DaylightDelta {
- get { return daylightDelta; }
- }
-
- TransitionTime daylightTransitionEnd;
- public TransitionTime DaylightTransitionEnd {
- get { return daylightTransitionEnd; }
- }
-
- TransitionTime daylightTransitionStart;
- public TransitionTime DaylightTransitionStart {
- get { return daylightTransitionStart; }
- }
-
- public static AdjustmentRule CreateAdjustmentRule (
- DateTime dateStart,
- DateTime dateEnd,
- TimeSpan daylightDelta,
- TransitionTime daylightTransitionStart,
- TransitionTime daylightTransitionEnd)
- {
- return new AdjustmentRule (dateStart, dateEnd, daylightDelta, daylightTransitionStart, daylightTransitionEnd);
- }
-
- private AdjustmentRule (SerializationInfo info, StreamingContext context)
- {
- if (info == null)
- throw new ArgumentNullException ("info");
- dateStart = (DateTime) info.GetValue ("DateStart", typeof (DateTime));
- dateEnd = (DateTime) info.GetValue ("DateEnd", typeof (DateTime));
- daylightDelta = (TimeSpan) info.GetValue ("DaylightDelta", typeof (TimeSpan));
- daylightTransitionStart = (TimeZoneInfo.TransitionTime) info.GetValue ("DaylightTransitionStart", typeof (TimeZoneInfo.TransitionTime));
- daylightTransitionEnd = (TimeZoneInfo.TransitionTime) info.GetValue ("DaylightTransitionEnd", typeof (TimeZoneInfo.TransitionTime));
- }
-
- private AdjustmentRule (
- DateTime dateStart,
- DateTime dateEnd,
- TimeSpan daylightDelta,
- TransitionTime daylightTransitionStart,
- TransitionTime daylightTransitionEnd)
- {
- if (dateStart.Kind != DateTimeKind.Unspecified || dateEnd.Kind != DateTimeKind.Unspecified)
- throw new ArgumentException ("the Kind property of dateStart or dateEnd parameter does not equal DateTimeKind.Unspecified");
-
- if (daylightTransitionStart == daylightTransitionEnd)
- throw new ArgumentException ("daylightTransitionStart parameter cannot equal daylightTransitionEnd parameter");
-
- if (dateStart.Ticks % TimeSpan.TicksPerDay != 0 || dateEnd.Ticks % TimeSpan.TicksPerDay != 0)
- throw new ArgumentException ("dateStart or dateEnd parameter includes a time of day value");
-
- if (dateEnd < dateStart)
- throw new ArgumentOutOfRangeException ("dateEnd is earlier than dateStart");
-
- if (daylightDelta > new TimeSpan (14, 0, 0) || daylightDelta < new TimeSpan (-14, 0, 0))
- throw new ArgumentOutOfRangeException ("daylightDelta is less than -14 or greater than 14 hours");
-
- if (daylightDelta.Ticks % TimeSpan.TicksPerSecond != 0)
- throw new ArgumentOutOfRangeException ("daylightDelta parameter does not represent a whole number of seconds");
-
- this.dateStart = dateStart;
- this.dateEnd = dateEnd;
- this.daylightDelta = daylightDelta;
- this.daylightTransitionStart = daylightTransitionStart;
- this.daylightTransitionEnd = daylightTransitionEnd;
- }
-
- public bool Equals (TimeZoneInfo.AdjustmentRule other)
- {
- return dateStart == other.dateStart &&
- dateEnd == other.dateEnd &&
- daylightDelta == other.daylightDelta &&
- daylightTransitionStart == other.daylightTransitionStart &&
- daylightTransitionEnd == other.daylightTransitionEnd;
- }
-
- public override int GetHashCode ()
- {
- return dateStart.GetHashCode () ^
- dateEnd.GetHashCode () ^
- daylightDelta.GetHashCode () ^
- daylightTransitionStart.GetHashCode () ^
- daylightTransitionEnd.GetHashCode ();
- }
-
- void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
- {
- if (info == null)
- throw new ArgumentNullException ("info");
- info.AddValue ("DateStart", DateStart);
- info.AddValue ("DateEnd", DateEnd);
- info.AddValue ("DaylightDelta", DaylightDelta);
- info.AddValue ("DaylightTransitionStart", DaylightTransitionStart);
- info.AddValue ("DaylightTransitionEnd", DaylightTransitionEnd);
- }
- void IDeserializationCallback.OnDeserialization (object sender)
- {
- try {
- TimeZoneInfo.AdjustmentRule.Validate (dateStart, dateEnd, daylightDelta,
- daylightTransitionStart, daylightTransitionEnd);
- } catch (ArgumentException ex) {
- throw new SerializationException ("invalid serialization data", ex);
- }
- }
-
- private static void Validate (
- DateTime dateStart,
- DateTime dateEnd,
- TimeSpan daylightDelta,
- TransitionTime daylightTransitionStart,
- TransitionTime daylightTransitionEnd)
- {
- if (dateStart.Kind != DateTimeKind.Unspecified || dateEnd.Kind != DateTimeKind.Unspecified)
- throw new ArgumentException ("the Kind property of dateStart or dateEnd parameter does not equal DateTimeKind.Unspecified");
-
- if (daylightTransitionStart == daylightTransitionEnd)
- throw new ArgumentException ("daylightTransitionStart parameter cannot equal daylightTransitionEnd parameter");
-
- if (dateStart.Ticks % TimeSpan.TicksPerDay != 0 || dateEnd.Ticks % TimeSpan.TicksPerDay != 0)
- throw new ArgumentException ("dateStart or dateEnd parameter includes a time of day value");
-
- if (dateEnd < dateStart)
- throw new ArgumentOutOfRangeException ("dateEnd is earlier than dateStart");
-
- if (daylightDelta > new TimeSpan (14, 0, 0) || daylightDelta < new TimeSpan (-14, 0, 0))
- throw new ArgumentOutOfRangeException ("daylightDelta is less than -14 or greater than 14 hours");
-
- if (daylightDelta.Ticks % TimeSpan.TicksPerSecond != 0)
- throw new ArgumentOutOfRangeException ("daylightDelta parameter does not represent a whole number of seconds");
- }
- }
- }
-}
+++ /dev/null
-/*
- * System.TimeZoneInfo.TransitionTime
- *
- * Author(s)
- * Stephane Delcroix <stephane@delcroix.org>
- *
- * 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.CompilerServices;
-using System.Runtime.Serialization;
-
-namespace System
-{
- public
- sealed partial class TimeZoneInfo
- {
- [SerializableAttribute]
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public struct TransitionTime : IEquatable<TimeZoneInfo.TransitionTime>, ISerializable, IDeserializationCallback
- {
- DateTime timeOfDay;
- public DateTime TimeOfDay {
- get { return timeOfDay; }
- }
-
- int month;
- public int Month {
- get { return month; }
- }
-
- int day;
- public int Day {
- get {
-#if STRICT
- if (!isFixedDateRule)
- throw new Exception ("Day property is not valid for floating date rules");
-#endif
- return day;
- }
- }
-
- int week;
- public int Week {
- get {
-#if STRICT
- if (isFixedDateRule)
- throw new Exception ("Week property is not valid for fixed date rules");
-#endif
-
- return week;
- }
- }
-
- DayOfWeek dayOfWeek;
- public DayOfWeek DayOfWeek {
- get {
-#if STRICT
- if (isFixedDateRule)
- throw new Exception ("DayOfWeek property is not valid for fixed date rules");
-#endif
-
- return dayOfWeek;
- }
- }
-
- bool isFixedDateRule;
- public bool IsFixedDateRule {
- get { return isFixedDateRule; }
- }
-
- public static TransitionTime CreateFixedDateRule (
- DateTime timeOfDay,
- int month,
- int day)
- {
- return new TransitionTime (timeOfDay, month, day);
- }
-
- public static TransitionTime CreateFloatingDateRule (
- DateTime timeOfDay,
- int month,
- int week,
- DayOfWeek dayOfWeek)
- {
- return new TransitionTime (timeOfDay, month, week, dayOfWeek);
- }
-
- private TransitionTime (SerializationInfo info, StreamingContext context)
- {
- if (info == null)
- throw new ArgumentNullException ("info");
- timeOfDay = (DateTime) info.GetValue ("TimeOfDay", typeof (DateTime));
- month = (byte) info.GetValue ("Month", typeof (byte));
- week = (byte) info.GetValue ("Week", typeof (byte));
- day = (byte) info.GetValue ("Day", typeof (byte));
- dayOfWeek = (DayOfWeek) info.GetValue ("DayOfWeek", typeof (DayOfWeek));
- isFixedDateRule = (bool) info.GetValue ("IsFixedDateRule", typeof (bool));
-
- if (isFixedDateRule)
- {
- week = -1;
- dayOfWeek = (DayOfWeek) (-1);
- }
- if (!isFixedDateRule)
- day = -1;
- }
-
- private TransitionTime (
- DateTime timeOfDay,
- int month,
- int day) : this (timeOfDay, month)
- {
- if (day < 1 || day > 31)
- throw new ArgumentOutOfRangeException ("day parameter is less than 1 or greater than 31");
-
- this.day = day;
- this.isFixedDateRule = true;
- }
-
- private TransitionTime (
- DateTime timeOfDay,
- int month,
- int week,
- DayOfWeek dayOfWeek) : this (timeOfDay, month)
- {
- if (week < 1 || week > 5)
- throw new ArgumentOutOfRangeException ("week parameter is less than 1 or greater than 5");
-
- if (dayOfWeek != DayOfWeek.Sunday &&
- dayOfWeek != DayOfWeek.Monday &&
- dayOfWeek != DayOfWeek.Tuesday &&
- dayOfWeek != DayOfWeek.Wednesday &&
- dayOfWeek != DayOfWeek.Thursday &&
- dayOfWeek != DayOfWeek.Friday &&
- dayOfWeek != DayOfWeek.Saturday)
- throw new ArgumentOutOfRangeException ("dayOfWeek parameter is not a member od DayOfWeek enumeration");
-
- this.week = week;
- this.dayOfWeek = dayOfWeek;
- this.isFixedDateRule = false;
- }
-
- private TransitionTime (
- DateTime timeOfDay,
- int month)
- {
- if (timeOfDay.Year != 1 || timeOfDay.Month != 1 || timeOfDay.Day != 1)
- throw new ArgumentException ("timeOfDay parameter has a non-default date component");
-
- if (timeOfDay.Kind != DateTimeKind.Unspecified)
- throw new ArgumentException ("timeOfDay parameter Kind's property is not DateTimeKind.Unspecified");
-
- if (timeOfDay.Ticks % TimeSpan.TicksPerMillisecond != 0)
- throw new ArgumentException ("timeOfDay parameter does not represent a whole number of milliseconds");
-
- if (month < 1 || month > 12)
- throw new ArgumentOutOfRangeException ("month parameter is less than 1 or greater than 12");
-
- this.timeOfDay = timeOfDay;
- this.month = month;
-
- this.week = -1;
- this.dayOfWeek = (System.DayOfWeek)(-1);
- this.day = -1;
- this.isFixedDateRule = false;
- }
-
- public static bool operator == (TransitionTime t1, TransitionTime t2)
- {
- return ( t1.day == t2.day &&
- t1.dayOfWeek == t2.dayOfWeek &&
- t1.isFixedDateRule == t2.isFixedDateRule &&
- t1.month == t2.month &&
- t1.timeOfDay == t2.timeOfDay &&
- t1.week == t2.week);
- }
-
- public static bool operator != (TransitionTime t1, TransitionTime t2)
- {
- return !(t1 == t2);
- }
-
-
- void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
- {
- if (info == null)
- throw new ArgumentNullException ("info");
- info.AddValue ("TimeOfDay", TimeOfDay);
- info.AddValue ("Month", System.Convert.ToByte(Month));
- if (week > -1)
- info.AddValue ("Week", System.Convert.ToByte(week));
- else
- info.AddValue ("Week", (byte) 1);
- if (day > -1)
- info.AddValue ("Day", System.Convert.ToByte(day));
- else
- info.AddValue ("Day", (byte) 1);
- if (dayOfWeek != ((System.DayOfWeek) (-1)))
- info.AddValue ("DayOfWeek", dayOfWeek);
- else
- info.AddValue ("DayOfWeek", DayOfWeek.Sunday);
- info.AddValue ("IsFixedDateRule", IsFixedDateRule);
- }
-
- public override bool Equals (object obj)
- {
- if (obj is TransitionTime)
- return this == (TransitionTime) obj;
- return false;
- }
-
- public bool Equals (TimeZoneInfo.TransitionTime other)
- {
- return this == other;
- }
-
- public override int GetHashCode ()
- {
- return (day ^ (int)dayOfWeek ^ month ^ (int)timeOfDay.Ticks ^ week);
- }
-
- void IDeserializationCallback.OnDeserialization (object sender)
- {
- try {
- TimeZoneInfo.TransitionTime.Validate (timeOfDay, month, week, day, dayOfWeek, isFixedDateRule);
- } catch (ArgumentException ex) {
- throw new SerializationException ("invalid serialization data", ex);
- }
- }
-
- private static void Validate (DateTime timeOfDay, int month,int week, int day, DayOfWeek dayOfWeek, bool isFixedDateRule)
- {
- if (timeOfDay.Year != 1 || timeOfDay.Month != 1 || timeOfDay.Day != 1)
- throw new ArgumentException ("timeOfDay parameter has a non-default date component");
-
- if (timeOfDay.Kind != DateTimeKind.Unspecified)
- throw new ArgumentException ("timeOfDay parameter Kind's property is not DateTimeKind.Unspecified");
-
- if (timeOfDay.Ticks % TimeSpan.TicksPerMillisecond != 0)
- throw new ArgumentException ("timeOfDay parameter does not represent a whole number of milliseconds");
-
- if (day < 1 || day > 31) {
- if (!(!isFixedDateRule && day == -1))
- throw new ArgumentOutOfRangeException ("day parameter is less than 1 or greater than 31");
- }
-
- if (week < 1 || week > 5) {
- if (!(isFixedDateRule && week == -1))
- throw new ArgumentOutOfRangeException ("week parameter is less than 1 or greater than 5");
- }
-
- if (month < 1 || month > 12)
- throw new ArgumentOutOfRangeException ("month parameter is less than 1 or greater than 12");
-
- if (dayOfWeek != DayOfWeek.Sunday &&
- dayOfWeek != DayOfWeek.Monday &&
- dayOfWeek != DayOfWeek.Tuesday &&
- dayOfWeek != DayOfWeek.Wednesday &&
- dayOfWeek != DayOfWeek.Thursday &&
- dayOfWeek != DayOfWeek.Friday &&
- dayOfWeek != DayOfWeek.Saturday) {
- if (!(isFixedDateRule && dayOfWeek == (DayOfWeek) (-1)))
- throw new ArgumentOutOfRangeException ("dayOfWeek parameter is not a member od DayOfWeek enumeration");
- }
- }
- }
- }
-}
namespace System
{
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- [SerializableAttribute]
- public
- sealed partial class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
+ partial class TimeZoneInfo
{
TimeSpan baseUtcOffset;
public TimeSpan BaseUtcOffset {
+++ /dev/null
-/*
- * System.TimeZoneNotFoundException
- *
- * Author(s)
- * Stephane Delcroix <stephane@delcroix.org>
- *
- * 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.CompilerServices;
-
-namespace System
-{
- [Serializable]
-#if MOBILE
- [TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#else
- [TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
-#endif
- public
- class TimeZoneNotFoundException : Exception
- {
- public TimeZoneNotFoundException () : base ()
- {}
-
- public TimeZoneNotFoundException (string message) : base (message)
- {}
-
- public TimeZoneNotFoundException (string message, Exception innerException) : base (message, innerException)
- {}
-
- protected TimeZoneNotFoundException (Runtime.Serialization.SerializationInfo info, Runtime.Serialization.StreamingContext context) : base (info, context)
- {}
- }
-}
}
}
+#if !MONO
+ [Test]
+ public void SerializationCompatibilty ()
+ {
+ /* Serialization output from .net
+
+ var dict = new Dictionary<string, string> ();
+ dict.Add ("key", "value");
+
+ var dictSerializedStream = new MemoryStream ();
+ fmt.Serialize (dictSerializedStream, dict);
+
+ dictSerializedStream.Seek (0, SeekOrigin.Begin);
+ var res = Convert.ToBase64String (dictSerializedStream.ToArray (), Base64FormattingOptions.InsertLineBreaks);
+
+ */
+
+ var x = "AAEAAAD/////AQAAAAAAAAAEAQAAAOIBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRGljdGlv" +
+ "bmFyeWAyW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJl" +
+ "PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uU3RyaW5n" +
+ "LCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRv" +
+ "a2VuPWI3N2E1YzU2MTkzNGUwODldXQQAAAAHVmVyc2lvbghDb21wYXJlcghIYXNoU2l6ZQ1LZXlW" +
+ "YWx1ZVBhaXJzAAMAAwiSAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkdlbmVyaWNFcXVhbGl0" +
+ "eUNvbXBhcmVyYDFbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1" +
+ "bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dCOYBU3lzdGVt" +
+ "LkNvbGxlY3Rpb25zLkdlbmVyaWMuS2V5VmFsdWVQYWlyYDJbW1N5c3RlbS5TdHJpbmcsIG1zY29y" +
+ "bGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3" +
+ "YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAs" +
+ "IEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dW10BAAAA" +
+ "CQIAAAADAAAACQMAAAAEAgAAAJIBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuR2VuZXJpY0Vx" +
+ "dWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAu" +
+ "MCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0AAAAA" +
+ "BwMAAAAAAQAAAAEAAAAD5AFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5LZXlWYWx1ZVBhaXJg" +
+ "MltbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0" +
+ "cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlN0cmluZywgbXNj" +
+ "b3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1i" +
+ "NzdhNWM1NjE5MzRlMDg5XV0E/P///+QBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuS2V5VmFs" +
+ "dWVQYWlyYDJbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1" +
+ "cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5TdHJp" +
+ "bmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5" +
+ "VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAgAAAANrZXkFdmFsdWUBAQYFAAAAA2tleQYGAAAABXZh" +
+ "bHVlCw==";
+
+ var dict = new Dictionary<string, string> ();
+ dict.Add ("key", "value");
+
+ BinaryFormatter fmt = new BinaryFormatter ();
+ var mdict = (Dictionary<string, string>) fmt.Deserialize (new MemoryStream (Convert.FromBase64String (x)));
+
+ Assert.AreEqual (1, dict.Count);
+ Assert.AreEqual (dict.Comparer.GetType (), mdict.Comparer.GetType ());
+ }
+#endif
+
[Test]
public void ZeroCapacity ()
{
[TestFixture]
public class EqualityComparerTest {
+ enum E
+ {
+ A,
+ B
+ }
[Test]
public void Default_GetHashCode_Null ()
IEqualityComparer comparer = EqualityComparer<object>.Default;
Assert.IsTrue (comparer.Equals (null, null));
}
+
+ [Test]
+ public void EnumComparison ()
+ {
+ Assert.IsFalse (EqualityComparer<E>.Default.Equals (E.A, E.B));
+ Assert.IsFalse (EqualityComparer<object>.Default.Equals (E.A, E.B));
+ }
}
}
}
[Test]
- [ExpectedException (typeof (ArgumentOutOfRangeException))]
public void EndBeforeStart ()
{
- if (Environment.OSVersion.Platform != PlatformID.Unix)
- throw new ArgumentOutOfRangeException ();;
DateTime dateStart = new DateTime (2007,01,01);
DateTime dateEnd = new DateTime (2006,01,01);
TimeZoneInfo.TransitionTime daylightTransitionStart = TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1,1,1,2,0,0), 03, 11);
TimeZoneInfo.TransitionTime daylightTransitionEnd = TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1,1,1,2,0,0), 10, 11);
- TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, new TimeSpan (1,0,0), daylightTransitionStart, daylightTransitionEnd);
+ try {
+ TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, new TimeSpan (1,0,0), daylightTransitionStart, daylightTransitionEnd);
+ Assert.Fail ();
+ } catch (ArgumentException) {
+ }
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentOutOfRangeException))]
public void DeltaNotInSeconds ()
{
if (Environment.OSVersion.Platform != PlatformID.Unix)
DateTime dateEnd = new DateTime (2008,01,01);
TimeZoneInfo.TransitionTime daylightTransitionStart = TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1,1,1,2,0,0), 03, 11);
TimeZoneInfo.TransitionTime daylightTransitionEnd = TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1,1,1,2,0,0), 10, 11);
- TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, new TimeSpan (55), daylightTransitionStart, daylightTransitionEnd);
+ try {
+ TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, new TimeSpan (55), daylightTransitionStart, daylightTransitionEnd);
+ Assert.Fail ();
+ } catch (ArgumentException) {
+ }
}
}
System/AppDomainInitializer.cs
System/AppDomainManager.cs
System/AppDomainSetup.cs
-System/ApplicationId.cs
System/ApplicationIdentity.cs
System/ArgIterator.cs
System/Array.cs
System/AssemblyLoadEventArgs.cs
System/AssemblyLoadEventHandler.cs
-System/AsyncCallback.cs
-System/Buffer.cs
System/CStreamReader.cs
System/CStreamWriter.cs
System/Console.cs
System/Console.iOS.cs
-System/ConsoleCancelEventArgs.cs
-System/ConsoleCancelEventHandler.cs
-System/ConsoleColor.cs
System/ConsoleDriver.cs
-System/ConsoleKey.cs
-System/ConsoleKeyInfo.cs
-System/ConsoleModifiers.cs
-System/ConsoleSpecialKey.cs
-System/ContextBoundObject.cs
System/ControlCharacters.cs
System/CrossAppDomainDelegate.cs
System/Delegate.cs
System/EmptyArray.cs
System/Environment.cs
System/EnvironmentVariableTarget.cs
-System/EventArgs.cs
-System/EventHandler.cs
System/Exception.cs
-System/Funcs.cs
System/GC.cs
System/GCCollectionMode.cs
System/GCNotificationStatus.cs
System/Guid.cs
System/Guid.MonoTouch.cs
-System/IAppDomainSetup.cs
-System/IAsyncResult.cs
-System/IObservable.cs
-System/IObserver.cs
-System/ICloneable.cs
-System/IComparable.cs
-System/IEquatable.cs
System/IConsoleDriver.cs
-System/IConvertible.cs
-System/ICustomFormatter.cs
-System/IDisposable.cs
-System/IFormatProvider.cs
-System/IFormattable.cs
System/IntPtr.cs
-System/InvalidTimeZoneException.cs
-System/IProgress.cs
-System/IServiceProvider.cs
System/KnownTerminals.cs
System/LocalDataStoreSlot.cs
System/MarshalByRefObject.cs
System/TermInfoStrings.cs
System/TimeZone.cs
System/TimeZoneInfo.cs
-System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.Android.cs
System/TimeZoneInfo.MonoTouch.cs
System/TimeZoneInfo.Serialization.cs
-System/TimeZoneInfo.TransitionTime.cs
-System/TimeZoneNotFoundException.cs
../../build/common/MonoTODOAttribute.cs
System/TypeSpec.cs
System/TypeCode.cs
System/WeakReference.cs
System/WeakReference_T.cs
System/WindowsConsoleDriver.cs
-System/_AppDomain.cs
System/__ComObject.cs
System.Configuration.Assemblies/AssemblyHash.cs
System.Configuration.Assemblies/AssemblyHashAlgorithm.cs
System.Threading/TimerCallback.cs
System.Threading/Volatile.cs
System.Threading/WaitHandle.cs
-System/Action.cs
-System/Comparison.cs
-System/Converter.cs
-System/Predicate.cs
-System.Collections.Generic/Comparer.cs
-System.Collections.Generic/EqualityComparer.cs
System.Threading.Tasks/DecoupledTask.cs
../Mono.Parallel/Mono.Threading/AtomicBoolean.cs
ReferenceSources/ExecutionContext.cs
ReferenceSources/HashHelpers.cs
ReferenceSources/ParseNumbers.cs
-ReferenceSources/TimeZoneInfoOptions.cs
ReferenceSources/AppDomain.cs
ReferenceSources/CLRConfig.cs
ReferenceSources/JitHelpers.cs
ReferenceSources/MethodBase.cs
ReferenceSources/RuntimeHandles.cs
ReferenceSources/CompareInfo.cs
+ReferenceSources/TypeBuilderInstantiation.cs
+ReferenceSources/Buffer.cs
../../../external/referencesource/mscorlib/system/__filters.cs
../../../external/referencesource/mscorlib/system/__hresults.cs
../../../external/referencesource/mscorlib/system/accessviolationexception.cs
+../../../external/referencesource/mscorlib/system/action.cs
../../../external/referencesource/mscorlib/system/activator.cs
../../../external/referencesource/mscorlib/system/AggregateException.cs
../../../external/referencesource/mscorlib/system/appdomainattributes.cs
../../../external/referencesource/mscorlib/system/appdomainunloadedexception.cs
../../../external/referencesource/mscorlib/system/applicationexception.cs
+../../../external/referencesource/mscorlib/system/applicationid.cs
../../../external/referencesource/mscorlib/system/argumentexception.cs
../../../external/referencesource/mscorlib/system/argumentnullexception.cs
../../../external/referencesource/mscorlib/system/argumentoutofrangeexception.cs
../../../external/referencesource/mscorlib/system/arithmeticexception.cs
../../../external/referencesource/mscorlib/system/arraysegment.cs
../../../external/referencesource/mscorlib/system/arraytypemismatchexception.cs
+../../../external/referencesource/mscorlib/system/asynccallback.cs
../../../external/referencesource/mscorlib/system/attribute.cs
../../../external/referencesource/mscorlib/system/attributetargets.cs
../../../external/referencesource/mscorlib/system/attributeusageattribute.cs
../../../external/referencesource/mscorlib/system/badimageformatexception.cs
../../../external/referencesource/mscorlib/system/bitconverter.cs
../../../external/referencesource/mscorlib/system/boolean.cs
+../../../external/referencesource/mscorlib/system/buffer.cs
../../../external/referencesource/mscorlib/system/byte.cs
../../../external/referencesource/mscorlib/system/cannotunloadappdomainexception.cs
../../../external/referencesource/mscorlib/system/char.cs
../../../external/referencesource/mscorlib/system/charenumerator.cs
+../../../external/referencesource/mscorlib/system/consolecanceleventargs.cs
+../../../external/referencesource/mscorlib/system/consolecolor.cs
+../../../external/referencesource/mscorlib/system/consolekey.cs
+../../../external/referencesource/mscorlib/system/consolekeyinfo.cs
+../../../external/referencesource/mscorlib/system/consolemodifiers.cs
+../../../external/referencesource/mscorlib/system/consolespecialkey.cs
+../../../external/referencesource/mscorlib/system/contextboundobject.cs
../../../external/referencesource/mscorlib/system/contextstaticattribute.cs
../../../external/referencesource/mscorlib/system/clscompliantattribute.cs
../../../external/referencesource/mscorlib/system/contextmarshalexception.cs
../../../external/referencesource/mscorlib/system/empty.cs
../../../external/referencesource/mscorlib/system/enum.cs
../../../external/referencesource/mscorlib/system/entrypointnotfoundexception.cs
+../../../external/referencesource/mscorlib/system/eventargs.cs
+../../../external/referencesource/mscorlib/system/eventhandler.cs
../../../external/referencesource/mscorlib/system/executionengineexception.cs
../../../external/referencesource/mscorlib/system/fieldaccessexception.cs
../../../external/referencesource/mscorlib/system/flagsattribute.cs
../../../external/referencesource/mscorlib/system/formatexception.cs
../../../external/referencesource/mscorlib/system/guid.cs
+../../../external/referencesource/mscorlib/system/iappdomain.cs
+../../../external/referencesource/mscorlib/system/iappdomainsetup.cs
+../../../external/referencesource/mscorlib/system/iasyncresult.cs
+../../../external/referencesource/mscorlib/system/icloneable.cs
+../../../external/referencesource/mscorlib/system/icomparable.cs
+../../../external/referencesource/mscorlib/system/iconvertible.cs
+../../../external/referencesource/mscorlib/system/icustomformatter.cs
+../../../external/referencesource/mscorlib/system/idisposable.cs
+../../../external/referencesource/mscorlib/system/iequatable.cs
+../../../external/referencesource/mscorlib/system/iformatprovider.cs
+../../../external/referencesource/mscorlib/system/iformattable.cs
../../../external/referencesource/mscorlib/system/invalidcastexception.cs
../../../external/referencesource/mscorlib/system/indexoutofrangeexception.cs
../../../external/referencesource/mscorlib/system/invalidoperationexception.cs
../../../external/referencesource/mscorlib/system/int16.cs
../../../external/referencesource/mscorlib/system/int32.cs
../../../external/referencesource/mscorlib/system/int64.cs
+../../../external/referencesource/mscorlib/system/iobservable.cs
+../../../external/referencesource/mscorlib/system/iobserver.cs
+../../../external/referencesource/mscorlib/system/iprogress.cs
+../../../external/referencesource/mscorlib/system/iserviceobjectprovider.cs
+../../../external/referencesource/mscorlib/system/invalidtimezoneexception.cs
../../../external/referencesource/mscorlib/system/Lazy.cs
../../../external/referencesource/mscorlib/system/memberaccessexception.cs
../../../external/referencesource/mscorlib/system/methodaccessexception.cs
+../../../external/referencesource/mscorlib/system/midpointrounding.cs
../../../external/referencesource/mscorlib/system/missingfieldexception.cs
../../../external/referencesource/mscorlib/system/missingmemberexception.cs
../../../external/referencesource/mscorlib/system/missingmethodexception.cs
../../../external/referencesource/mscorlib/system/notfinitenumberexception.cs
../../../external/referencesource/mscorlib/system/notimplementedexception.cs
../../../external/referencesource/mscorlib/system/notsupportedexception.cs
-../../../external/referencesource/mscorlib/system/midpointrounding.cs
../../../external/referencesource/mscorlib/system/nullreferenceexception.cs
../../../external/referencesource/mscorlib/system/number.cs
../../../external/referencesource/mscorlib/system/objectdisposedexception.cs
../../../external/referencesource/mscorlib/system/threadattributes.cs
../../../external/referencesource/mscorlib/system/threadstaticattribute.cs
../../../external/referencesource/mscorlib/system/throwhelper.cs
+../../../external/referencesource/mscorlib/system/timezoneinfo.cs
+../../../external/referencesource/mscorlib/system/timezonenotfoundexception.cs
../../../external/referencesource/mscorlib/system/tuple.cs
../../../external/referencesource/mscorlib/system/type.cs
../../../external/referencesource/mscorlib/system/typeaccessexception.cs
../../../external/referencesource/mscorlib/system/collections/stack.cs
../../../external/referencesource/mscorlib/system/collections/structuralcomparisons.cs
+../../../external/referencesource/mscorlib/system/collections/generic/comparer.cs
../../../external/referencesource/mscorlib/system/collections/generic/debugview.cs
../../../external/referencesource/mscorlib/system/collections/generic/dictionary.cs
+../../../external/referencesource/mscorlib/system/collections/generic/equalitycomparer.cs
../../../external/referencesource/mscorlib/system/collections/generic/icollection.cs
../../../external/referencesource/mscorlib/system/collections/generic/icomparer.cs
../../../external/referencesource/mscorlib/system/collections/generic/idictionary.cs
../../../external/referencesource/mscorlib/system/runtime/compilerservices/unsafevaluetypeattribute.cs
../../../external/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs
+../../../external/referencesource/mscorlib/system/security/util/hex.cs
+
../../../external/referencesource/mscorlib/system/text/asciiencoding.cs
../../../external/referencesource/mscorlib/system/text/codepageencoding.cs
../../../external/referencesource/mscorlib/system/text/decoderbestfitfallback.cs
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
-#define MONO_CORLIB_VERSION 125
+#define MONO_CORLIB_VERSION 127
typedef struct
{
MonoClass *methodhandle_class;
MonoClass *systemtype_class;
MonoClass *monotype_class;
+ MonoClass *runtimetype_class;
MonoClass *exception_class;
MonoClass *threadabortexception_class;
MonoClass *thread_class;
mono_defaults.corlib, "System", "MonoType");
g_assert (mono_defaults.monotype_class != 0);
+ mono_defaults.runtimetype_class = mono_class_from_name (
+ mono_defaults.corlib, "System", "RuntimeType");
+ g_assert (mono_defaults.runtimetype_class != 0);
+
mono_defaults.exception_class = mono_class_from_name (
mono_defaults.corlib, "System", "Exception");
g_assert (mono_defaults.exception_class != 0);
#include <config.h>
-#ifndef TARGET_WIN32
+#ifndef HOST_WIN32
#include <glib.h>
#include <string.h>
#include <config.h>
-#ifdef TARGET_WIN32
+#ifdef HOST_WIN32
#include <glib.h>
#include <string.h>
ICALL(ARRAY_13, "SetValueImpl", ves_icall_System_Array_SetValueImpl)
ICALL_TYPE(BUFFER, "System.Buffer", BUFFER_1)
-ICALL(BUFFER_1, "BlockCopyInternal", ves_icall_System_Buffer_BlockCopyInternal)
-ICALL(BUFFER_2, "ByteLengthInternal", ves_icall_System_Buffer_ByteLengthInternal)
-ICALL(BUFFER_3, "GetByteInternal", ves_icall_System_Buffer_GetByteInternal)
-ICALL(BUFFER_4, "SetByteInternal", ves_icall_System_Buffer_SetByteInternal)
+ICALL(BUFFER_1, "InternalBlockCopy", ves_icall_System_Buffer_BlockCopyInternal)
+ICALL(BUFFER_2, "_ByteLength", ves_icall_System_Buffer_ByteLengthInternal)
+ICALL(BUFFER_3, "_GetByte", ves_icall_System_Buffer_GetByteInternal)
+ICALL(BUFFER_4, "_SetByte", ves_icall_System_Buffer_SetByteInternal)
ICALL_TYPE (COMPO_W, "System.ComponentModel.Win32Exception", COMPO_W_1)
ICALL (COMPO_W_1, "W32ErrorMessage", ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage)
ICALL(RT_2, "GetConstructors_internal", ves_icall_Type_GetConstructors_internal)
ICALL(RT_3, "GetEvents_internal", ves_icall_Type_GetEvents_internal)
ICALL(RT_5, "GetFields_internal", ves_icall_Type_GetFields_internal)
-ICALL(RT_6, "GetGenericArguments", ves_icall_MonoType_GetGenericArguments)
+ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_MonoType_GetGenericArguments)
ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_Type_GetGenericParameterAttributes)
ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_Type_GetGenericParameterConstraints)
ICALL(RT_9, "GetGenericParameterPosition", ves_icall_Type_GetGenericParameterPosition)
return class->rank;
}
+static MonoArray*
+create_type_array (MonoDomain *domain, MonoBoolean runtimeTypeArray, int count)
+{
+ MonoArray *res;
+ res = mono_array_new (domain, runtimeTypeArray ? mono_defaults.runtimetype_class : mono_defaults.systemtype_class, count);
+ return res;
+}
+
ICALL_EXPORT MonoArray*
-ves_icall_MonoType_GetGenericArguments (MonoReflectionType *type)
+ves_icall_MonoType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
{
MonoArray *res;
MonoClass *klass, *pklass;
MonoDomain *domain = mono_object_domain (type);
- MonoVTable *array_vtable = mono_class_vtable_full (domain, mono_array_class_get_cached (mono_defaults.systemtype_class, 1), TRUE);
int i;
klass = mono_class_from_mono_type (type->type);
if (klass->generic_container) {
MonoGenericContainer *container = klass->generic_container;
- res = mono_array_new_specific (array_vtable, container->type_argc);
+ res = create_type_array (domain, runtimeTypeArray, container->type_argc);
for (i = 0; i < container->type_argc; ++i) {
pklass = mono_class_from_generic_parameter (mono_generic_container_get_param (container, i), klass->image, FALSE);
mono_array_setref (res, i, mono_type_get_object (domain, &pklass->byval_arg));
}
} else if (klass->generic_class) {
MonoGenericInst *inst = klass->generic_class->context.class_inst;
- res = mono_array_new_specific (array_vtable, inst->type_argc);
+ res = create_type_array (domain, runtimeTypeArray, inst->type_argc);
for (i = 0; i < inst->type_argc; ++i)
mono_array_setref (res, i, mono_type_get_object (domain, inst->type_argv [i]));
} else {
- res = mono_array_new_specific (array_vtable, 0);
+ res = NULL;
}
return res;
}
MonoTypedRef res;
MonoReflectionField *f;
MonoClass *klass;
- MonoType *ftype;
- guint8 *p;
+ MonoType *ftype = NULL;
+ guint8 *p = NULL;
int i;
memset (&res, 0, sizeof (res));
#ifdef EPOOL_CLOEXEC
threadpool_io->epoll.fd = epoll_create1 (EPOLL_CLOEXEC);
#else
- threadpool_io->epoll.fd = epoll_create1 (256);
+ threadpool_io->epoll.fd = epoll_create (256);
fcntl (threadpool_io->epoll.fd, F_SETFD, FD_CLOEXEC);
#endif
// By design aot-runtime decode_exception_debug_info is not able to load sequence point debug data from a file.
// As it is not possible to load debug data from a file its is also not possible to store it in a file.
gboolean method_seq_points_to_file = acfg->aot_opts.gen_seq_points_file &&
- cfg->gen_seq_points && !cfg->gen_seq_points_debug_data;
+ cfg->gen_seq_points && !cfg->gen_sdb_seq_points;
gboolean method_seq_points_to_binary = cfg->gen_seq_points && !method_seq_points_to_file;
emit_exception_debug_info (acfg, cfg, method_seq_points_to_binary);
MonoDebugOptions *opt = mini_get_debug_options ();
opt->mdb_optimizations = TRUE;
- opt->gen_seq_points_debug_data = TRUE;
+ opt->gen_sdb_seq_points = TRUE;
if (!mono_debug_enabled ()) {
aot_printerrf (acfg, "The soft-debug AOT option requires the --debug option.\n");
int atype = decode_value (p, &p);
ref->method = mono_gc_get_managed_allocator_by_type (atype);
- g_assert (ref->method);
+ if (!ref->method) {
+ fprintf (stderr, "Error: No managed allocator, but we need one for AOT.\nAre you using non-standard GC options?\n");
+ exit (1);
+ }
break;
}
case MONO_WRAPPER_WRITE_BARRIER:
float_sub: dest:f src1:f src2:f len:6
fmove: dest:f src1:f len:4
move_f_to_i4: dest:i src1:f len:4
-move_i4_to_f: dest:f src1:i len:4
+move_i4_to_f: dest:f src1:i len:8
move_f_to_i8: dest:i src1:f len:4
-move_i8_to_f: dest:f src1:i len:4
+move_i8_to_f: dest:f src1:i len:8
i8const: dest:i len:20
icompare: src1:i src2:i len:4
icompare_imm: src1:i len:18
breakpoints_init ();
suspend_init ();
- mini_get_debug_options ()->gen_seq_points_debug_data = TRUE;
+ mini_get_debug_options ()->gen_sdb_seq_points = TRUE;
/*
* This is needed because currently we don't handle liveness info.
*/
dbg_unlock ();
if (res->domain == NULL) {
- DEBUG_PRINTF (0, "ERR_UNLOADED, id=%d, type=%d.\n", id, type);
+ DEBUG_PRINTF (1, "ERR_UNLOADED, id=%d, type=%d.\n", id, type);
*err = ERR_UNLOADED;
return NULL;
}
if (ss_req->nframes == 0)
ss_req->nframes = nframes;
+
+ if ((ss_req->depth == STEP_DEPTH_OVER) && (!sp && !parent_sp)) {
+ DEBUG_PRINTF (1, "[dbg] No parent frame for step over, transition to step into.\n");
+ /*
+ * This is needed since if we leave managed code, and later return to it, step over
+ * is not going to stop.
+ * This approach is a bit ugly, since we change the step depth, but it only affects
+ * clients who reuse the same step request, and only in this special case.
+ */
+ ss_req->depth = STEP_DEPTH_INTO;
+ }
+
if (ss_req->depth == STEP_DEPTH_OVER) {
/* Need to stop in catch clauses as well */
for (i = 0; i < nframes; ++i) {
} while (0)
#define NEW_SEQ_POINT(cfg,dest,il_offset,intr_loc) do { \
- MONO_INST_NEW ((cfg), (dest), cfg->gen_seq_points_debug_data ? OP_SEQ_POINT : OP_IL_SEQ_POINT); \
+ MONO_INST_NEW ((cfg), (dest), cfg->gen_sdb_seq_points ? OP_SEQ_POINT : OP_IL_SEQ_POINT); \
(dest)->inst_imm = (il_offset); \
(dest)->flags = intr_loc ? MONO_INST_SINGLE_STEP_LOC : 0; \
} while (0)
if (cfg->compile_llvm)
return FALSE;
#endif
- if (cfg->gen_seq_points_debug_data || cfg->disable_direct_icalls)
+ if (cfg->gen_sdb_seq_points || cfg->disable_direct_icalls)
return FALSE;
return TRUE;
}
cfg->stat_cil_code_size += header->code_size;
seq_points = cfg->gen_seq_points && cfg->method == method;
-#ifdef PLATFORM_ANDROID
- seq_points &= cfg->method->wrapper_type == MONO_WRAPPER_NONE;
-#endif
if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
/* We could hit a seq point before attaching to the JIT (#8338) */
seq_points = FALSE;
}
- if (cfg->gen_seq_points_debug_data && cfg->method == method) {
+ if (cfg->gen_sdb_seq_points && cfg->method == method) {
minfo = mono_debug_lookup_method (method);
if (minfo) {
int i, n_il_offsets;
}
/* Add a sequence point for method entry/exit events */
- if (seq_points && cfg->gen_seq_points_debug_data) {
+ if (seq_points && cfg->gen_sdb_seq_points) {
NEW_SEQ_POINT (cfg, ins, METHOD_ENTRY_IL_OFFSET, FALSE);
MONO_ADD_INS (init_localsbb, ins);
NEW_SEQ_POINT (cfg, ins, METHOD_EXIT_IL_OFFSET, FALSE);
#define IS_REX(inst) (((inst) >= 0x40) && ((inst) <= 0x4f))
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
/* Under windows, the calling convention is never stdcall */
#define CALLCONV_IS_STDCALL(call_conv) (FALSE)
#else
#define DEBUG(a) if (cfg->verbose_level > 1) a
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
static AMD64_Reg_No param_regs [] = { AMD64_RCX, AMD64_RDX, AMD64_R8, AMD64_R9 };
static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
}
}
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
#define FLOAT_PARAM_REGS 4
#else
#define FLOAT_PARAM_REGS 8
break;
case MONO_TYPE_R4:
case MONO_TYPE_R8:
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
class2 = ARG_CLASS_INTEGER;
#else
class2 = ARG_CLASS_SSE;
klass = mono_class_from_mono_type (type);
size = mini_type_stack_size_full (gsctx, &klass->byval_arg, NULL, sig->pinvoke);
-#ifndef HOST_WIN32
+#ifndef TARGET_WIN32
if (!sig->pinvoke && ((is_return && (size == 8)) || (!is_return && (size <= 16)))) {
/* We pass and return vtypes of size 8 in a register */
} else if (!sig->pinvoke || (size == 0) || (size > 16)) {
g_assert (info);
g_assert (fields);
-#ifndef HOST_WIN32
+#ifndef TARGET_WIN32
if (info->native_size > 16) {
ainfo->offset = *stack_size;
*stack_size += ALIGN_TO (info->native_size, 8);
gr = 0;
fr = 0;
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
/* Reserve space where the callee can save the argument registers */
stack_size = 4 * sizeof (mgreg_t);
#endif
ArgInfo *ainfo = &cinfo->args [sig->hasthis + i];
MonoType *ptype;
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
/* The float param registers and other param registers must be the same index on Windows x64.*/
if (gr > fr)
fr = gr;
#ifndef __native_client_codegen__
regs = g_list_prepend (regs, (gpointer)AMD64_R15);
#endif
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
regs = g_list_prepend (regs, (gpointer)AMD64_RDI);
regs = g_list_prepend (regs, (gpointer)AMD64_RSI);
#endif
}
}
- if (cfg->gen_seq_points_debug_data) {
+ if (cfg->gen_sdb_seq_points) {
MonoInst *ins;
if (cfg->compile_aot) {
if (cfg->method->save_lmf) {
cfg->lmf_ir = TRUE;
-#if !defined(HOST_WIN32)
+#if !defined(TARGET_WIN32)
if (mono_get_lmf_tls_offset () != -1 && !optimize_for_xen)
cfg->lmf_ir_mono_lmf = TRUE;
#endif
static inline guint8*
emit_call (MonoCompile *cfg, guint8 *code, guint32 patch_type, gconstpointer data, gboolean win64_adjust_stack)
{
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (win64_adjust_stack)
amd64_alu_reg_imm (code, X86_SUB, AMD64_RSP, 32);
#endif
code = emit_call_body (cfg, code, patch_type, data);
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (win64_adjust_stack)
amd64_alu_reg_imm (code, X86_ADD, AMD64_RSP, 32);
#endif
int sreg = tree->sreg1;
int need_touch = FALSE;
-#if defined(HOST_WIN32)
+#if defined(TARGET_WIN32)
need_touch = TRUE;
#elif defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
if (!tree->flags & MONO_INST_INIT)
guint8*
mono_amd64_emit_tls_get (guint8* code, int dreg, int tls_offset)
{
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (tls_offset < 64) {
x86_prefix (code, X86_GS_PREFIX);
amd64_mov_reg_mem (code, dreg, (tls_offset * 8) + 0x1480, 8);
static guint8*
amd64_emit_tls_set (guint8 *code, int sreg, int tls_offset)
{
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
g_assert_not_reached ();
#elif defined(__APPLE__)
x86_prefix (code, X86_GS_PREFIX);
amd64_emit_tls_set_reg (guint8 *code, int sreg, int offset_reg)
{
/* offset_reg contains a value translated by mono_arch_translate_tls_offset () */
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
g_assert_not_reached ();
#elif defined(__APPLE__)
x86_prefix (code, X86_GS_PREFIX);
mono_emit_unwind_op_def_cfa_offset (cfg, code, cfa_offset);
mono_emit_unwind_op_offset (cfg, code, AMD64_RBP, - cfa_offset);
async_exc_point (code);
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
mono_arch_unwindinfo_add_push_nonvol (&cfg->arch.unwindinfo, cfg->native_code, code, AMD64_RBP);
#endif
/* These are handled automatically by the stack marking code */
amd64_mov_reg_reg (code, AMD64_RBP, AMD64_RSP, sizeof(mgreg_t));
mono_emit_unwind_op_def_cfa_reg (cfg, code, AMD64_RBP);
async_exc_point (code);
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
mono_arch_unwindinfo_add_set_fpreg (&cfg->arch.unwindinfo, cfg->native_code, code, AMD64_RBP);
#endif
}
/* Allocate stack frame */
if (alloc_size) {
/* See mono_emit_stack_alloc */
-#if defined(HOST_WIN32) || defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
+#if defined(TARGET_WIN32) || defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
guint32 remaining_size = alloc_size;
/*FIXME handle unbounded code expansion, we should use a loop in case of more than X interactions*/
guint32 required_code_size = ((remaining_size / 0x1000) + 1) * 10; /*10 is the max size of amd64_alu_reg_imm + amd64_test_membase_reg*/
mono_emit_unwind_op_def_cfa_offset (cfg, code, cfa_offset);
}
async_exc_point (code);
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (cfg->arch.omit_fp)
mono_arch_unwindinfo_add_alloc_stack (&cfg->arch.unwindinfo, cfg->native_code, code, 0x1000);
#endif
mono_emit_unwind_op_def_cfa_offset (cfg, code, cfa_offset);
async_exc_point (code);
}
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (cfg->arch.omit_fp)
mono_arch_unwindinfo_add_alloc_stack (&cfg->arch.unwindinfo, cfg->native_code, code, remaining_size);
#endif
}
}
- if (cfg->gen_seq_points_debug_data) {
+ if (cfg->gen_sdb_seq_points) {
MonoInst *info_var = cfg->arch.seq_point_info_var;
/* Initialize seq_point_info_var */
/* We have to shift the arguments left */
amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
for (i = 0; i < param_count; ++i) {
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
if (i < 3)
amd64_mov_reg_reg (code, param_regs [i], param_regs [i + 1], 8);
else
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
#define PARAM_REGS 4
#else
#define PARAM_REGS 6
#define MONO_ARCH_NOMAP32BIT 1
#endif
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
#define MONO_AMD64_ARG_REG1 AMD64_RCX
#define MONO_AMD64_ARG_REG2 AMD64_RDX
#define MONO_AMD64_ARG_REG3 AMD64_R8
extern MonoBreakpointInfo mono_breakpoint_info [MONO_BREAKPOINT_ARRAY_SIZE];
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
void mono_arch_unwindinfo_add_push_nonvol (gpointer* monoui, gpointer codebegin, gpointer nextip, guchar reg );
void mono_arch_unwindinfo_add_set_fpreg (gpointer* monoui, gpointer codebegin, gpointer nextip, guchar reg );
}
}
- if (cfg->gen_seq_points_debug_data) {
+ if (cfg->gen_sdb_seq_points) {
if (cfg->soft_breakpoints) {
MonoInst *ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins->flags |= MONO_INST_VOLATILE;
else if (!strcmp (arg, "explicit-null-checks"))
debug_options.explicit_null_checks = TRUE;
else if (!strcmp (arg, "gen-seq-points"))
- debug_options.gen_seq_points_debug_data = TRUE;
+ debug_options.gen_sdb_seq_points = TRUE;
else if (!strcmp (arg, "gen-compact-seq-points"))
debug_options.gen_seq_points_compact_data = TRUE;
else if (!strcmp (arg, "init-stacks"))
if (cfg->opt & MONO_OPT_PEEPHOLE)
mono_arch_peephole_pass_2 (cfg, bb);
- if (cfg->gen_seq_points && !cfg->gen_seq_points_debug_data)
+ if (cfg->gen_seq_points && !cfg->gen_sdb_seq_points)
bb_deduplicate_op_il_seq_points (cfg, bb);
}
cfg->full_aot = full_aot;
cfg->skip_visibility = method->skip_visibility;
cfg->orig_method = method;
- cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_seq_points_debug_data;
- cfg->gen_seq_points_debug_data = debug_options.gen_seq_points_debug_data;
+ cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_sdb_seq_points;
+ cfg->gen_sdb_seq_points = debug_options.gen_sdb_seq_points;
+
+#ifdef PLATFORM_ANDROID
+ if (cfg->method->wrapper_type != MONO_WRAPPER_NONE) {
+ /* FIXME: Why is this needed */
+ cfg->gen_seq_points = FALSE;
+ cfg->gen_sdb_seq_points = FALSE;
+ }
+#endif
cfg->explicit_null_checks = debug_options.explicit_null_checks;
cfg->soft_breakpoints = debug_options.soft_breakpoints;
#endif
/* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 110
+#define MONO_AOT_FILE_VERSION 111
//TODO: This is x86/amd64 specific.
#define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
guint keep_cil_nops : 1;
guint gen_seq_points : 1;
/* Generate seq points for use by the debugger */
- guint gen_seq_points_debug_data : 1;
+ guint gen_sdb_seq_points : 1;
guint explicit_null_checks : 1;
guint compute_gc_maps : 1;
guint soft_breakpoints : 1;
* Whenever data such as next sequence points and flags is required.
* Next sequence points and flags are required by the debugger agent.
*/
- gboolean gen_seq_points_debug_data;
+ gboolean gen_sdb_seq_points;
gboolean gen_seq_points_compact_data;
gboolean explicit_null_checks;
/*
GSList **next = NULL;
SeqPoint* seq_points;
GByteArray* array;
- gboolean has_debug_data = cfg->gen_seq_points_debug_data;
+ gboolean has_debug_data = cfg->gen_sdb_seq_points;
if (!cfg->seq_points)
return;
72, 73, 74, 75, 76, 77, 78, 79,
};
#elif defined (TARGET_X86)
-#ifdef __APPLE__
/*
- * LLVM seems to generate unwind info where esp is encoded as 5, and ebp as 4, ie see this line:
- * def ESP : RegisterWithSubRegs<"esp", [SP]>, DwarfRegNum<[-2, 5, 4]>;
- * in lib/Target/X86/X86RegisterInfo.td in the llvm sources.
+ * ebp and esp are swapped:
+ * http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-January/003101.html
*/
static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 5, 4, 6, 7, 8 };
-#else
-static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
-#endif
/* + 1 is for IP */
#define NUM_REGS X86_NREG + 1
#define DWARF_DATA_ALIGN (-4)
check-local: testlog
endif
-EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
+EXTRA_DIST=utils.c utils.h proflog.h perf_event.h \
$(PLOG_TESTS_SRC) ptestrunner.pl
#include <mono/utils/mono-compiler.h>
#include <glib.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
/* Returns the number of milliseconds from boot time: this should be monotonic */
guint32 mono_msec_ticks (void);
/*
* Bare bones profiler. Compile with:
- * gcc -shared -o mono-profiler-sample.so sample.c `pkg-config --cflags --libs mono`
- * Install the binary where the dynamic loader can find it.
+ *
+ * linux : gcc -shared -o mono-profiler-sample.so sample.c `pkg-config --cflags --libs mono`
+ * mac : gcc sample.c -o mono-profiler-sample.dylib -Dmono_free=free -lz `pkg-config --cflags mono-2` -undefined suppress -flat_namespace
+ *
+ * Install the binary where the dynamic loader can find it. eg /usr/lib etc
* Then run mono with:
* mono --profile=sample your_application.exe
+ *
+ * Note if you name a profiler with more than 8 characters (eg sample6789) appears to not work
*/
struct _MonoProfiler {
# set LD_LIBRARY_PATH to ensure that libmono is found
export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# and set MONO_PATH to ensure that mscorlib.dll can be found
-export MONO_PATH=$prefix/lib/mono/2.0
+export MONO_PATH=$prefix/lib/mono/4.5
for i in "${monolist[@]}"; do
($bindir/monodis --assembly $i | awk '
# set LD_LIBRARY_PATH to ensure that libmono is found
export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# and set MONO_PATH to ensure that mscorlib.dll can be found
-export MONO_PATH=$prefix/lib/mono/2.0
+export MONO_PATH=$prefix/lib/mono/4.5
REQUIRES=$(
for i in "${monolist[@]}"; do