--- /dev/null
+@echo off
+cd mcs\jay
+vcbuild jay.vcxproj
+msbuild net_4_x.sln
--- /dev/null
+#!/bin/sh
+(cd mcs/jay; make)
+(cd msvc/scripts/; make prepare.exe; mono prepare.exe `pwd`/mcs core)
+msbuild net_4_x.sln
TARGET=ARM64
arch_target=arm64
boehm_supported=false
+ AOT_SUPPORTED="yes"
;;
s390x-*-linux*)
TARGET=S390X;
GUINT_TO_POINTER="((gpointer) (v))"
GSIZE="int"
GSIZE_FORMAT='"u"'
- G_GUINT64_FORMAT='"llu"'
- G_GINT64_FORMAT='"lld"'
- G_GUINT32_FORMAT='"lu"'
- G_GINT32_FORMAT='"ld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
GPOINTER_TO_UINT="((guint)(long) (ptr))"
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
GSIZE="long"
GSIZE_FORMAT='"lu"'
- G_GUINT64_FORMAT='"lu"'
- G_GINT64_FORMAT='"ld"'
- G_GUINT32_FORMAT='"u"'
- G_GINT32_FORMAT='"d"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
GPOINTER_TO_INT="((gint)(long long) (ptr))"
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
GSIZE="long long"
GSIZE_FORMAT='"I64u"'
- G_GUINT64_FORMAT='"I64u"'
- G_GINT64_FORMAT='"I64i"'
- G_GUINT32_FORMAT='"I32u"'
- G_GINT32_FORMAT='"I32i"'
else
AC_MSG_ERROR([unsupported pointer size])
fi
typedef signed @GSIZE@ gssize;
#define G_GSIZE_FORMAT @GSIZE_FORMAT@
-#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@
-#define G_GINT64_FORMAT @G_GINT64_FORMAT@
-#define G_GUINT32_FORMAT @G_GUINT32_FORMAT@
-#define G_GINT32_FORMAT @G_GINT32_FORMAT@
#if @G_HAVE_ISO_VARARGS@ == 1
#define G_HAVE_ISO_VARARGS
#define G_SEARCHPATH_SEPARATOR_S ";"
#define G_SEARCHPATH_SEPARATOR ';'
#define G_GSIZE_FORMAT "d"
-#define G_GUINT64_FORMAT "d"
-#define G_GINT64_FORMAT "d"
#define GPOINTER_TO_INT(ptr) ((gint)(intptr_t) (ptr))
#define GPOINTER_TO_UINT(ptr) ((guint)(intptr_t) (ptr))
#define GINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
#define GUINT_TO_POINTER(v) ((gpointer)(intptr_t) (v))
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-#define INT32_MAX 2147483647
-#define INT32_MIN (~ INT32_MAX)
-#define INT64_MAX 9223372036854775807i64
-#define INT64_MIN (~INT64_MAX)
-#define UINT32_MAX 0xffffffffU
-#define UINT64_MAX 0xffffffffffffffffULL
-#endif
-
#define STDOUT_FILENO (int)(intptr_t)stdout
#define STDERR_FILENO (int)(intptr_t)stderr
-
/* FIXME: what should this be ?*/
#define X_OK 4 /* This is really read */
#define WNOHANG 1
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
#endif
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-#else
#include <stdint.h>
-#endif
#include <eglib-config.h>
#ifndef EGLIB_NO_REMAP
typedef char gchar;
typedef unsigned char guchar;
-#if !G_TYPES_DEFINED
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-typedef __int8 gint8;
-typedef unsigned __int8 guint8;
-typedef __int16 gint16;
-typedef unsigned __int16 guint16;
-typedef __int32 gint32;
-typedef unsigned __int32 guint32;
-typedef __int64 gint64;
-typedef unsigned __int64 guint64;
-typedef float gfloat;
-typedef double gdouble;
-typedef int gboolean;
-#else
/* Types defined in terms of the stdint.h */
typedef int8_t gint8;
typedef uint8_t guint8;
typedef float gfloat;
typedef double gdouble;
typedef int32_t gboolean;
-#endif
-#endif
typedef guint16 gunichar2;
typedef guint32 gunichar;
#define G_CONST_RETURN const
+#define G_GUINT64_FORMAT PRIu64
+#define G_GINT64_FORMAT PRIi64
+#define G_GUINT32_FORMAT PRIu32
+#define G_GINT32_FORMAT PRIi32
+
/*
* Allocation
*/
#ifdef __GNUC__
__inline__
#endif
-LONG GC_get_max_thread_index()
+static LONG GC_get_max_thread_index()
{
LONG my_max = GC_max_thread_index;
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
-->\r
<PropertyGroup>\r
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
</PreBuildEvent>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+$(ProjectDir)\..\..\jay\jay.exe -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="resources/SR.resources">\r
+ <EmbeddedResource Include="resources/SR.resx">\r
<LogicalName>SR.resources</LogicalName>\r
</EmbeddedResource>\r
<EmbeddedResource Include="resources/SQLiteCommand.bmp">\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
TypeMirror t = o.Type;
- Assert.AreEqual ("MonoType", t.GetTypeObject ().Type.Name);
+ Assert.AreEqual ("RuntimeType", t.GetTypeObject ().Type.Name);
}
[Test]
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
// p and q values should have a length of half the strength in bits
int pbitlength = ((KeySize + 1) >> 1);
int qbitlength = (KeySize - pbitlength);
- const uint uint_e = 17;
+ const uint uint_e = 65537;
e = uint_e; // fixed
// generate p, prime and (p-1) relatively prime to e
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources">\r
+ <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx">\r
<LogicalName>ResultCodeMessages.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
m_primitiveTypeFlagMap[amqpType] = isReference;
}
- public void HandleOption(string opt) {
+ public bool HandleOption(string opt) {
if (opt.StartsWith("/n:")) {
m_framingSubnamespace = opt.Substring(3);
} else if (opt.StartsWith("/apiName:")) {
} else if (opt == "/c") {
m_emitComments = true;
} else {
- Console.Error.WriteLine("Unsupported command-line option: " + opt);
- Usage();
+ return false;
}
+ return true;
}
public void Usage() {
public Apigen(ArrayList args) {
while (args.Count > 0 && ((string) args[0]).StartsWith("/")) {
- HandleOption((string) args[0]);
+ if (!HandleOption((string) args[0]))
+ break;
args.RemoveAt(0);
}
if ((args.Count < 2)
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+mono $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)\..\..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-9.cs
+mono $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)\..\..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-8.cs
+mono $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)\..\..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)\..\..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-9.cs
+ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)\..\..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-8.cs
+ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)\..\..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
\r
</PostBuildEvent>\r
</PropertyGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Microsoft.Internal.Strings.resources">\r
+ <EmbeddedResource Include="Microsoft.Internal.Strings.resx">\r
<LogicalName>Microsoft.Internal.Strings.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Client/System.Data.Services.Client.resources">\r
+ <EmbeddedResource Include="Client/System.Data.Services.Client.resx">\r
<LogicalName>System.Data.Services.Client.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Json.Properties.Resources.resources">\r
+ <EmbeddedResource Include="System.Json.Properties.Resources.resx">\r
<LogicalName>System.Json.Properties.Resources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resources">\r
+ <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resx">\r
<LogicalName>System.Net.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Net.Http.Properties.Resources.resources">\r
+ <EmbeddedResource Include="System.Net.Http.Properties.Resources.resx">\r
<LogicalName>System.Net.Http.Properties.Resources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
public void Close ()
{
CancellationTokenRegistration.Dispose ();
- ContentStream.Close ();
+ if (ContentStream != null) {
+ ContentStream.Close ();
+ }
}
}
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
wr.KeepAlive = request.Headers.ConnectionClose != true;
}
- wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
-
if (allowAutoRedirect) {
wr.AllowAutoRedirect = true;
wr.MaximumAutomaticRedirections = maxAutomaticRedirections;
if (useProxy) {
wr.Proxy = proxy;
+ } else {
+ // Disables default WebRequest.DefaultWebProxy value
+ wr.Proxy = null;
}
+ wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
+
// Add request headers
var headers = wr.Headers;
foreach (var header in request.Headers) {
}
}
+ class ThrowOnlyProxy : IWebProxy
+ {
+ public ICredentials Credentials {
+ get {
+ throw new NotImplementedException ();
+ }
+
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Uri GetProxy (Uri destination)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool IsBypassed (Uri host)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
const int WaitTimeout = 5000;
string TestHost, LocalServer;
}
}
+ [Test]
+ public void Proxy_Disabled ()
+ {
+ var pp = WebRequest.DefaultWebProxy;
+
+ try {
+ WebRequest.DefaultWebProxy = new ThrowOnlyProxy ();
+
+ var request = new HttpClientHandler {
+ UseProxy = false
+ };
+
+ var client = new HttpClient (request);
+ Assert.IsTrue (client.GetAsync ("http://google.com").Wait (5000), "needs internet access");
+ } finally {
+ WebRequest.DefaultWebProxy = pp;
+ }
+ }
+
[Test]
public void Send ()
{
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Strings_Core.resources">\r
+ <EmbeddedResource Include="Strings_Core.resx">\r
<LogicalName>System.Reactive.Strings_Core.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Strings_Linq.resources">\r
+ <EmbeddedResource Include="Strings_Linq.resx">\r
<LogicalName>System.Reactive.Strings_Linq.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Strings_PlatformServices.resources">\r
+ <EmbeddedResource Include="Strings_PlatformServices.resx">\r
<LogicalName>System.Reactive.Strings_PlatformServices.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Strings_Providers.resources">\r
+ <EmbeddedResource Include="Strings_Providers.resx">\r
<LogicalName>System.Reactive.Strings_Providers.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Strings_WindowsThreading.resources">\r
+ <EmbeddedResource Include="Strings_WindowsThreading.resx">\r
<LogicalName>System.Reactive.Strings_WindowsThreading.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resources">\r
+ <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resx">\r
<LogicalName>System.Web.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resources">\r
+ <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resx">\r
<LogicalName>System.Web.Http.Properties.SRResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Mvc/Resources/MvcResources.resources">\r
+ <EmbeddedResource Include="Mvc/Resources/MvcResources.resx">\r
<LogicalName>System.Web.Mvc.Resources.MvcResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resources">\r
+ <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resx">\r
<LogicalName>System.Web.Razor.Resources.RazorResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resources">\r
+ <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resx">\r
<LogicalName>System.Web.Razor.Common.CommonResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resx">\r
<LogicalName>System.Web.WebPages.Deployment.Common.CommonResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx">\r
<LogicalName>System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resx">\r
<LogicalName>System.Web.WebPages.Razor.Resources.RazorWebResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resx">\r
<LogicalName>System.Web.WebPages.Razor.Common.CommonResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resx">\r
<LogicalName>System.Web.WebPages.Resources.WebPageResources.resources</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resources">\r
+ <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resx">\r
<LogicalName>System.Web.WebPages.Common.CommonResources.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="resources/TranslationResources.resources">\r
+ <EmbeddedResource Include="resources/TranslationResources.resx">\r
<LogicalName>TranslationResources.resources</LogicalName>\r
</EmbeddedResource>\r
<EmbeddedResource Include="resources/WebUIValidation.js">\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="resources/TranslationResources.resources">\r
+ <EmbeddedResource Include="resources/TranslationResources.resx">\r
<LogicalName>TranslationResources.resources</LogicalName>\r
</EmbeddedResource>\r
<EmbeddedResource Include="resources/WebUIValidation.js">\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<EmbeddedResource Include="resources/DnDMove.cur">\r
<LogicalName>System.Windows.Forms.DnDMove.cur</LogicalName>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="resources/keyboards.resources">\r
+ <EmbeddedResource Include="resources/keyboards.resx">\r
<LogicalName>keyboards.resources</LogicalName>\r
</EmbeddedResource>\r
<EmbeddedResource Include="resources/16_computer.png">\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
LIB_REFS = System System.Xml
LIB_MCS_FLAGS = -unsafe
TEST_MCS_FLAGS = -unsafe
-TEST_LIB_REFS = WindowsBase System System.Xml System.Core
+TEST_LIB_REFS = WindowsBase System System.Xml System.Core System.IO.Compression
ifeq (2.0, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_0
internal static void WriteRelationships (Dictionary <string, PackageRelationship> relationships, Stream stream)
{
+ stream.SetLength(0);
+
XmlDocument doc = new XmlDocument ();
XmlNamespaceManager manager = new XmlNamespaceManager (doc.NameTable);
manager.AddNamespace ("rel", RelationshipNamespace);
{
// Ensure that all the data has been read out of the package
// stream already. Otherwise we'll lose data when we recreate the zip
- foreach (ZipPackagePart part in Parts.Values)
- part.GetStream ().Dispose ();
+ foreach (ZipPackagePart part in Parts.Values) {
+ if (part.Package != null)
+ part.GetStream ().Dispose ();
+ }
// Empty the package stream
PackageStream.Position = 0;
// Write all the part streams
foreach (ZipPackagePart part in Parts.Values) {
+ if (part.Package == null)
+ continue;
+
Stream partStream = part.GetStream ();
partStream.Seek (0, SeekOrigin.Begin);
d.RelationshipType == node.Attributes["Type"].InnerText));\r
}\r
}\r
+\r
+ [Test]\r
+ public void CheckRelationshipDeletion ()\r
+ {\r
+ AddThreeRelationShips ();\r
+ package.Flush ();\r
+\r
+ foreach (PackageRelationship p in new List<PackageRelationship> (package.GetRelationships ()).Skip(1))\r
+ package.DeleteRelationship (p.Id);\r
+\r
+ PackagePart part = package.GetPart (new Uri ("/_rels/.rels", UriKind.Relative));\r
+ Assert.IsNotNull (package.GetPart (new Uri ("/_RELS/.RELS", UriKind.Relative)), "#0");\r
+ package.Flush ();\r
+ Assert.IsNotNull (part, "#1");\r
+\r
+ Stream stream = part.GetStream ();\r
+ Assert.IsTrue (stream.Length > 0, "#2a");\r
+\r
+ XmlDocument doc = new XmlDocument ();\r
+ XmlNamespaceManager manager = new XmlNamespaceManager (doc.NameTable);\r
+ manager.AddNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships");\r
+ doc.Load (new StreamReader (stream));\r
+\r
+ Assert.IsNotNull (doc.SelectSingleNode ("/rel:Relationships", manager), "#2b");\r
+\r
+ XmlNodeList list = doc.SelectNodes ("/rel:Relationships/*", manager);\r
+ Assert.AreEqual (1, list.Count);\r
+ }\r
}\r
}\r
using System;\r
using System.Collections.Generic;\r
using System.IO;\r
+using System.IO.Compression;\r
using System.IO.Packaging;\r
using System.Linq;\r
using System.Text;\r
package = Package.Open (path);\r
package.Close ();\r
package = Package.Open (path);\r
- }\r
+ } \r
\r
[Test]\r
public void Close_FileStreamNotClosed ()\r
File.Create (path).Close ();\r
package = Package.Open (path, FileMode.OpenOrCreate, FileAccess.Write);\r
}\r
+\r
+ [Test]\r
+ public void Check_ZipDateTime ()\r
+ {\r
+ using (var zipStream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.ReadWrite))\r
+ using (package = Package.Open (zipStream, FileMode.OpenOrCreate)) {\r
+ var part = package.CreatePart (new Uri ("/test", UriKind.Relative), "test/type");\r
+ using (var stream = part.GetStream ())\r
+ stream.Write (new byte [1024 * 1024], 0, 1024 * 1024);\r
+ }\r
+\r
+ using (var stream = new FileStream (path, FileMode.Open, FileAccess.Read))\r
+ using (var archive = new ZipArchive(stream))\r
+ { \r
+ foreach (var entry in archive.Entries)\r
+ Assert.AreEqual (entry.LastWriteTime.Year, DateTime.Now.Year);\r
+ }\r
+ } \r
}\r
}\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
//
using System;
+using System.Runtime.InteropServices;
namespace zipsharp
{
+ [StructLayoutAttribute (LayoutKind.Sequential)]
struct ZipFileInfo
{
ZipTime date;
public ZipFileInfo (DateTime fileTime)
{
date = new ZipTime (fileTime);
- dosDate = new IntPtr ((int)fileTime.ToFileTime ());
+ dosDate = IntPtr.Zero;
internalFileAttributes = IntPtr.Zero;
externalFileAttributes = IntPtr.Zero;
}
namespace System
{
+ // Contains information about the type which is expensive to compute
+ [StructLayout (LayoutKind.Sequential)]
+ internal class MonoTypeInfo {
+ // this is the displayed form: special characters
+ // ,+*&*[]\ in the identifier portions of the names
+ // have been escaped with a leading backslash (\)
+ public string full_name;
+ public MonoCMethod default_ctor;
+ }
+
+ [StructLayout (LayoutKind.Sequential)]
partial class RuntimeType
{
+ [NonSerialized]
+ MonoTypeInfo type_info;
+
internal Object GenericCache;
- internal virtual MonoCMethod GetDefaultConstructor ()
+ internal RuntimeType (Object obj)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal MonoCMethod GetDefaultConstructor ()
+ {
+ MonoCMethod ctor = null;
+
+ if (type_info == null)
+ type_info = new MonoTypeInfo ();
+ else
+ ctor = type_info.default_ctor;
+
+ if (ctor == null) {
+ var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
+
+ for (int i = 0; i < ctors.Length; ++i) {
+ if (ctors [i].GetParametersCount () == 0) {
+ type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
+ break;
+ }
+ }
+ }
+
+ return ctor;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
+
+ internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
+ {
+ if (fromNoninstanciated == null)
+ throw new ArgumentNullException ("fromNoninstanciated");
+ return GetCorrespondingInflatedMethod (fromNoninstanciated);
+ }
+
+ internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
{
- // TODO: Requires MonoType
- throw new NotSupportedException ();
+ if (fromNoninstanciated == null)
+ throw new ArgumentNullException ("fromNoninstanciated");
+ return GetCorrespondingInflatedConstructor (fromNoninstanciated);
+ }
+
+ internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
+ {
+ /* create sensible flags from given FieldInfo */
+ BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
+ flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
+ return GetField (fromNoninstanciated.Name, flags);
}
string GetDefaultMemberName ()
get;
}
- public override string FullName {
- get {
- throw new NotImplementedException ();
- }
- }
-
public extern override string Name {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
get;
get { return get_core_clr_security_level () == 1; }
}
#endif
+
+ public override int GetHashCode()
+ {
+ Type t = UnderlyingSystemType;
+ if (t != null && t != this)
+ return t.GetHashCode ();
+ return (int)_impl.Value;
+ }
+
+ public override string FullName {
+ get {
+ string fullName;
+ // This doesn't need locking
+ if (type_info == null)
+ type_info = new MonoTypeInfo ();
+ if ((fullName = type_info.full_name) == null)
+ fullName = type_info.full_name = getFullName (true, false);
+
+ return fullName;
+ }
+ }
+
+ internal override bool IsUserType {
+ get {
+ return false;
+ }
+ }
}
}
foreach (Type type in methodInstantiation) {
if (type == null)
throw new ArgumentNullException ();
- if (!(type is MonoType))
+ if (!(type is RuntimeType))
hasUserType = true;
}
+++ /dev/null
-//
-// System.Runtime.InteropServices.ArrayWithOffset.cs
-//
-// Author:
-// Miguel de Icaza (miguel@ximian.com)
-//
-// (C) Novell, 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;
-
-namespace System.Runtime.InteropServices {
-
- [Serializable]
- [ComVisible (true)]
- public struct ArrayWithOffset {
- object array;
- int offset;
-
- public ArrayWithOffset (object array, int offset)
- {
- this.array = array;
- this.offset = offset;
- }
-
- public override bool Equals (object obj)
- {
- if (obj == null)
- return false;
- if (!(obj is ArrayWithOffset))
- return false;
- ArrayWithOffset other = (ArrayWithOffset) obj;
-
- return (other.array == array && other.offset == offset);
- }
-
- public bool Equals (ArrayWithOffset obj)
- {
- return obj.array == array && obj.offset == offset;
- }
-
- public static bool operator == (ArrayWithOffset a, ArrayWithOffset b)
- {
- return a.Equals (b);
- }
-
- public static bool operator != (ArrayWithOffset a, ArrayWithOffset b)
- {
- return !a.Equals (b);
- }
-
- public override int GetHashCode ()
- {
- return offset;
- }
-
- public object GetArray ()
- {
- return array;
- }
-
- public int GetOffset ()
- {
- return offset;
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.AssemblyRegistrationFlags.cs
-//
-// Author:
-// Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// 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.Runtime.InteropServices
-{
- [Flags]
- [ComVisible(true)]
- public enum AssemblyRegistrationFlags {
- None = 0,
- SetCodeBase,
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.BStrWrapper
-//
-// Author:
-// Kazuki Oikawa (kazuki@panicode.com)
-//
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public sealed class BStrWrapper
- {
- string _value;
-
- public BStrWrapper (string value)
- {
- _value = value;
- }
-
- public BStrWrapper (object value)
- {
- _value = (string)value;
- }
-
- public string WrappedObject { get { return _value; } }
- }
-}
+++ /dev/null
-//
-// COMException.cs - COM Exception
-//
-// Author:
-// Sebastien Pouliot <sebastien@ximian.com>
-//
-// (C) 2002 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004, 2008 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.Serialization;
-
-namespace System.Runtime.InteropServices {
-
-[Serializable]
-[ComVisible (true)]
-public class COMException : ExternalException {
-
- public COMException ()
- : base () {}
-
- public COMException (string message)
- : base (message) {}
-
- public COMException (string message, Exception inner)
- : base (message, inner) {}
-
- public COMException (string message, int errorCode)
- : base (message, errorCode) {}
-
- protected COMException (SerializationInfo info, StreamingContext context)
- : base (info, context) {}
-
- public override string ToString ()
- {
- return String.Format (
- "{0} (0x{1:x}): {2} {3}{4}{5}",
- GetType (), HResult, Message, InnerException == null ? String.Empty : InnerException.ToString (),
- Environment.NewLine, StackTrace != null ? StackTrace : String.Empty);
- }
-}
-
-}
+++ /dev/null
-// CallingConvention.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:29 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (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;
-
-namespace System.Runtime.InteropServices {
-
- [Serializable]
- [ComVisible (true)]
- public enum CallingConvention {
- Winapi = 1,
- Cdecl = 2,
- StdCall = 3,
- ThisCall = 4,
- FastCall = 5,
- }
-
-} // System.Runtime.InteropServices
+++ /dev/null
-// CharSet.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:35 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (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;
-
-namespace System.Runtime.InteropServices {
-
- [Serializable]
- [ComVisible (true)]
- public enum CharSet {
- None = 1,
- Ansi = 2,
- Unicode = 3,
- Auto = 4,
- }
-
-} // System.Runtime.InteropServices
+++ /dev/null
-
-//
-// 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.
-//
-
-// System.Runtime.InteropServices/ComMemberType.cs
-//
-// Paolo Molaro (lupus@ximian.com)
-//
-// (C) 2002 Ximian, Inc.
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public enum ComMemberType {
- Method = 0,
- PropGet = 1,
- PropSet = 2
- }
-}
-
+++ /dev/null
-//
-// System.Runtime.InteropServices.CriticalHandle
-//
-// Author:
-// Kazuki Oikawa (kazuki@panicode.com)
-//
-
-
-using System;
-using System.Runtime.ConstrainedExecution;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- public abstract class CriticalHandle : CriticalFinalizerObject, IDisposable
- {
- protected IntPtr handle;
- bool _disposed = false;
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
- protected CriticalHandle (IntPtr invalidHandleValue)
- {
- handle = invalidHandleValue;
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- ~CriticalHandle ()
- {
- Dispose (false);
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- public void Close ()
- {
- Dispose (true);
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- public void Dispose ()
- {
- Dispose (true);
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- protected virtual void Dispose (bool disposing)
- {
- if (_disposed)
- return;
-
- if (!IsInvalid){
- if (!_disposed && !ReleaseHandle ()) {
- GC.SuppressFinalize (this);
- } else {
- // Failed in release...
- }
- }
- _disposed = true;
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- protected abstract bool ReleaseHandle ();
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- protected void SetHandle (IntPtr handle)
- {
- this.handle = handle;
- }
-
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- public void SetHandleAsInvalid()
- {
- _disposed = true;
- }
-
- public bool IsClosed {
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- get { return _disposed; }
- }
-
- public abstract bool IsInvalid {
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- get;
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.CurrencyWrapper.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public sealed class CurrencyWrapper
- {
- Decimal currency;
-
- public CurrencyWrapper (decimal obj)
- {
- currency = obj;
- }
-
- public CurrencyWrapper (object obj)
- {
- if (obj.GetType() != typeof(Decimal))
- throw new ArgumentException ("obj has to be a Decimal type");
- currency = (Decimal)obj;
- }
-
- public decimal WrappedObject {
- get { return currency; }
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.DispatchWrapper.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.
-//
-
-#if !FULL_AOT_RUNTIME
-using System;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public sealed class DispatchWrapper
- {
- object wrappedObject;
-
- public DispatchWrapper (object obj)
- {
- Marshal.GetIDispatchForObject (obj);
- wrappedObject = obj;
- }
-
- public object WrappedObject {
- get { return wrappedObject; }
- }
- }
-}
-#endif
+++ /dev/null
-//
-// System.Runtime.InteropServices.ErrorWrapper.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.
-//
-
-#if !FULL_AOT_RUNTIME
-using System;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public sealed class ErrorWrapper
- {
- int errorCode;
-
- public ErrorWrapper (Exception e)
- {
- this.errorCode = Marshal.GetHRForException (e);
- }
-
- public ErrorWrapper (int errorCode)
- {
- this.errorCode = errorCode;
- }
-
- public ErrorWrapper (object errorCode)
- {
- if (errorCode.GetType() != typeof(int))
- throw new ArgumentException ("errorCode has to be an int type");
- this.errorCode = (int)errorCode;
- }
-
- public int ErrorCode {
- get { return errorCode; }
- }
- }
-}
-#endif
+++ /dev/null
-//
-// System.Runtime.InteropServices.ExternalException.cs
-//
-// Author:
-// Miguel De Icaza (miguel@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.Runtime.Serialization;
-using System.Globalization;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [ComVisible (true)]
- public class ExternalException : SystemException
- {
- public ExternalException ()
- : base (Locale.GetText ("External exception"))
- {
- HResult = -2147467259;
- }
-
- public ExternalException (string message)
- : base (message)
- {
- HResult = -2147467259;
- }
-
- protected ExternalException(SerializationInfo info, StreamingContext context)
- : base (info, context) {
- }
-
- public ExternalException (string message, Exception inner)
- : base (message, inner)
- {
- HResult = -2147467259;
- }
-
- public ExternalException (string message, int errorCode)
- : base (message)
- {
- HResult = errorCode;
- }
-
- public virtual int ErrorCode {
- get {
- return HResult;
- }
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.HandleRef
-//
-// Author:
-// Tim Coleman (tim@timcoleman.com)
-//
-// Copyright (C) 2003 Tim Coleman
-
-//
-// 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;
-
-namespace System.Runtime.InteropServices {
- [ComVisible (true)]
- public struct HandleRef {
-
- #region Fields
-
- object wrapper;
- IntPtr handle;
-
- #endregion // Fields
-
- #region Constructors
-
- public HandleRef (object wrapper, IntPtr handle)
- {
- this.wrapper = wrapper;
- this.handle = handle;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public IntPtr Handle {
- get { return handle; }
- }
-
- public object Wrapper {
- get { return wrapper; }
- }
-
- #endregion // Properties
-
- #region Type Conversions
-
- public static explicit operator IntPtr (HandleRef value)
- {
- return value.Handle;
- }
-
- #endregion // Type Conversions
- public static IntPtr ToIntPtr(HandleRef value)
- {
- return value.Handle;
- // Why did MS add a function for this?
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.ICustomAdapter.cs
-//
-// Author:
-// Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// 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.Runtime.InteropServices {
-
- [ComVisible (true)]
- public interface ICustomAdapter {
- [return: MarshalAs (UnmanagedType.IUnknown)]
- object GetUnderlyingObject ();
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.ICustomFactory.cs
-//
-// Author:
-// Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// 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.Runtime.InteropServices {
-
- [ComVisible (true)]
- public interface ICustomFactory {
- MarshalByRefObject CreateInstance (Type serverType);
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.ICustomMarshaler.cs
-//
-// Author:
-// Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// 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.Runtime.InteropServices {
-
- [ComVisible (true)]
- public interface ICustomMarshaler {
- void CleanUpManagedData (object ManagedObj);
- void CleanUpNativeData (IntPtr pNativeData);
- int GetNativeDataSize ();
- IntPtr MarshalManagedToNative (object ManagedObj);
- object MarshalNativeToManaged (IntPtr pNativeData);
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.IRegistrationServices.cs
-//
-// Author:
-// Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// 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.Reflection;
-using System.Security.Permissions;
-namespace System.Runtime.InteropServices {
-
- [ComVisible(true)]
- [Guid("CCBD682C-73A5-4568-B8B0-C7007E11ABA2")]
- public interface IRegistrationServices {
- Guid GetManagedCategoryGuid ();
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- string GetProgIdForType (Type type);
-
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- Type[] GetRegistrableTypesInAssembly (Assembly assembly);
-
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- bool RegisterAssembly (Assembly assembly, AssemblyRegistrationFlags flags);
-
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- void RegisterTypeForComClients (Type type, ref Guid g);
-
- bool TypeRepresentsComType (Type type);
-
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- bool TypeRequiresRegistration (Type type);
-
- [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
- bool UnregisterAssembly (Assembly assembly);
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.InvalidComObjectException.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class InvalidComObjectException : SystemException
- {
- private const int ErrorCode = -2146233049; // = 0x80131527
-
- public InvalidComObjectException ()
- : base (Locale.GetText ("Invalid COM object is used"))
- {
- this.HResult = ErrorCode;
- }
-
- public InvalidComObjectException (string message)
- : base (message)
- {
- this.HResult = ErrorCode;
- }
-
- public InvalidComObjectException (string message, Exception inner)
- : base (message, inner)
- {
- this.HResult = ErrorCode;
- }
-
- protected InvalidComObjectException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.InvalidOleVariantTypeException.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class InvalidOleVariantTypeException : SystemException
- {
- private const int ErrorCode = -2146233039; // = 0x80131531
-
- public InvalidOleVariantTypeException ()
- : base (Locale.GetText ("Found native variant type cannot be marshalled to managed code"))
- {
- this.HResult = ErrorCode;
- }
-
- public InvalidOleVariantTypeException (string message)
- : base (message)
- {
- this.HResult = ErrorCode;
- }
-
- public InvalidOleVariantTypeException (string message, Exception inner)
- : base (message, inner)
- {
- this.HResult = ErrorCode;
- }
-
- protected InvalidOleVariantTypeException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
- }
-}
+++ /dev/null
-// LayoutKind.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:48 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (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.
-//
-
-
-namespace System.Runtime.InteropServices {
-
- [ComVisible(true)]
- [Serializable]
- public enum LayoutKind {
- Sequential = 0,
- Explicit = 2,
- Auto = 3
- }
-
-}
return GetFunctionPointerForDelegateInternal ((Delegate)(object)d);
}
+
+ internal static void SetLastWin32Error (int error)
+ {
+ }
}
}
+++ /dev/null
-//
-// System.Runtime.InteropServices.MarshalDirectiveException.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class MarshalDirectiveException : SystemException
- {
- private const int ErrorCode = -2146233035; // = 0x80131535
-
- public MarshalDirectiveException ()
- : base (Locale.GetText ("Unsupported MarshalAsAttribute found"))
- {
- this.HResult = ErrorCode;
- }
-
- public MarshalDirectiveException (string message)
- : base (message)
- {
- this.HResult = ErrorCode;
- }
-
- public MarshalDirectiveException (string message, Exception inner)
- : base (message, inner)
- {
- this.HResult = ErrorCode;
- }
-
- protected MarshalDirectiveException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.ObjectCreationDelegate.cs
-//
-// Author:
-// Miguel de Icaza (miguel@ximian.com)
-//
-// (C) Novell, 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;
-
-namespace System.Runtime.InteropServices {
-
- [ComVisible(true)]
- public delegate IntPtr ObjectCreationDelegate (IntPtr aggregator);
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.SEHException.cs
-//
-// Authors:
-// Gonzalo Paniagua Javier <gonzalo@ximian.com>
-//
-// (c) 2003 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class SEHException : ExternalException
- {
- public SEHException ()
- {
- }
-
- public SEHException (string message)
- : base (message)
- {
- }
-
- public SEHException (string message, Exception inner)
- : base (message, inner)
- {
- }
-
- protected SEHException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
-
- public virtual bool CanResume ()
- {
- return false;
- }
- }
-}
-
+++ /dev/null
-//
-// System.Runtime.InteropServices.SafeArrayRankMismatchException.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class SafeArrayRankMismatchException : SystemException
- {
- private const int ErrorCode = -2146233032; // = 0x80131538
-
- public SafeArrayRankMismatchException ()
- : base (Locale.GetText ("The incoming SAVEARRAY does not match the rank of the expected managed signature"))
- {
- this.HResult = ErrorCode;
- }
-
- public SafeArrayRankMismatchException (string message)
- : base (message)
- {
- this.HResult = ErrorCode;
- }
-
- public SafeArrayRankMismatchException (string message, Exception inner)
- : base (message, inner)
- {
- this.HResult = ErrorCode;
- }
-
- protected SafeArrayRankMismatchException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.SafeArrayTypeMismatchException.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [ComVisible(true)]
- [Serializable]
- public class SafeArrayTypeMismatchException : SystemException
- {
- private const int ErrorCode = -2146233037; // = 0x80131533
-
- public SafeArrayTypeMismatchException ()
- : base (Locale.GetText ("The incoming SAVEARRAY does not match the expected managed signature"))
- {
- this.HResult = ErrorCode;
- }
-
- public SafeArrayTypeMismatchException (string message)
- : base (message)
- {
- this.HResult = ErrorCode;
- }
-
- public SafeArrayTypeMismatchException (string message, Exception inner)
- : base (message, inner)
- {
- this.HResult = ErrorCode;
- }
-
- protected SafeArrayTypeMismatchException (SerializationInfo info, StreamingContext context)
- : base (info, context)
- {
- }
- }
-}
ReleaseHandle ();
}
}
-
- /*
- * Implement this abstract method in your derived class to specify how to
- * free the handle. Be careful not write any code that's subject to faults
- * in this method (the runtime will prepare the infrastructure for you so
- * that no jit allocations etc. will occur, but don't allocate memory unless
- * you can deal with the failure and still free the handle).
- * The boolean returned should be true for success and false if the runtime
- * should fire a SafeHandleCriticalFailure MDA (CustomerDebugProbe) if that
- * MDA is enabled.
- */
- [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
- protected abstract bool ReleaseHandle ();
}
}
+++ /dev/null
-//
-// System.Runtime.InteropServices.UnknownWrapper.cs
-//
-// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.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.Runtime.InteropServices
-{
- [Serializable, ComVisible(true)]
- public sealed class UnknownWrapper
- {
- private object InternalObject;
-
- public UnknownWrapper (object obj)
- {
- InternalObject = obj;
- }
-
- public object WrappedObject {
- get { return InternalObject; }
- }
- }
-}
+++ /dev/null
-//
-// System.Runtime.InteropServices.VariantWrapper.cs
-//
-// Author:
-// Gert Driesen (drieseng@users.sourceforge.net)
-//
-// (C) Novell, 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;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- public sealed class VariantWrapper
- {
- private object _wrappedObject;
-
- public VariantWrapper (object obj)
- {
- _wrappedObject = obj;
- }
-
- public object WrappedObject
- {
- get
- {
- return _wrappedObject;
- }
- }
- }
-}
public static bool IsMethodOverloaded(IMethodMessage msg)
{
const BindingFlags bfinst = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
- MonoType type = (MonoType) msg.MethodBase.DeclaringType;
+ RuntimeType type = (RuntimeType) msg.MethodBase.DeclaringType;
return type.GetMethodsByName (msg.MethodName, bfinst, false, type).Length > 1;
}
* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 147;
+ private const int mono_corlib_version = 148;
#pragma warning restore 169
[ComVisible (true)]
[ThreadStatic]
static Dictionary<Type, AttributeUsageAttribute> usage_cache;
- /* Treat as user types all corlib types extending System.Type that are not MonoType and TypeBuilder */
+ /* Treat as user types all corlib types extending System.Type that are not RuntimeType and TypeBuilder */
static bool IsUserCattrProvider (object obj)
{
Type type = obj as Type;
#if !FULL_AOT_RUNTIME
- if ((type is MonoType) || (type is TypeBuilder))
+ if ((type is RuntimeType) || (type is TypeBuilder))
#else
- if (type is MonoType)
+ if (type is RuntimeType)
#endif
return false;
if ((obj is Type))
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Collections.Generic;
-using System.Globalization;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Security;
-using System.Diagnostics.Contracts;
-using System.Threading;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Runtime.Remoting.Activation;
-using System.Runtime;
-
namespace System
{
- // Contains information about the type which is expensive to compute
- [StructLayout (LayoutKind.Sequential)]
- internal class MonoTypeInfo {
- // this is the displayed form: special characters
- // ,+*&*[]\ in the identifier portions of the names
- // have been escaped with a leading backslash (\)
- public string full_name;
- public MonoCMethod default_ctor;
- }
-
- [Serializable]
- [StructLayout (LayoutKind.Sequential)]
- class MonoType : RuntimeType, ISerializable
+ // Dummy type kept because lots of external code uses
+ // this to check whenever it is running on mono.
+ sealed class MonoType : RuntimeType
{
- [NonSerialized]
- MonoTypeInfo type_info;
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void type_from_obj (MonoType type, Object obj);
-
- internal MonoType (Object obj)
- {
- // this should not be used - lupus
- type_from_obj (this, obj);
-
- throw new NotImplementedException ();
- }
-
- internal override MonoCMethod GetDefaultConstructor ()
+ private MonoType ()
{
- MonoCMethod ctor = null;
-
- if (type_info == null)
- type_info = new MonoTypeInfo ();
- else
- ctor = type_info.default_ctor;
-
- if (ctor == null) {
- var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
-
- for (int i = 0; i < ctors.Length; ++i) {
- if (ctors [i].GetParametersCount () == 0) {
- type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
- break;
- }
- }
- }
-
- return ctor;
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
-
- internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
- {
- if (fromNoninstanciated == null)
- throw new ArgumentNullException ("fromNoninstanciated");
- return GetCorrespondingInflatedMethod (fromNoninstanciated);
- }
-
- internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
- {
- if (fromNoninstanciated == null)
- throw new ArgumentNullException ("fromNoninstanciated");
- return GetCorrespondingInflatedConstructor (fromNoninstanciated);
- }
-
- internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
- {
- /* create sensible flags from given FieldInfo */
- BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
- flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
- return GetField (fromNoninstanciated.Name, flags);
- }
-
- public override int GetHashCode()
- {
- Type t = UnderlyingSystemType;
- if (t != null && t != this)
- return t.GetHashCode ();
- return (int)_impl.Value;
- }
-
- public override string FullName {
- get {
- string fullName;
- // This doesn't need locking
- if (type_info == null)
- type_info = new MonoTypeInfo ();
- if ((fullName = type_info.full_name) == null)
- fullName = type_info.full_name = getFullName (true, false);
-
- return fullName;
- }
- }
-
- internal override bool IsUserType {
- get {
- return false;
- }
}
}
}
if (info == null)
throw new ArgumentNullException ("info");
- MonoType mt = ((MonoType) info.GetValue ("TypeObj", typeof (MonoType)));
+ RuntimeType mt = ((RuntimeType) info.GetValue ("TypeObj", typeof (RuntimeType)));
value = mt.TypeHandle.Value;
if (value == IntPtr.Zero)
throw new SerializationException (Locale.GetText ("Insufficient state."));
if (value == IntPtr.Zero)
throw new SerializationException ("Object fields may not be properly initialized");
- info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (MonoType));
+ info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (RuntimeType));
}
[ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
}
// check a class in mscorlib to determine if we're running on Mono
- if (Type.GetType ("System.MonoType", false) != null)
+ if (Type.GetType ("Mono.Runtime", false) != null)
is_mono = true;
}
<Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\corruptingexceptioncommon.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\exceptionnotification.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\exceptionservicescommon.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\arraywithoffset.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\attributes.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\bstrwrapper.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\callingconvention.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\charset.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\comexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\commembertype.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\ibindctx.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\iconnectionpoint.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\iconnectionpointcontainer.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypeinfo2.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypelib.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypelib2.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\criticalhandle.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\currencywrapper.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\dispatchwrapper.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\errorwrapper.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\expando\iexpando.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\externalexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\handleref.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomadapter.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomfactory.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustommarshaler.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomqueryinterface.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\invalidcomobjectexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\invalidolevarianttypeexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\iregistrationservices.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\layoutkind.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\marshaldirectiveexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\objectcreationdelegate.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\runtimeenvironment.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safearrayrankmismatchexception.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safearraytypemismatchexception.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safehandle.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\sehexception.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ucomienumconnections.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\unknownwrapper.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\variantWrapper.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\NgenServicingAttributes.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\remoting\callcontext.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\serialization\deserializationeventhandler.cs" />\r
<Compile Include="System.Runtime.InteropServices\_Thread.cs" />\r
<Compile Include="System.Runtime.InteropServices\_Type.cs" />\r
<Compile Include="System.Runtime.InteropServices\_TypeBuilder.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ArrayWithOffset.cs" />\r
- <Compile Include="System.Runtime.InteropServices\AssemblyRegistrationFlags.cs" />\r
<Compile Include="System.Runtime.InteropServices\BIND_OPTS.cs" />\r
<Compile Include="System.Runtime.InteropServices\BINDPTR.cs" />\r
- <Compile Include="System.Runtime.InteropServices\BStrWrapper.cs" />\r
<Compile Include="System.Runtime.InteropServices\CALLCONV.cs" />\r
- <Compile Include="System.Runtime.InteropServices\CallingConvention.cs" />\r
- <Compile Include="System.Runtime.InteropServices\CharSet.cs" />\r
- <Compile Include="System.Runtime.InteropServices\COMException.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ComMemberType.cs" />\r
- <Compile Include="System.Runtime.InteropServices\CriticalHandle.cs" />\r
- <Compile Include="System.Runtime.InteropServices\CurrencyWrapper.cs" />\r
<Compile Include="System.Runtime.InteropServices\DESCKIND.cs" />\r
- <Compile Include="System.Runtime.InteropServices\DispatchWrapper.cs" />\r
<Compile Include="System.Runtime.InteropServices\DISPPARAMS.cs" />\r
<Compile Include="System.Runtime.InteropServices\ELEMDESC.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ErrorWrapper.cs" />\r
<Compile Include="System.Runtime.InteropServices\EXCEPINFO.cs" />\r
<Compile Include="System.Runtime.InteropServices\ExporterEventKind.cs" />\r
<Compile Include="System.Runtime.InteropServices\ExtensibleClassFactory.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ExternalException.cs" />\r
<Compile Include="System.Runtime.InteropServices\FILETIME.cs" />\r
<Compile Include="System.Runtime.InteropServices\FUNCDESC.cs" />\r
<Compile Include="System.Runtime.InteropServices\FUNCFLAGS.cs" />\r
<Compile Include="System.Runtime.InteropServices\FUNCKIND.cs" />\r
<Compile Include="System.Runtime.InteropServices\GCHandle.cs" />\r
<Compile Include="System.Runtime.InteropServices\GCHandleType.cs" />\r
- <Compile Include="System.Runtime.InteropServices\HandleRef.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ICustomAdapter.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ICustomFactory.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ICustomMarshaler.cs" />\r
<Compile Include="System.Runtime.InteropServices\IDLDESC.cs" />\r
<Compile Include="System.Runtime.InteropServices\IDLFLAG.cs" />\r
<Compile Include="System.Runtime.InteropServices\IErrorInfo.cs" />\r
<Compile Include="System.Runtime.InteropServices\IMPLTYPEFLAGS.cs" />\r
<Compile Include="System.Runtime.InteropServices\ImporterEventKind.cs" />\r
- <Compile Include="System.Runtime.InteropServices\InvalidComObjectException.cs" />\r
- <Compile Include="System.Runtime.InteropServices\InvalidOleVariantTypeException.cs" />\r
<Compile Include="System.Runtime.InteropServices\INVOKEKIND.cs" />\r
- <Compile Include="System.Runtime.InteropServices\IRegistrationServices.cs" />\r
<Compile Include="System.Runtime.InteropServices\ITypeLibConverter.cs" />\r
<Compile Include="System.Runtime.InteropServices\ITypeLibExporterNameProvider.cs" />\r
<Compile Include="System.Runtime.InteropServices\ITypeLibExporterNotifySink.cs" />\r
<Compile Include="System.Runtime.InteropServices\ITypeLibImporterNotifySink.cs" />\r
- <Compile Include="System.Runtime.InteropServices\LayoutKind.cs" />\r
<Compile Include="System.Runtime.InteropServices\LIBFLAGS.cs" />\r
<Compile Include="System.Runtime.InteropServices\ManagedErrorInfo.cs" />\r
<Compile Include="System.Runtime.InteropServices\Marshal.cs" />\r
<Compile Include="System.Runtime.InteropServices\MarshalAsAttribute.cs" />\r
- <Compile Include="System.Runtime.InteropServices\MarshalDirectiveException.cs" />\r
- <Compile Include="System.Runtime.InteropServices\ObjectCreationDelegate.cs" />\r
<Compile Include="System.Runtime.InteropServices\PARAMDESC.cs" />\r
<Compile Include="System.Runtime.InteropServices\PARAMFLAG.cs" />\r
<Compile Include="System.Runtime.InteropServices\RegistrationClassContext.cs" />\r
<Compile Include="System.Runtime.InteropServices\RegistrationConnectionType.cs" />\r
<Compile Include="System.Runtime.InteropServices\RegistrationServices.cs" />\r
- <Compile Include="System.Runtime.InteropServices\SafeArrayRankMismatchException.cs" />\r
- <Compile Include="System.Runtime.InteropServices\SafeArrayTypeMismatchException.cs" />\r
<Compile Include="System.Runtime.InteropServices\SafeBuffer.cs" />\r
<Compile Include="System.Runtime.InteropServices\SafeHandle.cs" />\r
- <Compile Include="System.Runtime.InteropServices\SEHException.cs" />\r
<Compile Include="System.Runtime.InteropServices\STATSTG.cs" />\r
<Compile Include="System.Runtime.InteropServices\SYSKIND.cs" />\r
<Compile Include="System.Runtime.InteropServices\TYPEATTR.cs" />\r
<Compile Include="System.Runtime.InteropServices\UCOMITypeComp.cs" />\r
<Compile Include="System.Runtime.InteropServices\UCOMITypeInfo.cs" />\r
<Compile Include="System.Runtime.InteropServices\UCOMITypeLib.cs" />\r
- <Compile Include="System.Runtime.InteropServices\UnknownWrapper.cs" />\r
<Compile Include="System.Runtime.InteropServices\VARDESC.cs" />\r
<Compile Include="System.Runtime.InteropServices\VARFLAGS.cs" />\r
- <Compile Include="System.Runtime.InteropServices\VariantWrapper.cs" />\r
<Compile Include="System.Runtime.Remoting.Activation\ActivationServices.cs" />\r
<Compile Include="System.Runtime.Remoting.Activation\ActivatorLevel.cs" />\r
<Compile Include="System.Runtime.Remoting.Activation\AppDomainLevelActivator.cs" />\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
System.Runtime.InteropServices/_Thread.cs
System.Runtime.InteropServices/_Type.cs
System.Runtime.InteropServices/_TypeBuilder.cs
-System.Runtime.InteropServices/ArrayWithOffset.cs
-System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
System.Runtime.InteropServices/BIND_OPTS.cs
System.Runtime.InteropServices/BINDPTR.cs
-System.Runtime.InteropServices/BStrWrapper.cs
System.Runtime.InteropServices/CALLCONV.cs
-System.Runtime.InteropServices/CallingConvention.cs
-System.Runtime.InteropServices/CharSet.cs
-System.Runtime.InteropServices/COMException.cs
-System.Runtime.InteropServices/ComMemberType.cs
-System.Runtime.InteropServices/CriticalHandle.cs
-System.Runtime.InteropServices/CurrencyWrapper.cs
System.Runtime.InteropServices/DESCKIND.cs
-System.Runtime.InteropServices/DispatchWrapper.cs
System.Runtime.InteropServices/DISPPARAMS.cs
System.Runtime.InteropServices/ELEMDESC.cs
-System.Runtime.InteropServices/ErrorWrapper.cs
System.Runtime.InteropServices/EXCEPINFO.cs
System.Runtime.InteropServices/ExporterEventKind.cs
System.Runtime.InteropServices/ExtensibleClassFactory.cs
-System.Runtime.InteropServices/ExternalException.cs
System.Runtime.InteropServices/FILETIME.cs
System.Runtime.InteropServices/FUNCDESC.cs
System.Runtime.InteropServices/FUNCFLAGS.cs
System.Runtime.InteropServices/FUNCKIND.cs
System.Runtime.InteropServices/GCHandle.cs
System.Runtime.InteropServices/GCHandleType.cs
-System.Runtime.InteropServices/HandleRef.cs
-System.Runtime.InteropServices/ICustomAdapter.cs
-System.Runtime.InteropServices/ICustomFactory.cs
-System.Runtime.InteropServices/ICustomMarshaler.cs
System.Runtime.InteropServices/IDLDESC.cs
System.Runtime.InteropServices/IDLFLAG.cs
System.Runtime.InteropServices/IErrorInfo.cs
System.Runtime.InteropServices/IMPLTYPEFLAGS.cs
System.Runtime.InteropServices/INVOKEKIND.cs
-System.Runtime.InteropServices/IRegistrationServices.cs
System.Runtime.InteropServices/ITypeLibConverter.cs
System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs
System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs
System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs
System.Runtime.InteropServices/ImporterEventKind.cs
-System.Runtime.InteropServices/InvalidComObjectException.cs
-System.Runtime.InteropServices/InvalidOleVariantTypeException.cs
System.Runtime.InteropServices/LIBFLAGS.cs
-System.Runtime.InteropServices/LayoutKind.cs
System.Runtime.InteropServices/ManagedErrorInfo.cs
System.Runtime.InteropServices/Marshal.cs
System.Runtime.InteropServices/MarshalAsAttribute.cs
-System.Runtime.InteropServices/MarshalDirectiveException.cs
-System.Runtime.InteropServices/ObjectCreationDelegate.cs
System.Runtime.InteropServices/PARAMDESC.cs
System.Runtime.InteropServices/PARAMFLAG.cs
System.Runtime.InteropServices/RegistrationClassContext.cs
System.Runtime.InteropServices/RegistrationConnectionType.cs
-System.Runtime.InteropServices/SEHException.cs
System.Runtime.InteropServices/STATSTG.cs
System.Runtime.InteropServices/RegistrationServices.cs
-System.Runtime.InteropServices/SafeArrayRankMismatchException.cs
-System.Runtime.InteropServices/SafeArrayTypeMismatchException.cs
System.Runtime.InteropServices/SafeBuffer.cs
System.Runtime.InteropServices/SafeHandle.cs
System.Runtime.InteropServices/SYSKIND.cs
System.Runtime.InteropServices/UCOMITypeComp.cs
System.Runtime.InteropServices/UCOMITypeInfo.cs
System.Runtime.InteropServices/UCOMITypeLib.cs
-System.Runtime.InteropServices/UnknownWrapper.cs
System.Runtime.InteropServices/VARDESC.cs
System.Runtime.InteropServices/VARFLAGS.cs
-System.Runtime.InteropServices/VariantWrapper.cs
System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
../referencesource/mscorlib/system/runtime/exceptionservices/exceptionnotification.cs
../referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs
+../referencesource/mscorlib/system/runtime/interopservices/arraywithoffset.cs
../referencesource/mscorlib/system/runtime/interopservices/attributes.cs
+../referencesource/mscorlib/system/runtime/interopservices/bstrwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/callingconvention.cs
+../referencesource/mscorlib/system/runtime/interopservices/charset.cs
+../referencesource/mscorlib/system/runtime/interopservices/comexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/commembertype.cs
+../referencesource/mscorlib/system/runtime/interopservices/criticalhandle.cs
+../referencesource/mscorlib/system/runtime/interopservices/currencywrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/dispatchwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/errorwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/externalexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/handleref.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomadapter.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomfactory.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustommarshaler.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomqueryinterface.cs
+../referencesource/mscorlib/system/runtime/interopservices/invalidcomobjectexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/invalidolevarianttypeexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/iregistrationservices.cs
+../referencesource/mscorlib/system/runtime/interopservices/layoutkind.cs
+../referencesource/mscorlib/system/runtime/interopservices/marshaldirectiveexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/objectcreationdelegate.cs
../referencesource/mscorlib/system/runtime/interopservices/runtimeenvironment.cs
+../referencesource/mscorlib/system/runtime/interopservices/safearrayrankmismatchexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/safearraytypemismatchexception.cs
../referencesource/mscorlib/system/runtime/interopservices/safehandle.cs
+../referencesource/mscorlib/system/runtime/interopservices/sehexception.cs
../referencesource/mscorlib/system/runtime/interopservices/ucomienumconnections.cs
+../referencesource/mscorlib/system/runtime/interopservices/unknownwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/variantWrapper.cs
../referencesource/mscorlib/system/runtime/interopservices/ComTypes/ibindctx.cs
../referencesource/mscorlib/system/runtime/interopservices/ComTypes/iconnectionpoint.cs
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
return obj == (object)this;
}
+#if !MONO
public override int GetHashCode()
{
return RuntimeHelpers.GetHashCode(this);
}
+#endif
#if !FEATURE_CORECLR
public static bool operator ==(RuntimeType left, RuntimeType right)
return !(a == b);
}
+#if MONO
+ int CalculateCount()
+ {
+ Array a = m_array as Array;
+ if (a == null)
+ throw new ArgumentException ();
+
+ var total = a.Rank * a.Length;
+ return total - m_offset;
+ }
+#else
[System.Security.SecurityCritical] // auto-generated
[ResourceExposure(ResourceScope.None)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern int CalculateCount();
+#endif
private Object m_array;
private int m_offset;
GC.SuppressFinalize(this);
}
+#if MONO
+ static void FireCustomerDebugProbe()
+ {
+ }
+#else
[ResourceExposure(ResourceScope.None)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
private extern void FireCustomerDebugProbe();
+#endif
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected void SetHandle(IntPtr handle) {
**
**
=============================================================================*/
-
+#if !FULL_AOT_RUNTIME
namespace System.Runtime.InteropServices {
using System;
private Object m_WrappedObject;
}
}
+#endif
\ No newline at end of file
**
**
=============================================================================*/
-
+#if !FULL_AOT_RUNTIME
namespace System.Runtime.InteropServices {
using System;
private int m_ErrorCode;
}
}
+#endif
\ No newline at end of file
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern void SetHandleAsInvalid();
-
+#endif
// Implement this abstract method in your derived class to specify how to
// free the handle. Be careful not write any code that's subject to faults
// in this method (the runtime will prepare the infrastructure for you so
// MDA is enabled.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected abstract bool ReleaseHandle();
-
+#if !MONO
// Add a reason why this handle should not be relinquished (i.e. have
// ReleaseHandle called on it). This method has dangerous in the name since
// it must always be used carefully (e.g. called within a CER) to avoid
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
$(ProjectDir)\..\jay\jay.exe -ct < $(ProjectDir)\..\jay\skeleton.cs $(ProjectDir)\cs-parser.jay > $(ProjectDir)\cs-parser.cs\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<Folder Include="Properties\" />\r
</ItemGroup>\r
<ItemGroup>\r
- <EmbeddedResource Include="Transform.resources">\r
+ <EmbeddedResource Include="Transform.resx">\r
<LogicalName>NUnit.Util.Transform.resources</LogicalName>\r
</EmbeddedResource>\r
</ItemGroup>\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
</PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+ <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
</PostBuildEvent>\r
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
\r
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
-#define MONO_CORLIB_VERSION 147
+#define MONO_CORLIB_VERSION 148
typedef struct
{
MonoObject *
ves_icall_System_AppDomain_GetData (MonoAppDomain *ad, MonoString *name)
{
+ MonoError error;
MonoDomain *add;
MonoObject *o;
char *str;
add = ad->data;
g_assert (add);
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
mono_domain_lock (add);
#else
char *fname;
- fname = mono_string_to_utf8 (friendly_name);
+ fname = mono_string_to_utf8_checked (friendly_name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
ad = mono_domain_create_appdomain_internal (fname, setup, &error);
g_free (fname);
return NULL;
}
- name = filename = mono_string_to_utf8 (fname);
+ name = filename = mono_string_to_utf8_checked (fname, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
ass = mono_assembly_open_full (filename, &status, refOnly);
g_assert (assRef);
- name = mono_string_to_utf8 (assRef);
+ name = mono_string_to_utf8_checked (assRef, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
parsed = mono_assembly_name_parse (name, &aname);
g_free (name);
/* Have to attach to the runtime so shutdown can wait for this thread */
/* Force it to be attached to avoid racing during shutdown. */
- thread = mono_thread_attach_full (mono_get_root_domain (), TRUE, &error);
- if (!is_ok (&error)) {
- data->failure_reason = g_strdup (mono_error_get_message (&error));
- mono_error_cleanup (&error);
- goto failure;
- }
+ thread = mono_thread_attach_full (mono_get_root_domain (), TRUE);
+
mono_thread_set_name_internal (thread->internal_thread, mono_string_new (mono_get_root_domain (), "Domain unloader"), TRUE, &error);
if (!is_ok (&error)) {
data->failure_reason = g_strdup (mono_error_get_message (&error));
static MonoAssemblyName*
mono_assembly_apply_binding (MonoAssemblyName *aname, MonoAssemblyName *dest_name)
{
+ MonoError error;
MonoAssemblyBindingInfo *info, *info2;
MonoImage *ppimage;
MonoDomain *domain;
if (domain && domain->setup && domain->setup->configuration_file) {
mono_domain_lock (domain);
if (!domain->assembly_bindings_parsed) {
- gchar *domain_config_file_name = mono_string_to_utf8 (domain->setup->configuration_file);
+ gchar *domain_config_file_name = mono_string_to_utf8_checked (domain->setup->configuration_file, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
+
gchar *domain_config_file_path = mono_portability_find_file (domain_config_file_name, TRUE);
if (!domain_config_file_path)
extern MonoStats mono_stats;
-typedef gpointer (*MonoRemotingTrampoline) (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target);
+typedef gpointer (*MonoRemotingTrampoline) (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error);
typedef gpointer (*MonoDelegateTrampoline) (MonoDomain *domain, MonoClass *klass);
typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInfo *res);
MonoClass *fieldhandle_class;
MonoClass *methodhandle_class;
MonoClass *systemtype_class;
- MonoClass *monotype_class;
MonoClass *runtimetype_class;
MonoClass *exception_class;
MonoClass *threadabortexception_class;
g_hash_table_insert (ccw_hash, GINT_TO_POINTER (mono_object_hash (object)), ccw_list);
mono_cominterop_unlock ();
/* register for finalization to clean up ccw */
- mono_object_register_finalizer (object, error);
- return_val_if_nok (error, NULL);
+ mono_object_register_finalizer (object);
}
cinfo = mono_custom_attrs_from_class_checked (itf, error);
if (setup_finished)
return TRUE;
- keypad_xmit_str = keypad != NULL ? mono_string_to_utf8 (keypad) : NULL;
+ keypad_xmit_str = NULL;
+ if (keypad != NULL) {
+ keypad_xmit_str = mono_string_to_utf8_checked (keypad, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+ }
console_set_signal_handlers ();
setup_finished = TRUE;
if (!atexit_called) {
- if (teardown != NULL)
- teardown_str = mono_string_to_utf8 (teardown);
+ if (teardown != NULL) {
+ teardown_str = mono_string_to_utf8_checked (teardown, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+ }
mono_atexit (tty_teardown);
}
gboolean name_match;
name_match = strcmp (desc->name, method->name) == 0;
-#ifndef _EGLIB_MAJOR
- if (!name_match && desc->name_glob)
- name_match = g_pattern_match_simple (desc->name, method->name);
-#endif
if (!name_match)
return FALSE;
if (!desc->args)
void
mono_object_describe (MonoObject *obj)
{
+ MonoError error;
MonoClass* klass;
const char* sep;
if (!obj) {
}
klass = mono_object_class (obj);
if (klass == mono_defaults.string_class) {
- char *utf8 = mono_string_to_utf8 ((MonoString*)obj);
+ char *utf8 = mono_string_to_utf8_checked ((MonoString*)obj, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
if (strlen (utf8) > 60) {
utf8 [57] = '.';
utf8 [58] = '.';
mono_defaults.systemtype_class = mono_class_load_from_name (
mono_defaults.corlib, "System", "Type");
- mono_defaults.monotype_class = mono_class_load_from_name (
- mono_defaults.corlib, "System", "MonoType");
-
mono_defaults.runtimetype_class = mono_class_load_from_name (
mono_defaults.corlib, "System", "RuntimeType");
{
MonoObject *type = (MonoObject *)vtable->type;
- if (type->vtable->klass != mono_defaults.monotype_class)
+ if (type->vtable->klass != mono_defaults.runtimetype_class)
MONO_GC_UNREGISTER_ROOT_IF_MOVING (vtable->type);
}
MonoString *
ves_icall_System_IO_MonoIO_FindFirst (MonoString *path,
MonoString *path_with_pattern,
- gint32 *result_attr, gint32 *error,
+ gint32 *result_attr, gint32 *ioerror,
gpointer *handle)
{
+ MonoError error;
WIN32_FIND_DATA data;
HANDLE find_handle;
IncrementalFind *ifh;
MonoString *result;
- *error = ERROR_SUCCESS;
+ *ioerror = ERROR_SUCCESS;
find_handle = FindFirstFile (mono_string_chars (path_with_pattern), &data);
if (find_error == ERROR_FILE_NOT_FOUND)
return NULL;
- *error = find_error;
+ *ioerror = find_error;
return NULL;
}
ifh = g_new (IncrementalFind, 1);
ifh->find_handle = find_handle;
- ifh->utf8_path = mono_string_to_utf8 (path);
+ ifh->utf8_path = mono_string_to_utf8_checked (path, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
ifh->domain = mono_domain_get ();
*handle = ifh;
if (FindNextFile (find_handle, &data) == FALSE){
int e = GetLastError ();
if (e != ERROR_NO_MORE_FILES)
- *error = e;
+ *ioerror = e;
return NULL;
}
}
gint64
mono_filesize_from_path (MonoString *string)
{
+ MonoError error;
struct stat buf;
gint64 res;
- char *path = mono_string_to_utf8 (string);
+ char *path = mono_string_to_utf8_checked (string, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
MONO_ENTER_GC_SAFE;
if (stat (path, &buf) == -1)
XXX implement options
*/
static void*
-open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int access, int options, int *error)
+open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int access, int options, int *ioerror)
{
+ MonoError error;
struct stat buf;
- char *c_path = path ? mono_string_to_utf8 (path) : NULL;
+ char *c_path = NULL;
MmapHandle *handle = NULL;
int result, fd;
+ if (path) {
+ c_path = mono_string_to_utf8_checked (path, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
+ }
+
if (path)
result = stat (c_path, &buf);
else
if (mode == FILE_MODE_TRUNCATE || mode == FILE_MODE_APPEND || mode == FILE_MODE_OPEN) {
if (result == -1) { //XXX translate errno?
- *error = FILE_NOT_FOUND;
+ *ioerror = FILE_NOT_FOUND;
goto done;
}
}
if (mode == FILE_MODE_CREATE_NEW && result == 0) {
- *error = FILE_ALREADY_EXISTS;
+ *ioerror = FILE_ALREADY_EXISTS;
goto done;
}
* also makes little sense, so don't do the check if th file is one of these.
*/
if (buf.st_size == 0 && !is_special_zero_size_file (&buf)) {
- *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+ *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
goto done;
}
*capacity = buf.st_size;
} else if (*capacity < buf.st_size) {
- *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+ *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
goto done;
}
} else {
if (mode == FILE_MODE_CREATE_NEW && *capacity == 0) {
- *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+ *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
goto done;
}
}
fd = dup (input_fd);
if (fd == -1) { //XXX translate errno?
- *error = COULD_NOT_OPEN;
+ *ioerror = COULD_NOT_OPEN;
goto done;
}
#define MONO_ANON_FILE_TEMPLATE "/mono.anonmap.XXXXXXXXX"
static void*
-open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *error)
+open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *ioerror)
{
+ MonoError error;
char *c_mapName;
MmapHandle *handle;
if (*capacity <= 1) {
- *error = CAPACITY_MUST_BE_POSITIVE;
+ *ioerror = CAPACITY_MUST_BE_POSITIVE;
return NULL;
}
if (!(mode == FILE_MODE_CREATE_NEW || mode == FILE_MODE_OPEN_OR_CREATE || mode == FILE_MODE_OPEN)) {
- *error = INVALID_FILE_MODE;
+ *ioerror = INVALID_FILE_MODE;
return NULL;
}
- c_mapName = mono_string_to_utf8 (mapName);
+ c_mapName = mono_string_to_utf8_checked (mapName, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
named_regions_lock ();
handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
if (handle) {
if (mode == FILE_MODE_CREATE_NEW) {
- *error = FILE_ALREADY_EXISTS;
+ *ioerror = FILE_ALREADY_EXISTS;
goto done;
}
int unused G_GNUC_UNUSED, alloc_size;
if (mode == FILE_MODE_OPEN) {
- *error = FILE_NOT_FOUND;
+ *ioerror = FILE_NOT_FOUND;
goto done;
}
*capacity = align_up_to_page_size (*capacity);
tmp_dir = g_get_tmp_dir ();
alloc_size = strlen (tmp_dir) + strlen (MONO_ANON_FILE_TEMPLATE) + 1;
if (alloc_size > 1024) {//rather fail that stack overflow
- *error = COULD_NOT_MAP_MEMORY;
+ *ioerror = COULD_NOT_MAP_MEMORY;
goto done;
}
file_name = (char *)alloca (alloc_size);
fd = mkstemp (file_name);
if (fd == -1) {
- *error = COULD_NOT_MAP_MEMORY;
+ *ioerror = COULD_NOT_MAP_MEMORY;
goto done;
}
void *
-mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *ioerror)
{
+ MonoError error;
g_assert (path || mapName);
if (!mapName)
- return open_file_map (path, -1, mode, capacity, access, options, error);
+ return open_file_map (path, -1, mode, capacity, access, options, ioerror);
if (path) {
MmapHandle *handle;
- char *c_mapName = mono_string_to_utf8 (mapName);
+ char *c_mapName = mono_string_to_utf8_checked (mapName, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
named_regions_lock ();
handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
if (handle) {
- *error = FILE_ALREADY_EXISTS;
+ *ioerror = FILE_ALREADY_EXISTS;
handle = NULL;
} else {
- handle = (MmapHandle *)open_file_map (path, -1, mode, capacity, access, options, error);
+ handle = (MmapHandle *)open_file_map (path, -1, mode, capacity, access, options, ioerror);
if (handle) {
handle->name = g_strdup (c_mapName);
g_hash_table_insert (named_regions, handle->name, handle);
return handle;
}
- return open_memory_map (mapName, mode, capacity, access, options, error);
+ return open_memory_map (mapName, mode, capacity, access, options, ioerror);
}
void *
-mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *ioerror)
{
+ MonoError error;
MmapHandle *handle;
if (!mapName) {
- handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+ handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, ioerror);
} else {
- char *c_mapName = mono_string_to_utf8 (mapName);
+ char *c_mapName = mono_string_to_utf8_checked (mapName, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
named_regions_lock ();
handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
if (handle) {
- *error = FILE_ALREADY_EXISTS;
+ *ioerror = FILE_ALREADY_EXISTS;
handle = NULL;
} else {
//XXX we're exploiting wapi HANDLE == FD equivalence. THIS IS FRAGILE, create a _wapi_handle_to_fd call
- handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+ handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, ioerror);
handle->name = g_strdup (c_mapName);
g_hash_table_insert (named_regions, handle->name, handle);
}
int
ves_icall_System_IO_InotifyWatcher_AddWatch (int fd, MonoString *name, gint32 mask)
{
+ MonoError error;
char *str, *path;
int retval;
if (name == NULL)
return -1;
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return -1;
path = mono_portability_find_file (str, TRUE);
if (!path)
path = str;
/* useful until we keep track of gc-references in corlib etc. */
#define IS_GC_REFERENCE(class,t) (mono_gc_is_moving () ? FALSE : ((t)->type == MONO_TYPE_U && (class)->image == mono_defaults.corlib))
-void mono_object_register_finalizer (MonoObject *obj, MonoError *error);
+void mono_object_register_finalizer (MonoObject *obj);
void ves_icall_System_GC_InternalCollect (int generation);
gint64 ves_icall_System_GC_GetTotalMemory (MonoBoolean forceCollection);
void ves_icall_System_GC_KeepAlive (MonoObject *obj);
static MonoInternalThread *gc_thread;
-static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*), MonoError *error);
+static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*));
static void reference_queue_proccess_all (void);
static void mono_reference_queue_cleanup (void);
return result;
}
-static void
-add_thread_to_finalize (MonoInternalThread *thread)
+static gboolean
+add_thread_to_finalize (MonoInternalThread *thread, MonoError *error)
{
- MonoError error;
+ mono_error_init (error);
mono_finalizer_lock ();
if (!threads_to_finalize)
MONO_GC_REGISTER_ROOT_SINGLE (threads_to_finalize, MONO_ROOT_SOURCE_FINALIZER_QUEUE, "finalizable threads list");
- threads_to_finalize = mono_mlist_append_checked (threads_to_finalize, (MonoObject*)thread, &error);
+ threads_to_finalize = mono_mlist_append_checked (threads_to_finalize, (MonoObject*)thread, error);
mono_finalizer_unlock ();
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ return is_ok (error);
}
static gboolean suspend_finalizers = FALSE;
#endif
/* make sure the finalizer is not called again if the object is resurrected */
- object_register_finalizer ((MonoObject *)obj, NULL, &error);
- mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+ object_register_finalizer ((MonoObject *)obj, NULL);
if (log_finalizers)
g_log ("mono-gc-finalizers", G_LOG_LEVEL_MESSAGE, "<%s at %p> Registered finalizer as processed.", o->vtable->klass->name, o);
/* Don't finalize threadpool threads when
shutting down - they're finalized when the
threadpool shuts down. */
- add_thread_to_finalize (t);
+ if (!add_thread_to_finalize (t, &error))
+ goto unhandled_error;
return;
}
}
runtime_invoke = (RuntimeInvokeFunction)domain->finalize_runtime_invoke;
mono_runtime_class_init_full (o->vtable, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ if (!is_ok (&error))
+ goto unhandled_error;
if (G_UNLIKELY (MONO_GC_FINALIZE_INVOKE_ENABLED ())) {
MONO_GC_FINALIZE_INVOKE ((unsigned long)o, mono_object_get_size (o),
if (log_finalizers)
g_log ("mono-gc-finalizers", G_LOG_LEVEL_MESSAGE, "<%s at %p> Returned from finalizer.", o->vtable->klass->name, o);
+unhandled_error:
+ if (!is_ok (&error))
+ exc = (MonoObject*)mono_error_convert_to_exception (&error);
if (exc)
mono_thread_internal_unhandled_exception (exc);
void
mono_gc_finalize_threadpool_threads (void)
{
- MonoError error;
while (threads_to_finalize) {
MonoInternalThread *thread = (MonoInternalThread*) mono_mlist_get_data (threads_to_finalize);
/* Force finalization of the thread. */
thread->threadpool_thread = FALSE;
- mono_object_register_finalizer ((MonoObject*)thread, &error);
- mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+ mono_object_register_finalizer ((MonoObject*)thread);
mono_gc_run_finalize (thread, NULL);
* since that, too, can cause the underlying pointer to be offset.
*/
static void
-object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*), MonoError *error)
+object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*))
{
MonoDomain *domain;
- mono_error_init (error);
-
- if (obj == NULL) {
- mono_error_set_argument_null (error, "obj", "");
- return;
- }
+ g_assert (obj != NULL);
domain = obj->vtable->domain;
*
*/
void
-mono_object_register_finalizer (MonoObject *obj, MonoError *error)
+mono_object_register_finalizer (MonoObject *obj)
{
/* g_print ("Registered finalizer on %p %s.%s\n", obj, mono_object_class (obj)->name_space, mono_object_class (obj)->name); */
- object_register_finalizer (obj, mono_gc_run_finalize, error);
+ object_register_finalizer (obj, mono_gc_run_finalize);
}
/**
void
ves_icall_System_GC_ReRegisterForFinalize (MonoObject *obj)
{
- MonoError error;
-
MONO_CHECK_ARG_NULL (obj,);
- object_register_finalizer (obj, mono_gc_run_finalize, &error);
- mono_error_set_pending_exception (&error);
+ object_register_finalizer (obj, mono_gc_run_finalize);
}
void
ves_icall_System_GC_SuppressFinalize (MonoObject *obj)
{
- MonoError error;
-
MONO_CHECK_ARG_NULL (obj,);
/* delegates have no finalizers, but we register them to deal with the
* generated for it that needs cleaned up, but user wants to suppress
* their derived object finalizer. */
- object_register_finalizer (obj, NULL, &error);
- mono_error_set_pending_exception (&error);
+ object_register_finalizer (obj, NULL);
}
void
gboolean
mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data)
{
- MonoError error;
RefQueueEntry *entry;
if (queue->should_be_deleted)
return FALSE;
+ g_assert (obj != NULL);
+
entry = g_new0 (RefQueueEntry, 1);
entry->user_data = user_data;
entry->domain = mono_object_domain (obj);
entry->gchandle = mono_gchandle_new_weakref (obj, TRUE);
- mono_object_register_finalizer (obj, &error);
- mono_error_assert_ok (&error);
+ mono_object_register_finalizer (obj);
ref_list_push (&queue->queue, entry);
return TRUE;
ICALL(MCATTR_2, "GetCustomAttributesInternal", custom_attrs_get_by_type)
ICALL(MCATTR_3, "IsDefinedInternal", custom_attrs_defined_internal)
-ICALL_TYPE(MTYPE, "System.MonoType", MTYPE_1)
-ICALL(MTYPE_1, "GetCorrespondingInflatedConstructor", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_2, "GetCorrespondingInflatedMethod", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_3, "type_from_obj", ves_icall_MonoType_type_from_obj)
-
#ifndef DISABLE_SOCKETS
ICALL_TYPE(NDNS, "System.Net.Dns", NDNS_1)
ICALL(NDNS_1, "GetHostByAddr_internal(string,string&,string[]&,string[]&)", ves_icall_System_Net_Dns_GetHostByAddr_internal)
ICALL_TYPE(RT, "System.RuntimeType", RT_1)
ICALL(RT_1, "CreateInstanceInternal", ves_icall_System_Activator_CreateInstanceInternal)
-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, "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)
-ICALL(RT_10, "GetInterfaceMapData", ves_icall_Type_GetInterfaceMapData)
-ICALL(RT_11, "GetInterfaces", ves_icall_Type_GetInterfaces)
-ICALL(RT_12, "GetMethodsByName", ves_icall_Type_GetMethodsByName)
-ICALL(RT_13, "GetNestedTypes_internal", ves_icall_Type_GetNestedTypes)
-ICALL(RT_14, "GetPacking", ves_icall_Type_GetPacking)
-ICALL(RT_15, "GetPropertiesByName", ves_icall_Type_GetPropertiesByName)
+ICALL(RT_2, "GetConstructors_internal", ves_icall_RuntimeType_GetConstructors_internal)
+ICALL(RT_30, "GetCorrespondingInflatedConstructor", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_31, "GetCorrespondingInflatedMethod", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_3, "GetEvents_internal", ves_icall_RuntimeType_GetEvents_internal)
+ICALL(RT_5, "GetFields_internal", ves_icall_RuntimeType_GetFields_internal)
+ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_RuntimeType_GetGenericArguments)
+ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_RuntimeType_GetGenericParameterAttributes)
+ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_RuntimeType_GetGenericParameterConstraints)
+ICALL(RT_9, "GetGenericParameterPosition", ves_icall_RuntimeType_GetGenericParameterPosition)
+ICALL(RT_10, "GetInterfaceMapData", ves_icall_RuntimeType_GetInterfaceMapData)
+ICALL(RT_11, "GetInterfaces", ves_icall_RuntimeType_GetInterfaces)
+ICALL(RT_12, "GetMethodsByName", ves_icall_RuntimeType_GetMethodsByName)
+ICALL(RT_13, "GetNestedTypes_internal", ves_icall_RuntimeType_GetNestedTypes)
+ICALL(RT_14, "GetPacking", ves_icall_RuntimeType_GetPacking)
+ICALL(RT_15, "GetPropertiesByName", ves_icall_RuntimeType_GetPropertiesByName)
ICALL(RT_16, "GetTypeCodeImplInternal", ves_icall_type_GetTypeCodeInternal)
ICALL(RT_28, "IsTypeExportedToWindowsRuntime", ves_icall_System_RuntimeType_IsTypeExportedToWindowsRuntime)
ICALL(RT_29, "IsWindowsRuntimeObjectType", ves_icall_System_RuntimeType_IsWindowsRuntimeObjectType)
-ICALL(RT_17, "MakeGenericType", ves_icall_Type_MakeGenericType)
-ICALL(RT_18, "MakePointerType", ves_icall_Type_MakePointerType)
+ICALL(RT_17, "MakeGenericType", ves_icall_RuntimeType_MakeGenericType)
+ICALL(RT_18, "MakePointerType", ves_icall_RuntimeType_MakePointerType)
ICALL(RT_19, "getFullName", ves_icall_System_MonoType_getFullName)
-ICALL(RT_21, "get_DeclaringMethod", ves_icall_MonoType_get_DeclaringMethod)
-ICALL(RT_22, "get_DeclaringType", ves_icall_MonoType_get_DeclaringType)
-ICALL(RT_23, "get_Name", ves_icall_MonoType_get_Name)
-ICALL(RT_24, "get_Namespace", ves_icall_MonoType_get_Namespace)
-ICALL(RT_25, "get_core_clr_security_level", vell_icall_MonoType_get_core_clr_security_level)
-ICALL(RT_26, "make_array_type", ves_icall_Type_make_array_type)
-ICALL(RT_27, "make_byref_type", ves_icall_Type_make_byref_type)
+ICALL(RT_21, "get_DeclaringMethod", ves_icall_RuntimeType_get_DeclaringMethod)
+ICALL(RT_22, "get_DeclaringType", ves_icall_RuntimeType_get_DeclaringType)
+ICALL(RT_23, "get_Name", ves_icall_RuntimeType_get_Name)
+ICALL(RT_24, "get_Namespace", ves_icall_RuntimeType_get_Namespace)
+ICALL(RT_25, "get_core_clr_security_level", vell_icall_RuntimeType_get_core_clr_security_level)
+ICALL(RT_26, "make_array_type", ves_icall_RuntimeType_make_array_type)
+ICALL(RT_27, "make_byref_type", ves_icall_RuntimeType_make_byref_type)
ICALL_TYPE(RTH, "System.RuntimeTypeHandle", RTH_1)
ICALL(RTH_1, "GetArrayRank", ves_icall_RuntimeTypeHandle_GetArrayRank)
return ret;
}
-ICALL_EXPORT void
-ves_icall_MonoType_type_from_obj (MonoReflectionType *mtype, MonoObject *obj)
-{
- mtype->type = &obj->vtable->klass->byval_arg;
- g_assert (mtype->type->type);
-}
-
ICALL_EXPORT gint32
ves_icall_ModuleBuilder_getToken (MonoReflectionModuleBuilder *mb, MonoObject *obj, gboolean create_open_instance)
{
MonoBoolean ignoreCase)
{
MonoError error;
- char *str = mono_string_to_utf8 (name);
MonoTypeNameParse info;
- MonoReflectionType *type;
+ MonoReflectionType *type = NULL;
gboolean parsedOk;
+ char *str = mono_string_to_utf8_checked (name, &error);
+ if (!is_ok (&error))
+ goto leave;
+
parsedOk = mono_reflection_parse_type (str, &info);
/* mono_reflection_parse_type() mangles the string */
if (!parsedOk) {
mono_reflection_free_type_info (&info);
- if (throwOnError) {
- mono_error_init (&error);
+ if (throwOnError)
mono_error_set_argument (&error, "typeName", "failed parse: %s", str);
- mono_error_set_pending_exception (&error);
- }
- g_free (str);
- return NULL;
+ goto leave;
}
type = type_from_parsed_name (&info, ignoreCase, &error);
mono_reflection_free_type_info (&info);
- g_free (str);
- if (!mono_error_ok (&error)) {
+ if (!is_ok (&error))
+ goto leave;
+
+ if (type == NULL){
+ if (throwOnError) {
+ mono_error_set_type_load_name (&error, g_strdup (str), NULL, "");
+ goto leave;
+ }
+ }
+
+leave:
+ g_free (str);
+ if (!is_ok (&error)) {
if (throwOnError)
mono_error_set_pending_exception (&error);
else
return NULL;
}
- if (type == NULL){
- MonoException *e = NULL;
-
- if (throwOnError)
- e = mono_get_exception_type_load (name, NULL);
-
- if (e) {
- mono_set_pending_exception (e);
- return NULL;
- }
- }
-
return type;
}
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetInterfaces (MonoReflectionType* type)
+ves_icall_RuntimeType_GetInterfaces (MonoReflectionType* type)
{
MonoError error;
MonoClass *klass = mono_class_from_mono_type (type->type);
if (len == 0) {
g_hash_table_destroy (iface_hash);
if (!data.domain->empty_types) {
- data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.monotype_class, 0, &error);
+ data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, 0, &error);
if (!is_ok (&error))
goto fail;
}
return data.domain->empty_types;
}
- data.iface_array = mono_array_new_cached (data.domain, mono_defaults.monotype_class, len, &error);
+ data.iface_array = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, len, &error);
if (!is_ok (&error))
goto fail;
g_hash_table_foreach (iface_hash, fill_iface_array, &data);
}
ICALL_EXPORT void
-ves_icall_Type_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
+ves_icall_RuntimeType_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
{
gboolean variance_used;
MonoClass *klass = mono_class_from_mono_type (type->type);
}
ICALL_EXPORT void
-ves_icall_Type_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
+ves_icall_RuntimeType_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
{
MonoError error;
MonoClass *klass = mono_class_from_mono_type (type->type);
}
ICALL_EXPORT MonoReflectionType*
-ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
+ves_icall_RuntimeType_get_DeclaringType (MonoReflectionType *type)
{
MonoError error;
MonoReflectionType *ret;
}
ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Name (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Name (MonoReflectionType *type)
{
MonoDomain *domain = mono_domain_get ();
MonoClass *klass = mono_class_from_mono_type (type->type);
}
ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Namespace (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Namespace (MonoReflectionType *type)
{
MonoDomain *domain = mono_domain_get ();
MonoClass *klass = mono_class_from_mono_type (type->type);
}
ICALL_EXPORT MonoArray*
-ves_icall_MonoType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
+ves_icall_RuntimeType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
{
MonoError error;
MonoReflectionType *rt;
}
ICALL_EXPORT MonoReflectionType*
-ves_icall_Type_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
+ves_icall_RuntimeType_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
{
MonoError error;
MonoReflectionType *ret;
}
ICALL_EXPORT gint32
-ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterPosition (MonoReflectionType *type)
{
if (!IS_MONOTYPE (type))
return -1;
}
ICALL_EXPORT GenericParameterAttributes
-ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterAttributes (MonoReflectionType *type)
{
g_assert (IS_MONOTYPE (type));
g_assert (is_generic_parameter (type->type));
}
ICALL_EXPORT MonoArray *
-ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterConstraints (MonoReflectionType *type)
{
MonoError error;
MonoReflectionType *rt;
for (count = 0, ptr = param_info->constraints; ptr && *ptr; ptr++, count++)
;
- res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, &error);
+ res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, &error);
if (mono_error_set_pending_exception (&error))
return NULL;
for (i = 0; i < count; i++) {
}
ICALL_EXPORT MonoReflectionMethod*
-ves_icall_MonoType_GetCorrespondingInflatedMethod (MonoReflectionType *type,
+ves_icall_RuntimeType_GetCorrespondingInflatedMethod (MonoReflectionType *type,
MonoReflectionMethod* generic)
{
MonoDomain *domain;
}
ICALL_EXPORT MonoReflectionMethod *
-ves_icall_MonoType_get_DeclaringMethod (MonoReflectionType *ref_type)
+ves_icall_RuntimeType_get_DeclaringMethod (MonoReflectionType *ref_type)
{
MonoMethod *method;
MonoType *type = ref_type->type;
}
name = mono_array_get (params, MonoString *, 1);
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
do {
MonoClassField* field = mono_class_get_field_from_name (k, str);
}
name = mono_array_get (params, MonoString *, 1);
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
do {
MonoClassField* field = mono_class_get_field_from_name (k, str);
};
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
{
MonoError error;
MonoDomain *domain;
if (name != NULL) {
if (utf8_name == NULL) {
- utf8_name = mono_string_to_utf8 (name);
+ utf8_name = mono_string_to_utf8_checked (name, &error);
+ if (!is_ok (&error))
+ goto fail;
compare_func = (bflags & BFLAGS_IgnoreCase) ? mono_utf8_strcasecmp : strcmp;
}
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
{
static MonoClass *MethodInfo_array;
MonoError error;
return res;
}
- if (name)
- mname = mono_string_to_utf8 (name);
+ if (name) {
+ mname = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
+ }
method_array = mono_class_get_methods_by_name (klass, mname, bflags, ignore_case, FALSE, &ex);
g_free ((char*)mname);
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
{
MonoDomain *domain;
MonoClass *startklass, *klass, *refklass;
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
{
MonoError error;
MonoDomain *domain;
klass = startklass = mono_class_from_mono_type (type->type);
if (name != NULL) {
- propname = mono_string_to_utf8 (name);
+ propname = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
compare_func = (ignore_case) ? mono_utf8_strcasecmp : strcmp;
}
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
{
MonoError error;
MonoDomain *domain;
if (name != NULL) {
if (utf8_name == NULL) {
- utf8_name = mono_string_to_utf8 (name);
+ utf8_name = mono_string_to_utf8_checked (name, &error);
+ if (!is_ok (&error))
+ goto failure;
compare_func = (bflags & BFLAGS_IgnoreCase) ? mono_utf8_strcasecmp : strcmp;
}
}
ICALL_EXPORT MonoArray*
-ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
+ves_icall_RuntimeType_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
{
MonoError error;
MonoReflectionType *rt;
domain = ((MonoObject *)type)->vtable->domain;
if (type->type->byref) {
- MonoArray *result = mono_array_new_cached (domain, mono_defaults.monotype_class, 0, &error);
+ MonoArray *result = mono_array_new_cached (domain, mono_defaults.runtimetype_class, 0, &error);
mono_error_set_pending_exception (&error);
return result;
}
if (name != NULL) {
if (str == NULL) {
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (!is_ok (&error))
+ goto leave;
mono_identifier_unescape_type_name_chars (str);
}
mono_ptr_array_append (tmp_array, (MonoObject*) rt);
}
- res = mono_array_new_cached (domain, mono_defaults.monotype_class, mono_ptr_array_size (tmp_array), &error);
+ res = mono_array_new_cached (domain, mono_defaults.runtimetype_class, mono_ptr_array_size (tmp_array), &error);
if (!is_ok (&error))
goto leave;
/* On MS.NET, this does not fire a TypeResolve event */
type_resolve = TRUE;
- str = mono_string_to_utf8 (name);
+ str = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
/*g_print ("requested type %s in %s\n", str, assembly->assembly->aname.name);*/
if (!mono_reflection_parse_type (str, &info)) {
g_free (str);
MonoImageOpenStatus status;
MonoReflectionAssembly* result = NULL;
- name = mono_string_to_utf8 (mname);
+ name = mono_string_to_utf8_checked (mname, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
res = mono_assembly_load_with_partial_name (name, &status);
g_free (name);
ves_icall_System_Reflection_Assembly_GetManifestResourceInternal (MonoReflectionAssembly *assembly, MonoString *name, gint32 *size, MonoReflectionModule **ref_module)
{
MonoError error;
- char *n = mono_string_to_utf8 (name);
MonoTableInfo *table = &assembly->assembly->image->tables [MONO_TABLE_MANIFESTRESOURCE];
guint32 i;
guint32 cols [MONO_MANIFEST_SIZE];
const char *val;
MonoImage *module;
+ char *n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
+
for (i = 0; i < table->rows; ++i) {
mono_metadata_decode_row (table, i, cols, MONO_MANIFEST_SIZE);
val = mono_metadata_string_heap (assembly->assembly->image, cols [MONO_MANIFEST_NAME]);
const char *val;
char *n;
- n = mono_string_to_utf8 (name);
+ n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
for (i = 0; i < table->rows; ++i) {
mono_metadata_decode_row (table, i, cols, MONO_MANIFEST_SIZE);
val = mono_metadata_string_heap (assembly->assembly->image, cols [MONO_MANIFEST_NAME]);
/* check hash if needed */
if (name) {
- n = mono_string_to_utf8 (name);
+ n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
+
for (i = 0; i < table->rows; ++i) {
val = mono_metadata_string_heap (assembly->assembly->image, mono_metadata_decode_row_col (table, i, MONO_FILE_NAME));
if (strcmp (val, n) == 0) {
}
ICALL_EXPORT int
-vell_icall_MonoType_get_core_clr_security_level (MonoReflectionType *rfield)
+vell_icall_RuntimeType_get_core_clr_security_level (MonoReflectionType *rfield)
{
MonoError error;
MonoClass *klass = mono_class_from_mono_type (rfield->type);
MonoAssemblyName name;
char *dirname;
- filename = mono_string_to_utf8 (fname);
+ filename = mono_string_to_utf8_checked (fname, &error);
+ if (mono_error_set_pending_exception (&error))
+ return;
dirname = g_path_get_dirname (filename);
replace_shadow_path (mono_domain_get (), dirname, &filename);
} else {
count = tdef->rows - 1;
}
- res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, error);
+ res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, error);
return_val_if_nok (error, NULL);
*exceptions = mono_array_new_checked (domain, mono_defaults.exception_class, count, error);
return_val_if_nok (error, NULL);
len1 = mono_array_length (res);
len2 = mono_array_length (res2);
- res3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+ res3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
if (mono_error_set_pending_exception (&error))
return NULL;
mono_array_memcpy_refs (res3, 0, res, 0, len1);
mono_array_memcpy_refs (res3, len1, res2, 0, len2);
res = res3;
- ex3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+ ex3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
if (mono_error_set_pending_exception (&error))
return NULL;
mono_array_memcpy_refs (ex3, 0, exceptions, 0, len1);
gboolean is_token_defined;
aname.public_key = NULL;
- val = mono_string_to_utf8 (assname);
+ val = mono_string_to_utf8_checked (assname, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+
if (!mono_assembly_name_parse_full (val, &aname, TRUE, &is_version_defined, &is_token_defined)) {
g_free ((guint8*) aname.public_key);
g_free (val);
int i;
if (!module->image) {
- MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.monotype_class, 0, &error);
+ MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.runtimetype_class, 0, &error);
mono_error_set_pending_exception (&error);
return arr;
} else {
MonoReflectionType *ret;
MonoClass *klass;
int isbyref = 0, rank;
- char *str = mono_string_to_utf8 (smodifiers);
char *p;
+ char *str = mono_string_to_utf8_checked (smodifiers, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
klass = mono_class_from_mono_type (tb->type.type);
p = str;
}
ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_array_type (MonoReflectionType *type, int rank)
+ves_icall_RuntimeType_make_array_type (MonoReflectionType *type, int rank)
{
MonoError error;
MonoReflectionType *ret;
}
ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_byref_type (MonoReflectionType *type)
+ves_icall_RuntimeType_make_byref_type (MonoReflectionType *type)
{
MonoError error;
MonoReflectionType *ret;
}
ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_MakePointerType (MonoReflectionType *type)
+ves_icall_RuntimeType_MakePointerType (MonoReflectionType *type)
{
MonoError error;
MonoReflectionType *ret;
}
tp->custom_type_info = (mono_object_isinst_checked (this_obj, mono_defaults.iremotingtypeinfo_class, &error) != NULL);
- if (!is_ok (&error)) {
- mono_error_set_pending_exception (&error);
+ if (mono_error_set_pending_exception (&error))
return NULL;
- }
tp->remote_class = mono_remote_class (domain, class_name, klass, &error);
- if (!is_ok (&error)) {
- mono_error_set_pending_exception (&error);
+ if (mono_error_set_pending_exception (&error))
return NULL;
- }
- res->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tp->remote_class, rp);
+ res->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tp->remote_class, rp, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
return res;
}
ICALL_EXPORT MonoString *
ves_icall_System_Environment_GetEnvironmentVariable (MonoString *name)
{
+ MonoError error;
const gchar *value;
gchar *utf8_name;
if (name == NULL)
return NULL;
- utf8_name = mono_string_to_utf8 (name); /* FIXME: this should be ascii */
+ utf8_name = mono_string_to_utf8_checked (name, &error); /* FIXME: this should be ascii */
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
value = g_getenv (utf8_name);
g_free (utf8_name);
#endif
}
-/*
- * If your platform lacks setenv/unsetenv, you must upgrade your glib.
- */
-#if !GLIB_CHECK_VERSION(2,4,0)
-#define g_setenv(a,b,c) setenv(a,b,c)
-#define g_unsetenv(a) unsetenv(a)
-#endif
-
ICALL_EXPORT void
ves_icall_System_Environment_InternalSetEnvironmentVariable (MonoString *name, MonoString *value)
{
g_free (utf16_name);
g_free (utf16_value);
#else
- utf8_name = mono_string_to_utf8 (name); /* FIXME: this should be ascii */
+ utf8_name = mono_string_to_utf8_checked (name, &error); /* FIXME: this should be ascii */
+ if (mono_error_set_pending_exception (&error))
+ return;
if ((value == NULL) || (mono_string_length (value) == 0) || (mono_string_chars (value)[0] == 0)) {
g_unsetenv (utf8_name);
static MonoString *
get_bundled_app_config (void)
{
+ MonoError error;
const gchar *app_config;
MonoDomain *domain;
MonoString *file;
return NULL;
// Retrieve config file and remove the extension
- config_file_name = mono_string_to_utf8 (file);
+ config_file_name = mono_string_to_utf8_checked (file, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
config_file_path = mono_portability_find_file (config_file_name, TRUE);
if (!config_file_path)
config_file_path = config_file_name;
const CultureInfoEntry *ci;
char *n;
- n = mono_string_to_utf8 (name);
+ n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
ne = (const CultureInfoNameEntry *)mono_binary_search (n, culture_name_entries, NUM_CULTURE_ENTRIES,
sizeof (CultureInfoNameEntry), culture_name_locator);
g_free (n);
const CultureInfoNameEntry *ne;
char *n;
- n = mono_string_to_utf8 (name);
+ n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
ne = (const CultureInfoNameEntry *)mono_binary_search (n, culture_name_entries, NUM_CULTURE_ENTRIES,
sizeof (CultureInfoNameEntry), culture_name_locator);
ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this_obj,
MonoString *name)
{
+ MonoError error;
const RegionInfoNameEntry *ne;
char *n;
- n = mono_string_to_utf8 (name);
+ n = mono_string_to_utf8_checked (name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
ne = (const RegionInfoNameEntry *)mono_binary_search (n, region_name_entries, NUM_REGION_ENTRIES,
sizeof (RegionInfoNameEntry), region_name_locator);
return result;
}
+static char*
+ves_icall_mono_string_to_utf8 (MonoString *str)
+{
+ MonoError error;
+ char *result = mono_string_to_utf8_checked (str, &error);
+ mono_error_set_pending_exception (&error);
+ return result;
+}
+
void
mono_marshal_init (void)
{
register_icall (mono_string_from_byvalwstr, "mono_string_from_byvalwstr", "obj ptr int", FALSE);
register_icall (mono_string_new_wrapper, "mono_string_new_wrapper", "obj ptr", FALSE);
register_icall (mono_string_new_len_wrapper, "mono_string_new_len_wrapper", "obj ptr int", FALSE);
- register_icall (mono_string_to_utf8, "mono_string_to_utf8", "ptr obj", FALSE);
+ register_icall (ves_icall_mono_string_to_utf8, "ves_icall_mono_string_to_utf8", "ptr obj", FALSE);
register_icall (mono_string_to_lpstr, "mono_string_to_lpstr", "ptr obj", FALSE);
register_icall (mono_string_to_ansibstr, "mono_string_to_ansibstr", "ptr object", FALSE);
register_icall (mono_string_builder_to_utf8, "mono_string_builder_to_utf8", "ptr object", FALSE);
delegate_hash_table_add (delegate);
/* when the object is collected, collect the dynamic method, too */
- mono_object_register_finalizer ((MonoObject*)delegate, &error);
- if (!is_ok (&error))
- goto fail2;
+ mono_object_register_finalizer ((MonoObject*)delegate);
return delegate->delegate_trampoline;
-fail2:
- delegate_hash_table_remove (delegate);
fail:
mono_gchandle_free (target_handle);
mono_error_set_pending_exception (&error);
return as;
}
#else
- return mono_string_to_utf8 (s);
+ MonoError error;
+ char *result = mono_string_to_utf8_checked (s, &error);
+ mono_error_set_pending_exception (&error);
+ return result;
#endif
}
void
mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
{
+ MonoError error;
char *s;
int len;
if (!src)
return;
- s = mono_string_to_utf8 (src);
+ s = mono_string_to_utf8_checked (src, &error);
+ if (mono_error_set_pending_exception (&error))
+ return;
len = MIN (size, strlen (s));
if (len >= size)
len--;
} else
#endif
{
- res = mono_threadpool_ms_end_invoke (ares, &out_args, &exc);
+ res = mono_threadpool_ms_end_invoke (ares, &out_args, &exc, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
}
if (exc) {
if (((MonoException*)exc)->stack_trace) {
- char *strace = mono_string_to_utf8 (((MonoException*)exc)->stack_trace);
- char *tmp;
- tmp = g_strdup_printf ("%s\nException Rethrown at:\n", strace);
- g_free (strace);
- MONO_OBJECT_SETREF (((MonoException*)exc), stack_trace, mono_string_new (domain, tmp));
- g_free (tmp);
+ MonoError inner_error;
+ char *strace = mono_string_to_utf8_checked (((MonoException*)exc)->stack_trace, &inner_error);
+ if (is_ok (&inner_error)) {
+ char *tmp;
+ tmp = g_strdup_printf ("%s\nException Rethrown at:\n", strace);
+ g_free (strace);
+ MONO_OBJECT_SETREF (((MonoException*)exc), stack_trace, mono_string_new (domain, tmp));
+ g_free (tmp);
+ } else
+ mono_error_cleanup (&inner_error); /* no stack trace, but at least throw the original exception */
}
mono_set_pending_exception ((MonoException*)exc);
}
int
ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf (MonoReflectionType *type, MonoString *field_name)
{
+ MonoError error;
MonoMarshalType *info;
MonoClass *klass;
char *fname;
MONO_CHECK_ARG_NULL (type, 0);
MONO_CHECK_ARG_NULL (field_name, 0);
- fname = mono_string_to_utf8 (field_name);
+ fname = mono_string_to_utf8_checked (field_name, &error);
+ if (mono_error_set_pending_exception (&error))
+ return 0;
klass = mono_class_from_mono_type (type->type);
if (!mono_class_init (klass)) {
mono_set_pending_exception (mono_class_get_exception_for_failure (klass));
gpointer
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (MonoString *string)
{
+ MonoError error;
#ifdef HOST_WIN32
char* tres, *ret;
size_t len;
- tres = mono_string_to_utf8 (string);
+ tres = mono_string_to_utf8_checked (string, &error);
+ if (mono_error_set_pending_exception (&error))
+ return NULL;
if (!tres)
return tres;
return ret;
#else
- return mono_string_to_utf8 (string);
+ char *ret = mono_string_to_utf8_checked (string, &error);
+ mono_error_set_pending_exception (&error);
+ return ret;
#endif
}
mon = lock_word_get_inflated_lock (lw);
/* Do this WaitSleepJoin check before creating the event handle */
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return FALSE;
event = CreateEvent (NULL, FALSE, FALSE, NULL);
if (event == NULL) {
LOCK_DEBUG (g_message ("%s: (%d) queuing handle %p", __func__, mono_thread_info_get_small_id (), event));
- mono_thread_current_check_pending_interrupt ();
+ /* This looks superfluous */
+ if (mono_thread_current_check_pending_interrupt ()) {
+ CloseHandle (event);
+ return FALSE;
+ }
mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
static int
id_from_string (MonoString *instance, gboolean is_process)
{
+ MonoError error;
int id = -1;
if (mono_string_length (instance)) {
- char *id_str = mono_string_to_utf8 (instance);
+ char *id_str = mono_string_to_utf8_checked (instance, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
char *end;
id = strtol (id_str, &end, 0);
if (end == id_str && !is_process)
static void*
network_get_impl (MonoString* counter, MonoString* instance, int *type, MonoBoolean *custom)
{
+ MonoError error;
const CounterDesc *cdesc;
NetworkVtableArg *narg;
ImplVtable *vtable;
*custom = FALSE;
if ((cdesc = get_counter_in_category (&predef_categories [CATEGORY_NETWORK], counter))) {
- instance_name = mono_string_to_utf8 (instance);
+ instance_name = mono_string_to_utf8_checked (instance, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
narg = g_new0 (NetworkVtableArg, 1);
narg->id = cdesc->id;
narg->name = instance_name;
static ImplVtable*
predef_vtable (void *arg, MonoString *instance)
{
+ MonoError error;
MonoSharedArea *area;
PredefVtable *vtable;
- char *pids = mono_string_to_utf8 (instance);
+ char *pids = mono_string_to_utf8_checked (instance, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
int pid;
pid = atoi (pids);
static void*
custom_get_impl (SharedCategory *cat, MonoString* counter, MonoString* instance, int *type)
{
+ MonoError error;
SharedCounter *scounter;
SharedInstance* inst;
char *name;
if (!scounter)
return NULL;
*type = simple_type_to_type [scounter->type];
- name = mono_string_to_utf8 (counter);
+ name = mono_string_to_utf8_checked (counter, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
inst = custom_get_instance (cat, scounter, name);
g_free (name);
if (!inst)
SharedCategory *cat;
/* FIXME: ensure there isn't a category created already */
- mono_error_init (&error);
name = mono_string_to_utf8_checked (category, &error);
if (!mono_error_ok (&error))
goto failure;
int
mono_perfcounter_instance_exists (MonoString *instance, MonoString *category, MonoString *machine)
{
+ MonoError error;
const CategoryDesc *cdesc;
SharedInstance *sinst;
char *name;
scat = find_custom_category (category);
if (!scat)
return FALSE;
- name = mono_string_to_utf8 (instance);
+ name = mono_string_to_utf8_checked (instance, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
sinst = find_custom_instance (scat, name);
g_free (name);
if (sinst)
extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal(MonoString *iface, MonoArray **gw_addr_list)
{
+ MonoError error;
size_t needed;
in_addr_t in;
int mib[6];
MonoDomain *domain = mono_domain_get ();
- ifacename = mono_string_to_utf8(iface);
+ ifacename = mono_string_to_utf8_checked(iface, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+
if ((ifindex = if_nametoindex(ifacename)) == 0)
return FALSE;
g_free(ifacename);
MonoType *type;
};
+/* This corresponds to System.RuntimeType */
typedef struct {
MonoReflectionType type;
MonoObject *type_info;
mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg, MonoObject **exc, MonoArray **out_args, MonoError *error);
gpointer
-mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *real_proxy);
+mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *real_proxy, MonoError *error);
-void
-mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass);
+gboolean
+mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass, MonoError *error);
void*
mono_load_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, void **res, MonoError *error);
MonoException *exc_to_store = mono_error_convert_to_exception (error);
/* What we really want to do here is clone the error object and store one copy in the
* domain's exception hash and use the other one to error out here. */
+ mono_error_init (error);
mono_error_set_exception_instance (error, exc_to_store);
/*
* Store the exception object so it could be thrown on subsequent
#ifndef DISABLE_REMOTING
static gpointer
-default_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target)
+default_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error)
{
g_error ("remoting not installed");
return NULL;
* re-acquire them and check if another thread has created the vtable in the meantime.
*/
/* Special case System.MonoType to avoid infinite recursion */
- if (klass != mono_defaults.monotype_class) {
+ if (klass != mono_defaults.runtimetype_class) {
vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
if (!is_ok (error)) {
mono_domain_unlock (domain);
return NULL;
}
- if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+ if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
/* This is unregistered in
unregister_vtable_reflection_type() in
domain.c. */
klass->runtime_info = runtime_info;
}
- if (klass == mono_defaults.monotype_class) {
+ if (klass == mono_defaults.runtimetype_class) {
vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
if (!is_ok (error)) {
mono_domain_unlock (domain);
return NULL;
}
- if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+ if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
/* This is unregistered in
unregister_vtable_reflection_type() in
domain.c. */
* mono_class_proxy_vtable:
* @domain: the application domain
* @remove_class: the remote class
+ * @error: set on error
*
* Creates a vtable for transparent proxies. It is basically
* a copy of the real vtable of the class wrapped in @remote_class,
* but all function pointers invoke the remoting functions, and
* vtable->klass points to the transparent proxy class, and not to @class.
+ *
+ * On failure returns NULL and sets @error
*/
static MonoVTable *
-mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRemotingTarget target_type)
+mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRemotingTarget target_type, MonoError *error)
{
MONO_REQ_GC_UNSAFE_MODE;
- MonoError error;
MonoVTable *vt, *pvt;
int i, j, vtsize, max_interface_id, extra_interface_vtsize = 0;
MonoClass *k;
GSList *extra_interfaces = NULL;
MonoClass *klass = remote_class->proxy_class;
gpointer *interface_offsets;
- uint8_t *bitmap;
+ uint8_t *bitmap = NULL;
int bsize;
size_t imt_table_bytes;
int bcsize;
#endif
+ mono_error_init (error);
+
vt = mono_class_vtable (domain, klass);
g_assert (vt); /*FIXME property handle failure*/
max_interface_id = vt->max_interface_id;
method_count = mono_class_num_methods (iclass);
- ifaces = mono_class_get_implemented_interfaces (iclass, &error);
- g_assert (mono_error_ok (&error)); /*FIXME do proper error handling*/
+ ifaces = mono_class_get_implemented_interfaces (iclass, error);
+ if (!is_ok (error))
+ goto failure;
if (ifaces) {
for (i = 0; i < ifaces->len; ++i) {
MonoClass *ic = (MonoClass *)g_ptr_array_index (ifaces, i);
method_count += mono_class_num_methods (ic);
}
g_ptr_array_free (ifaces, TRUE);
+ ifaces = NULL;
}
extra_interface_vtsize += method_count * sizeof (gpointer);
for (i = 0; i < klass->vtable_size; ++i) {
MonoMethod *cm;
- if ((cm = klass->vtable [i]))
- pvt->vtable [i] = arch_create_remoting_trampoline (domain, cm, target_type);
- else
+ if ((cm = klass->vtable [i])) {
+ pvt->vtable [i] = arch_create_remoting_trampoline (domain, cm, target_type, error);
+ if (!is_ok (error))
+ goto failure;
+ } else
pvt->vtable [i] = NULL;
}
MonoMethod* m;
gpointer iter = NULL;
while ((m = mono_class_get_methods (k, &iter)))
- if (!pvt->vtable [m->slot])
- pvt->vtable [m->slot] = arch_create_remoting_trampoline (domain, m, target_type);
+ if (!pvt->vtable [m->slot]) {
+ pvt->vtable [m->slot] = arch_create_remoting_trampoline (domain, m, target_type, error);
+ if (!is_ok (error))
+ goto failure;
+ }
}
}
iter = NULL;
j = 0;
- while ((cm = mono_class_get_methods (interf, &iter)))
- pvt->vtable [slot + j++] = arch_create_remoting_trampoline (domain, cm, target_type);
+ while ((cm = mono_class_get_methods (interf, &iter))) {
+ pvt->vtable [slot + j++] = arch_create_remoting_trampoline (domain, cm, target_type, error);
+ if (!is_ok (error))
+ goto failure;
+ }
slot += mono_class_num_methods (interf);
}
pvt->interface_bitmap = bitmap;
#endif
return pvt;
+failure:
+ if (extra_interfaces)
+ g_slist_free (extra_interfaces);
+#ifdef COMPRESSED_INTERFACE_BITMAP
+ g_free (bitmap);
+#endif
+ return NULL;
}
#endif /* DISABLE_REMOTING */
}
gpointer
-mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *rp)
+mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *rp, MonoError *error)
{
MONO_REQ_GC_UNSAFE_MODE;
+ mono_error_init (error);
+
mono_loader_lock (); /*FIXME mono_class_from_mono_type and mono_class_proxy_vtable take it*/
mono_domain_lock (domain);
if (rp->target_domain_id != -1) {
if (remote_class->xdomain_vtable == NULL)
- remote_class->xdomain_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_APPDOMAIN);
+ remote_class->xdomain_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_APPDOMAIN, error);
mono_domain_unlock (domain);
mono_loader_unlock ();
+ return_val_if_nok (error, NULL);
return remote_class->xdomain_vtable;
}
if (remote_class->default_vtable == NULL) {
klass = mono_class_from_mono_type (type);
#ifndef DISABLE_COM
if ((mono_class_is_com_object (klass) || (mono_class_get_com_object_class () && klass == mono_class_get_com_object_class ())) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
- remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP);
+ remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP, error);
else
#endif
- remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_UNKNOWN);
+ remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_UNKNOWN, error);
+ /* N.B. both branches of the if modify error */
+ if (!is_ok (error)) {
+ mono_domain_unlock (domain);
+ mono_loader_unlock ();
+ return NULL;
+ }
}
mono_domain_unlock (domain);
* @domain: the application domain
* @tproxy: the proxy whose remote class has to be upgraded.
* @klass: class to which the remote class can be casted.
+ * @error: set on error
*
* Updates the vtable of the remote class by adding the necessary method slots
* and interface offsets so it can be safely casted to klass. klass can be a
- * class or an interface.
+ * class or an interface. On success returns TRUE, on failure returns FALSE and sets @error.
*/
-void
-mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoClass *klass)
+gboolean
+mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoClass *klass, MonoError *error)
{
MONO_REQ_GC_UNSAFE_MODE;
MonoRemoteClass *remote_class;
gboolean redo_vtable;
+ mono_error_init (error);
mono_loader_lock (); /*FIXME mono_remote_class_vtable requires it.*/
mono_domain_lock (domain);
if (redo_vtable) {
tproxy->remote_class = clone_remote_class (domain, remote_class, klass);
- proxy_object->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tproxy->remote_class, tproxy->rp);
+ proxy_object->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tproxy->remote_class, tproxy->rp, error);
+ if (!is_ok (error))
+ goto leave;
}
+leave:
mono_domain_unlock (domain);
mono_loader_unlock ();
+ return is_ok (error);
}
#endif /* DISABLE_REMOTING */
if (G_UNLIKELY (!o))
mono_error_set_out_of_memory (error, "Could not allocate %i bytes", mono_class_instance_size (klass));
else if (G_UNLIKELY (vtable->klass->has_finalize))
- mono_object_register_finalizer (o, error);
+ mono_object_register_finalizer (o);
return o;
}
if (G_UNLIKELY (!o))
mono_error_set_out_of_memory (error, "Could not allocate %i bytes", vtable->klass->instance_size);
else if (G_UNLIKELY (vtable->klass->has_finalize))
- mono_object_register_finalizer (o, error);
+ mono_object_register_finalizer (o);
return o;
}
if (G_UNLIKELY (!o))
mono_error_set_out_of_memory (error, "Could not allocate %i bytes", vtable->klass->instance_size);
else if (G_UNLIKELY (vtable->klass->has_finalize))
- mono_object_register_finalizer (o, error);
+ mono_object_register_finalizer (o);
return o;
}
mono_gc_wbarrier_object_copy (o, obj);
if (obj->vtable->klass->has_finalize)
- mono_object_register_finalizer (o, error);
+ mono_object_register_finalizer (o);
return o;
}
#endif
#endif
if (klass->has_finalize) {
- mono_object_register_finalizer (res, error);
+ mono_object_register_finalizer (res);
return_val_if_nok (error, NULL);
}
return res;
if (*(MonoBoolean *) mono_object_unbox(res)) {
/* Update the vtable of the remote type, so it can safely cast to this new type */
- mono_upgrade_remote_class (domain, obj, klass);
+ mono_upgrade_remote_class (domain, obj, klass, error);
+ return_val_if_nok (error, NULL);
return obj;
}
}
MonoError error;
char *result = mono_string_to_utf8_checked (s, &error);
- if (!mono_error_ok (&error))
- mono_error_raise_exception (&error);
+ if (!is_ok (&error)) {
+ mono_error_cleanup (&error);
+ return NULL;
+ }
return result;
}
MONO_API MonoString*
mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, int32_t len);
+MONO_RT_EXTERNAL_ONLY
MONO_API char *
mono_string_to_utf8 (MonoString *string_obj);
MonoBoolean
ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInfo *proc_start_info, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_info)
{
+ MonoError error G_GNUC_UNUSED;
gboolean ret;
gunichar2 *dir;
STARTUPINFO startinfo={0};
free_shell_path = FALSE;
if (cmd) {
gchar *newcmd, *tmp;
- tmp = mono_string_to_utf8 (cmd);
+ tmp = mono_string_to_utf8_checked (cmd, &error);
+ if (mono_error_set_pending_exception (&error)) {
+ g_free (spath);
+ return NULL;
+ }
newcmd = g_strdup_printf ("%s %s", spath, tmp);
cmd = mono_string_new_wrapper (newcmd);
g_free (tmp);
{
MONO_REQ_GC_UNSAFE_MODE;
- char *name = mono_string_to_utf8 (str);
+ MonoError error;
+ char *name = mono_string_to_utf8_checked (str, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
guint32 idx;
idx = string_heap_insert (sh, name);
g_free (name);
} else {
code = mb->code;
if (code == NULL){
- char *name = mono_string_to_utf8 (mb->name);
+ MonoError inner_error;
+ char *name = mono_string_to_utf8_checked (mb->name, &inner_error);
+ if (!is_ok (&inner_error)) {
+ name = g_strdup ("");
+ mono_error_cleanup (&inner_error);
+ }
char *str = g_strdup_printf ("Method %s does not have any IL associated", name);
mono_error_set_argument (error, NULL, "a method does not have any IL associated");
g_free (str);
break;
case MONO_NATIVE_CUSTOM:
if (minfo->guid) {
- str = mono_string_to_utf8 (minfo->guid);
+ str = mono_string_to_utf8_checked (minfo->guid, error);
+ if (!is_ok (error)) {
+ sigbuffer_free (&buf);
+ return 0;
+ }
len = strlen (str);
sigbuffer_add_value (&buf, len);
sigbuffer_add_mem (&buf, str, len);
return 0;
}
str = type_get_fully_qualified_name (marshaltype);
- } else
- str = mono_string_to_utf8 (minfo->marshaltype);
+ } else {
+ str = mono_string_to_utf8_checked (minfo->marshaltype, error);
+ if (!is_ok (error)) {
+ sigbuffer_free (&buf);
+ return 0;
+ }
+ }
len = strlen (str);
sigbuffer_add_value (&buf, len);
sigbuffer_add_mem (&buf, str, len);
sigbuffer_add_value (&buf, 0);
}
if (minfo->mcookie) {
- str = mono_string_to_utf8 (minfo->mcookie);
+ str = mono_string_to_utf8_checked (minfo->mcookie, error);
+ if (!is_ok (error)) {
+ sigbuffer_free (&buf);
+ return 0;
+ }
len = strlen (str);
sigbuffer_add_value (&buf, len);
sigbuffer_add_mem (&buf, str, len);
parent = mono_image_typedef_or_ref (assembly, t);
}
- char *name = mono_string_to_utf8 (method->name);
+ char *name = mono_string_to_utf8_checked (method->name, error);
+ return_val_if_nok (error, 0);
token = mono_image_add_memberef_row (assembly, parent, name, sig);
g_free (name);
parent = mono_image_typedef_or_ref (assembly, type);
}
- name = mono_string_to_utf8 (rmb.name);
+ name = mono_string_to_utf8_checked (rmb.name, error);
+ return_val_if_nok (error, 0);
sig = method_builder_encode_signature (assembly, &rmb, error);
return_val_if_nok (error, 0);
guint32 sig_token = field_encode_signature (assembly, fb, error);
return_val_if_nok (error, 0);
- name = mono_string_to_utf8 (fb->name);
+ name = mono_string_to_utf8_checked (fb->name, error);
+ return_val_if_nok (error, 0);
token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig_token);
g_free (name);
} else if (is_sr_mono_field (mono_object_class (f->fb))) {
sig = method_builder_encode_signature (assembly, &rmb, error);
return_val_if_nok (error, 0);
- name = mono_string_to_utf8 (rmb.name);
+ name = mono_string_to_utf8_checked (rmb.name, error);
+ return_val_if_nok (error, 0);
token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig);
g_free (name);
sig = method_builder_encode_signature (assembly, &rmb, error);
return_val_if_nok (error, 0);
- name = mono_string_to_utf8 (rmb.name);
+ name = mono_string_to_utf8_checked (rmb.name, error);
+ return_val_if_nok (error, 0);
token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig);
g_free (name);
table = &assembly->tables [MONO_TABLE_MEMBERREF];
- name = mono_string_to_utf8 (fb->name);
+ name = mono_string_to_utf8_checked (fb->name, error);
+ return_val_if_nok (error, 0);
if (assembly->save) {
alloc_table (table, table->rows + 1);
goto fail;
}
- name = mono_string_to_utf8 (m->name);
+ name = mono_string_to_utf8_checked (m->name, error);
+ if (!is_ok (error))
+ goto fail;
for (tmp = assembly->array_methods; tmp; tmp = tmp->next) {
am = (ArrayMethod *)tmp->data;
if (strcmp (name, am->name) == 0 &&
table = &assembly->tables [MONO_TABLE_TYPEDEF];
values = table->values + tb->table_idx * MONO_TYPEDEF_SIZE;
values [MONO_TYPEDEF_FLAGS] = tb->attrs;
- n = mono_string_to_utf8 (tb->name);
+ n = mono_string_to_utf8_checked (tb->name, error);
+ return_val_if_nok (error, FALSE);
if (strcmp (n, "Object") == 0)
is_object++;
values [MONO_TYPEDEF_NAME] = string_heap_insert (&assembly->sheap, n);
g_free (n);
- n = mono_string_to_utf8 (tb->nspace);
+ n = mono_string_to_utf8_checked (tb->nspace, error);
+ return_val_if_nok (error, FALSE);
if (strcmp (n, "System") == 0)
is_system++;
values [MONO_TYPEDEF_NAMESPACE] = string_heap_insert (&assembly->sheap, n);
static void
mono_image_fill_file_table (MonoDomain *domain, MonoReflectionModule *module, MonoDynamicImage *assembly)
{
+ MonoError error;
MonoDynamicTable *table;
guint32 *values;
char blob_size [6];
values [MONO_FILE_NAME] = string_heap_insert (&assembly->sheap, module->image->module_name);
if (image_is_dynamic (module->image)) {
/* This depends on the fact that the main module is emitted last */
- dir = mono_string_to_utf8 (((MonoReflectionModuleBuilder*)module)->assemblyb->dir);
+ dir = mono_string_to_utf8_checked (((MonoReflectionModuleBuilder*)module)->assemblyb->dir, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
path = g_strdup_printf ("%s%c%s", dir, G_DIR_SEPARATOR, module->image->module_name);
} else {
dir = NULL;
static void
assembly_add_resource (MonoReflectionModuleBuilder *mb, MonoDynamicImage *assembly, MonoReflectionResource *rsrc)
{
+ MonoError error;
MonoDynamicTable *table;
guint32 *values;
char blob_size [6];
guint32 idx, offset;
if (rsrc->filename) {
- name = mono_string_to_utf8 (rsrc->filename);
+ name = mono_string_to_utf8_checked (rsrc->filename, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
sname = g_path_get_basename (name);
table = &assembly->tables [MONO_TABLE_FILE];
static void
set_version_from_string (MonoString *version, guint32 *values)
{
+ MonoError error;
gchar *ver, *p, *str;
guint32 i;
values [MONO_ASSEMBLY_BUILD_NUMBER] = 0;
if (!version)
return;
- ver = str = mono_string_to_utf8 (version);
+ ver = str = mono_string_to_utf8_checked (version, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
for (i = 0; i < 4; ++i) {
values [MONO_ASSEMBLY_MAJOR_VERSION + i] = strtol (ver, &p, 10);
switch (*p) {
parent = mono_metadata_token_index (parent) << MONO_MEMBERREF_PARENT_BITS;
parent |= MONO_MEMBERREF_PARENT_METHODDEF;
- char *name = mono_string_to_utf8 (rmb.name);
+ char *name = mono_string_to_utf8_checked (rmb.name, error);
+ if (!is_ok (error)) goto fail;
token = mono_image_get_varargs_method_token (
assembly, parent, name, sig_token);
g_free (name);
return_val_if_nok (error, 0);
token = mono_metadata_token_from_dor (mono_image_typedef_or_ref (assembly, type));
}
- } else if (strcmp (klass->name, "MonoType") == 0) {
+ } else if (strcmp (klass->name, "RuntimeType") == 0) {
MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
return_val_if_nok (error, 0);
MonoClass *mc = mono_class_from_mono_type (type);
void
mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
{
+ MonoError error;
MonoDynamicAssembly *assembly;
MonoDynamicImage *image;
MonoDomain *domain = mono_object_domain (assemblyb);
assembly->assembly.dynamic = TRUE;
assembly->assembly.corlib_internal = assemblyb->corlib_internal;
assemblyb->assembly.assembly = (MonoAssembly*)assembly;
- assembly->assembly.basedir = mono_string_to_utf8 (assemblyb->dir);
- if (assemblyb->culture)
- assembly->assembly.aname.culture = mono_string_to_utf8 (assemblyb->culture);
- else
+ assembly->assembly.basedir = mono_string_to_utf8_checked (assemblyb->dir, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
+ if (assemblyb->culture) {
+ assembly->assembly.aname.culture = mono_string_to_utf8_checked (assemblyb->culture, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
+ } else
assembly->assembly.aname.culture = g_strdup ("");
if (assemblyb->version) {
- char *vstr = mono_string_to_utf8 (assemblyb->version);
+ char *vstr = mono_string_to_utf8_checked (assemblyb->version, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
char **version = g_strsplit (vstr, ".", 4);
char **parts = version;
assembly->assembly.aname.major = atoi (*parts++);
assembly->save = assemblyb->access != 1;
assembly->domain = domain;
- image = create_dynamic_mono_image (assembly, mono_string_to_utf8 (assemblyb->name), g_strdup ("RefEmit_YouForgotToDefineAModule"));
+ char *assembly_name = mono_string_to_utf8_checked (assemblyb->name, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
+ image = create_dynamic_mono_image (assembly, assembly_name, g_strdup ("RefEmit_YouForgotToDefineAModule"));
image->initial_image = TRUE;
assembly->assembly.aname.name = image->image.name;
assembly->assembly.image = &image->image;
mono_error_init (error);
- name = mono_string_to_utf8 (fileName);
+ name = mono_string_to_utf8_checked (fileName, error);
+ return_val_if_nok (error, NULL);
image = mono_image_open (name, &status);
if (!image) {
* determined at assembly save time.
*/
/*image = (MonoDynamicImage*)ab->dynamic_assembly->assembly.image; */
- name = mono_string_to_utf8 (ab->name);
+ name = mono_string_to_utf8_checked (ab->name, error);
+ return_val_if_nok (error, FALSE);
fqname = mono_string_to_utf8_checked (moduleb->module.fqname, error);
if (!is_ok (error)) {
g_free (name);
}
}
/* This is stored in vtables/JITted code so it has to be pinned */
- res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.monotype_class, error);
+ res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.runtimetype_class, error);
if (!mono_error_ok (error))
return NULL;
type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve, error);
if (type == NULL && !info->assembly.name && image != mono_defaults.corlib) {
+ /* ignore the error and try again */
mono_error_cleanup (error);
+ mono_error_init (error);
image = mono_defaults.corlib;
type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve, error);
}
} else if (strcmp (klass->name, "TypeBuilder") == 0) {
MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)obj;
token = tb->table_idx | MONO_TOKEN_TYPE_DEF;
- } else if (strcmp (klass->name, "MonoType") == 0) {
+ } else if (strcmp (klass->name, "RuntimeType") == 0) {
MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
return_val_if_nok (error, 0);
MonoClass *mc = mono_class_from_mono_type (type);
return token;
}
+/*
+ * Load the type with name @n on behalf of image @image. On failure sets @error and returns NULL.
+ * The @is_enum flag only affects the error message that's displayed on failure.
+ */
+static MonoType*
+cattr_type_from_name (char *n, MonoImage *image, gboolean is_enum, MonoError *error)
+{
+ MonoError inner_error;
+ MonoType *t = mono_reflection_type_from_name_checked (n, image, &inner_error);
+ if (!t) {
+ mono_error_set_type_load_name (error, g_strdup(n), NULL,
+ "Could not load %s %s while decoding custom attribute: %s",
+ is_enum ? "enum type": "type",
+ n,
+ mono_error_get_message (&inner_error));
+ mono_error_cleanup (&inner_error);
+ return NULL;
+ }
+ return t;
+}
+
static MonoClass*
load_cattr_enum_type (MonoImage *image, const char *p, const char **end, MonoError *error)
{
n = (char *)g_memdup (p, slen + 1);
n [slen] = 0;
- t = mono_reflection_type_from_name_checked (n, image, error);
- if (!t) {
- char *msg = g_strdup (mono_error_get_message (error));
- mono_error_cleanup (error);
- /* We don't free n, it's consumed by mono_error */
- mono_error_set_type_load_name (error, n, NULL, "Could not load enum type %s while decoding custom attribute: %s", n, msg);
- g_free (msg);
- return NULL;
- }
+ t = cattr_type_from_name (n, image, TRUE, error);
g_free (n);
+ return_val_if_nok (error, NULL);
p += slen;
*end = p;
return mono_class_from_mono_type (t);
slen = mono_metadata_decode_value (p, &p);
n = (char *)g_memdup (p, slen + 1);
n [slen] = 0;
- t = mono_reflection_type_from_name_checked (n, image, error);
- if (!t) {
- char *msg = g_strdup (mono_error_get_message (error));
- mono_error_cleanup (error);
- /* We don't free n, it's consumed by mono_error */
- mono_error_set_type_load_name (error, n, NULL, "Could not load type %s while decoding custom attribute: %msg", n, msg);
- g_free (msg);
- return NULL;
- }
+ t = cattr_type_from_name (n, image, FALSE, error);
g_free (n);
+ return_val_if_nok (error, NULL);
*end = p + slen;
rt = mono_type_get_object_checked (mono_domain_get (), t, error);
slen = mono_metadata_decode_value (p, &p);
n = (char *)g_memdup (p, slen + 1);
n [slen] = 0;
- t = mono_reflection_type_from_name_checked (n, image, error);
- if (!t) {
- char *msg = g_strdup (mono_error_get_message (error));
- mono_error_cleanup (error);
- /* We don't free n, it's consumed by mono_error */
- mono_error_set_type_load_name (error, n, NULL, "Could not load type %s while decoding custom attribute: %s", n, msg);
- g_free (msg);
- return NULL;
- }
+ t = cattr_type_from_name (n, image, FALSE, error);
g_free (n);
+ return_val_if_nok (error, NULL);
p += slen;
subc = mono_class_from_mono_type (t);
} else if (subt >= MONO_TYPE_BOOLEAN && subt <= MONO_TYPE_R8) {
mono_error_init (error);
klass = obj->vtable->klass;
- if (klass == mono_defaults.monotype_class) {
+ if (klass == mono_defaults.runtimetype_class) {
MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
return_val_if_nok (error, NULL);
klass = mono_class_from_mono_type (type);
MonoClass *klass = mono_object_class (prop);
if (strcmp (klass->name, "PropertyBuilder") == 0) {
MonoReflectionPropertyBuilder *pb = (MonoReflectionPropertyBuilder *)prop;
- *name = mono_string_to_utf8 (pb->name);
+ *name = mono_string_to_utf8_checked (pb->name, error);
+ return_if_nok (error);
*type = mono_reflection_type_get_handle ((MonoReflectionType*)pb->type, error);
} else {
MonoReflectionProperty *p = (MonoReflectionProperty *)prop;
MonoClass *klass = mono_object_class (field);
if (strcmp (klass->name, "FieldBuilder") == 0) {
MonoReflectionFieldBuilder *fb = (MonoReflectionFieldBuilder *)field;
- *name = mono_string_to_utf8 (fb->name);
+ *name = mono_string_to_utf8_checked (fb->name, error);
+ return_if_nok (error);
*type = mono_reflection_type_get_handle ((MonoReflectionType*)fb->type, error);
} else {
MonoReflectionField *f = (MonoReflectionField *)field;
*p++ = 0xFF;
break;
}
- str = mono_string_to_utf8 ((MonoString*)arg);
+ str = mono_string_to_utf8_checked ((MonoString*)arg, error);
+ return_if_nok (error);
slen = strlen (str);
if ((p-buffer) + 10 + slen >= *buflen) {
char *newbuf;
res->data.custom_data.custom_name =
type_get_fully_qualified_name (marshaltyperef);
}
- if (minfo->mcookie)
- res->data.custom_data.cookie = mono_string_to_utf8 (minfo->mcookie);
+ if (minfo->mcookie) {
+ res->data.custom_data.cookie = mono_string_to_utf8_checked (minfo->mcookie, error);
+ if (!is_ok (error)) {
+ image_g_free (image, res);
+ return NULL;
+ }
+ }
break;
default:
event->parent = klass;
event->attrs = eb->attrs;
- event->name = mono_string_to_utf8 (eb->name);
+ event->name = mono_string_to_utf8_checked (eb->name, error);
+ if (!is_ok (error)) {
+ g_free (event);
+ return NULL;
+ }
if (eb->add_method)
event->add = eb->add_method->mhandle;
if (eb->remove_method)
return_val_if_nok (error, NULL);
*handle_class = mono_defaults.string_class;
g_assert (result);
- } else if (strcmp (obj->vtable->klass->name, "MonoType") == 0) {
+ } else if (strcmp (obj->vtable->klass->name, "RuntimeType") == 0) {
MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
return_val_if_nok (error, NULL);
MonoClass *mc = mono_class_from_mono_type (type);
/* Find the method */
- name = mono_string_to_utf8 (m->name);
+ name = mono_string_to_utf8_checked (m->name, error);
+ return_val_if_nok (error, NULL);
iter = NULL;
while ((method = mono_class_get_methods (klass, &iter))) {
if (!strcmp (method->name, name))
params [0] = mono_type_get_object_checked (mono_domain_get (), &oklass->byval_arg, error);
return_val_if_nok (error, FALSE);
- res = mono_runtime_try_invoke (method, (MonoObject*)(mono_class_get_ref_info (klass)), params, &exc, error);
+ MonoError inner_error;
+ res = mono_runtime_try_invoke (method, (MonoObject*)(mono_class_get_ref_info (klass)), params, &exc, &inner_error);
- if (exc || !mono_error_ok (error)) {
- mono_error_cleanup (error);
+ if (exc || !is_ok (&inner_error)) {
+ mono_error_cleanup (&inner_error);
return FALSE;
} else
return *(MonoBoolean*)mono_object_unbox (res);
/* mono_marshal_xdomain_copy_out_value()
* Copies the contents of the src instance into the dst instance. src and dst
* must have the same type, and if they are arrays, the same size.
+ *
+ * This is an icall, it may use mono_error_set_pending_exception
*/
static void
mono_marshal_xdomain_copy_out_value (MonoObject *src, MonoObject *dst)
for (i = 0; i < len; i++) {
MonoObject *item = (MonoObject *)mono_array_get ((MonoArray *)src, gpointer, i);
MonoObject *item_copy = mono_marshal_xdomain_copy_value (item, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ if (mono_error_set_pending_exception (&error))
+ return;
mono_array_setref ((MonoArray *)dst, i, item_copy);
}
} else {
else
marshal_method = mono_marshal_get_remoting_invoke (method);
gpointer compiled_ptr = mono_compile_method_checked (marshal_method, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
return compiled_ptr;
}
void
mono_upgrade_remote_class_wrapper (MonoReflectionType *rtype, MonoTransparentProxy *tproxy)
{
+ MonoError error;
MonoClass *klass;
MonoDomain *domain = ((MonoObject*)tproxy)->vtable->domain;
klass = mono_class_from_mono_type (rtype->type);
- mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass);
+ mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass, &error);
+ mono_error_set_pending_exception (&error);
}
#else /* DISABLE_REMOTING */
/* unlike most Invoke* cases InvokeMember is not inside System.Reflection[.Emit] but is SecuritySafeCritical */
if (((*kname == 'T') && (strcmp (kname, "Type") == 0)) ||
- ((*kname == 'M') && (strcmp (kname, "MonoType")) == 0)) {
+ ((*kname == 'R') && (strcmp (kname, "RuntimeType")) == 0)) {
/* if calling InvokeMember then we can't stop the stackwalk here and need to look at the caller */
if (strcmp (m->name, "InvokeMember") == 0)
MonoBoolean
ves_icall_System_Net_Dns_GetHostByName_internal (MonoString *host, MonoString **h_name, MonoArray **h_aliases, MonoArray **h_addr_list)
{
+ MonoError error;
gboolean add_local_ips = FALSE, add_info_ok = TRUE;
gchar this_hostname [256];
MonoAddressInfo *info = NULL;
- char *hostname = mono_string_to_utf8 (host);
- MonoError error;
int hint;
+ char *hostname = mono_string_to_utf8_checked (host, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+
hint = get_addrinfo_family_hint (&error);
if (!mono_error_ok (&error)) {
mono_error_set_pending_exception (&error);
gchar hostname [NI_MAXHOST] = { 0 };
gboolean ret;
- address = mono_string_to_utf8 (addr);
+ address = mono_string_to_utf8_checked (addr, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
if (inet_pton (AF_INET, address, &saddr.sin_addr ) == 1) {
family = AF_INET;
MonoIOSelectorJob *job = get_job_for_event (&list, EVENT_IN);
if (job) {
mono_threadpool_ms_enqueue_work_item (((MonoObject*) job)->vtable->domain, (MonoObject*) job, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
}
}
MonoIOSelectorJob *job = get_job_for_event (&list, EVENT_OUT);
if (job) {
mono_threadpool_ms_enqueue_work_item (((MonoObject*) job)->vtable->domain, (MonoObject*) job, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
}
}
exists = mono_g_hash_table_lookup_extended (states, GINT_TO_POINTER (fd), &k, (gpointer*) &list);
list = mono_mlist_append_checked (list, (MonoObject*) job, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
mono_g_hash_table_replace (states, GINT_TO_POINTER (fd), list);
operations = get_operations_for_jobs (list);
for (; list; list = mono_mlist_remove_item (list, list)) {
mono_threadpool_ms_enqueue_work_item (mono_object_domain (mono_mlist_get_data (list)), mono_mlist_get_data (list), &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
}
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: del fd %3d", fd);
{
ThreadPoolCounter counter;
MonoInternalThread *thread;
+ gint64 current_ticks;
gint32 now;
mono_coop_mutex_lock (&threadpool->worker_creation_lock);
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] try create worker", mono_native_thread_id_get ());
-
- if ((now = mono_100ns_ticks () / 10 / 1000 / 1000) == 0) {
+ current_ticks = mono_100ns_ticks ();
+ now = current_ticks / (10 * 1000 * 1000);
+ if (0 == current_ticks) {
g_warning ("failed to get 100ns ticks");
} else {
if (threadpool->worker_creation_current_second != now) {
}
MonoObject *
-mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc)
+mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error)
{
- MonoError error;
MonoAsyncCall *ac;
+ mono_error_init (error);
g_assert (exc);
g_assert (out_args);
mono_monitor_enter ((MonoObject*) ares);
if (ares->endinvoke_called) {
- *exc = (MonoObject*) mono_get_exception_invalid_operation (NULL);
+ mono_error_set_invalid_operation(error, "Delegate EndInvoke method called more than once");
mono_monitor_exit ((MonoObject*) ares);
return NULL;
}
} else {
wait_event = CreateEvent (NULL, TRUE, FALSE, NULL);
g_assert(wait_event);
- MonoWaitHandle *wait_handle = mono_wait_handle_new (mono_object_domain (ares), wait_event, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ MonoWaitHandle *wait_handle = mono_wait_handle_new (mono_object_domain (ares), wait_event, error);
+ if (!is_ok (error)) {
+ CloseHandle (wait_event);
+ return NULL;
+ }
MONO_OBJECT_SETREF (ares, handle, (MonoObject*) wait_handle);
}
mono_monitor_exit ((MonoObject*) ares);
MonoAsyncResult *
mono_threadpool_ms_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error);
MonoObject *
-mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc);
+mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error);
gboolean
mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout);
void mono_thread_internal_check_for_interruption_critical (MonoInternalThread *thread);
void mono_thread_internal_stop (MonoInternalThread *thread);
+void mono_thread_internal_abort (MonoInternalThread *thread);
gboolean mono_thread_internal_has_appdomain_ref (MonoInternalThread *thread, MonoDomain *domain);
void mono_thread_internal_unhandled_exception (MonoObject* exc);
void mono_alloc_special_static_data_free (GHashTable *special_static_fields);
-void mono_thread_current_check_pending_interrupt (void);
+gboolean mono_thread_current_check_pending_interrupt (void);
void mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state);
void mono_thread_clr_state (MonoInternalThread *thread, MonoThreadState state);
mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, MonoError *error);
MonoThread *
-mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *error);
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach);
void mono_thread_init_tls (void);
#define LOCK_THREAD(thread) lock_thread((thread))
#define UNLOCK_THREAD(thread) unlock_thread((thread))
-/* Provide this for systems with glib < 2.6 */
-#ifndef G_GSIZE_FORMAT
-# if GLIB_SIZEOF_LONG == 8
-# define G_GSIZE_FORMAT "lu"
-# else
-# define G_GSIZE_FORMAT "u"
-# endif
-#endif
-
typedef struct
{
guint32 (*func)(void *);
static guint32 mono_alloc_static_data_slot (StaticDataInfo *static_data, guint32 size, guint32 align);
static gboolean mono_thread_resume (MonoInternalThread* thread);
static void async_abort_internal (MonoInternalThread *thread, gboolean install_async_abort);
-static void self_abort_internal (void);
+static void self_abort_internal (MonoError *error);
static void async_suspend_internal (MonoInternalThread *thread, gboolean interrupt);
static void self_suspend_internal (void);
}
static MonoThread*
-create_thread_object (MonoDomain *domain, MonoError *error)
+create_thread_object (MonoDomain *domain)
{
+ MonoError error;
MonoVTable *vt = mono_class_vtable (domain, mono_defaults.thread_class);
- MonoThread *t = (MonoThread*)mono_object_new_mature (vt, error);
+ MonoThread *t = (MonoThread*)mono_object_new_mature (vt, &error);
+ /* only possible failure mode is OOM, from which we don't expect to recover. */
+ mono_error_assert_ok (&error);
return t;
}
static MonoThread*
-new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal, MonoError *error)
+new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal)
{
MonoThread *thread;
- thread = create_thread_object (domain, error);
- if (!mono_error_ok (error))
- return NULL;
+ thread = create_thread_object (domain);
MONO_OBJECT_SETREF (thread, internal_thread, internal);
}
static MonoInternalThread*
-create_internal_thread (MonoError *error)
+create_internal_thread (void)
{
+ MonoError error;
MonoInternalThread *thread;
MonoVTable *vt;
vt = mono_class_vtable (mono_get_root_domain (), mono_defaults.internal_thread_class);
- thread = (MonoInternalThread*) mono_object_new_mature (vt, error);
- if (!mono_error_ok (error))
- return NULL;
+ thread = (MonoInternalThread*) mono_object_new_mature (vt, &error);
+ /* only possible failure mode is OOM, from which we don't exect to recover */
+ mono_error_assert_ok (&error);
thread->synch_cs = g_new0 (MonoCoopMutex, 1);
mono_coop_mutex_init_recursive (thread->synch_cs);
}
static gboolean
-init_root_domain_thread (MonoInternalThread *thread, MonoThread *candidate, MonoError *error)
+init_root_domain_thread (MonoInternalThread *thread, MonoThread *candidate)
{
MonoDomain *domain = mono_get_root_domain ();
- mono_error_init (error);
if (!candidate || candidate->obj.vtable->domain != domain) {
- candidate = new_thread_with_internal (domain, thread, error);
- return_val_if_nok (error, FALSE);
+ candidate = new_thread_with_internal (domain, thread);
}
set_current_thread_for_domain (domain, thread, candidate);
g_assert (!thread->root_domain_thread);
/* We have to do this here because mono_thread_new_init()
requires that root_domain_thread is set up. */
thread_adjust_static_data (internal);
- init_root_domain_thread (internal, start_info->obj, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ init_root_domain_thread (internal, start_info->obj);
/* This MUST be called before any managed code can be
* executed, as it calls the callback function that (for the
mono_error_init (error);
- thread = create_thread_object (domain, error);
- return_val_if_nok (error, NULL);
+ thread = create_thread_object (domain);
- internal = create_internal_thread (error);
- return_val_if_nok (error, NULL);
+ internal = create_internal_thread ();
MONO_OBJECT_SETREF (thread, internal_thread, internal);
MonoThread *
mono_thread_attach (MonoDomain *domain)
{
- MonoError error;
- MonoThread *thread = mono_thread_attach_full (domain, FALSE, &error);
- mono_error_raise_exception (&error);
+ MonoThread *thread = mono_thread_attach_full (domain, FALSE);
return thread;
}
MonoThread *
-mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *error)
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
{
MonoThreadInfo *info;
MonoInternalThread *thread;
HANDLE thread_handle;
MonoNativeThreadId tid;
- mono_error_init (error);
-
if ((thread = mono_thread_internal_current ())) {
if (domain != mono_domain_get ())
mono_domain_set (domain, TRUE);
g_error ("Thread %"G_GSIZE_FORMAT" calling into managed code is not registered with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before <pthread.h> in the file containing the thread creation code.", mono_native_thread_id_get ());
}
- thread = create_internal_thread (error);
- if (!mono_error_ok (error))
- return NULL;
+ thread = create_internal_thread ();
thread_handle = mono_thread_info_open_handle ();
g_assert (thread_handle);
thread->thread_info = info;
thread->small_id = info->small_id;
- current_thread = new_thread_with_internal (domain, thread, error);
- if (!mono_error_ok (error))
- return NULL;
+ current_thread = new_thread_with_internal (domain, thread);
if (!handle_store (current_thread, force_attach)) {
/* Mono is shutting down, so just wait for the end */
thread_adjust_static_data (thread);
- init_root_domain_thread (thread, current_thread, error);
- return_val_if_nok (error, NULL);
+ init_root_domain_thread (thread, current_thread);
if (domain != mono_get_root_domain ())
set_current_thread_for_domain (domain, thread, current_thread);
void
ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this_obj)
{
- MonoError error;
MonoInternalThread *internal;
- internal = create_internal_thread (&error);
- if (mono_error_set_pending_exception (&error))
- return;
+ internal = create_internal_thread ();
internal->state = ThreadState_Unstarted;
THREAD_DEBUG (g_message ("%s: Sleeping for %d ms", __func__, ms));
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return;
while (TRUE) {
gboolean alerted = FALSE;
UNLOCK_THREAD (this_obj);
if (this_obj->name && this_obj->tid) {
- char *tname = mono_string_to_utf8 (name);
+ char *tname = mono_string_to_utf8_checked (name, error);
+ return_if_nok (error);
mono_profiler_thread_name (this_obj->tid, tname);
mono_native_thread_set_name (thread_get_tid (this_obj), tname);
mono_free (tname);
MonoThread *
mono_thread_current (void)
{
- MonoError error;
MonoDomain *domain = mono_domain_get ();
MonoInternalThread *internal = mono_thread_internal_current ();
MonoThread **current_thread_ptr;
if (!*current_thread_ptr) {
g_assert (domain != mono_get_root_domain ());
- *current_thread_ptr = new_thread_with_internal (domain, internal, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ *current_thread_ptr = new_thread_with_internal (domain, internal);
}
return *current_thread_ptr;
}
static MonoThread *
mono_thread_current_for_thread (MonoInternalThread *internal)
{
- MonoError error;
MonoDomain *domain = mono_domain_get ();
MonoThread **current_thread_ptr;
if (!*current_thread_ptr) {
g_assert (domain != mono_get_root_domain ());
- *current_thread_ptr = new_thread_with_internal (domain, internal, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ *current_thread_ptr = new_thread_with_internal (domain, internal);
}
return *current_thread_ptr;
}
MonoInternalThread *cur_thread = mono_thread_internal_current ();
gboolean ret;
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return FALSE;
LOCK_THREAD (thread);
return(FALSE);
}
+#define MANAGED_WAIT_FAILED 0x7fffffff
+
static gint32
-mono_wait_uninterrupted (MonoInternalThread *thread, gboolean multiple, guint32 numhandles, gpointer *handles, gboolean waitall, gint32 ms, gboolean alertable)
+map_native_wait_result_to_managed (gint32 val)
+{
+ /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+ return val == WAIT_FAILED ? MANAGED_WAIT_FAILED : val;
+}
+
+static gint32
+mono_wait_uninterrupted (MonoInternalThread *thread, guint32 numhandles, gpointer *handles, gboolean waitall, gint32 ms, MonoError *error)
{
MonoException *exc;
guint32 ret;
gint32 diff_ms;
gint32 wait = ms;
+ mono_error_init (error);
+
start = (ms == -1) ? 0 : mono_100ns_ticks ();
do {
MONO_ENTER_GC_SAFE;
- if (multiple)
- ret = WaitForMultipleObjectsEx (numhandles, handles, waitall, wait, alertable);
+ if (numhandles != 1)
+ ret = WaitForMultipleObjectsEx (numhandles, handles, waitall, wait, TRUE);
else
- ret = WaitForSingleObjectEx (handles [0], ms, alertable);
+ ret = WaitForSingleObjectEx (handles [0], ms, TRUE);
MONO_EXIT_GC_SAFE;
if (ret != WAIT_IO_COMPLETION)
break;
exc = mono_thread_execute_interruption ();
- if (exc)
- mono_raise_exception (exc);
+ if (exc) {
+ mono_error_set_exception_instance (error, exc);
+ break;
+ }
if (ms == -1)
continue;
gint32 ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_handles, gint32 ms)
{
+ MonoError error;
HANDLE *handles;
guint32 numhandles;
guint32 ret;
MonoInternalThread *thread = mono_thread_internal_current ();
/* Do this WaitSleepJoin check before creating objects */
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return map_native_wait_result_to_managed (WAIT_FAILED);
/* We fail in managed if the array has more than 64 elements */
numhandles = (guint32)mono_array_length(mono_handles);
}
mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
-
- ret = mono_wait_uninterrupted (thread, TRUE, numhandles, handles, TRUE, ms, TRUE);
+
+ ret = mono_wait_uninterrupted (thread, numhandles, handles, TRUE, ms, &error);
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
g_free(handles);
+ mono_error_set_pending_exception (&error);
+
/* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
- return ret == WAIT_FAILED ? 0x7fffffff : ret;
+ return map_native_wait_result_to_managed (ret);
}
gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_handles, gint32 ms)
{
+ MonoError error;
HANDLE handles [MAXIMUM_WAIT_OBJECTS];
uintptr_t numhandles;
guint32 ret;
MonoInternalThread *thread = mono_thread_internal_current ();
/* Do this WaitSleepJoin check before creating objects */
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return map_native_wait_result_to_managed (WAIT_FAILED);
numhandles = mono_array_length(mono_handles);
if (numhandles > MAXIMUM_WAIT_OBJECTS)
- return WAIT_FAILED;
+ return map_native_wait_result_to_managed (WAIT_FAILED);
for(i = 0; i < numhandles; i++) {
waitHandle = mono_array_get(mono_handles, MonoObject*, i);
mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
- ret = mono_wait_uninterrupted (thread, TRUE, numhandles, handles, FALSE, ms, TRUE);
+ ret = mono_wait_uninterrupted (thread, numhandles, handles, FALSE, ms, &error);
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
THREAD_WAIT_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") returning %d", __func__, mono_native_thread_id_get (), ret));
+ mono_error_set_pending_exception (&error);
/*
* These need to be here. See MSDN dos on WaitForMultipleObjects.
*/
if (ret >= WAIT_OBJECT_0 && ret <= WAIT_OBJECT_0 + numhandles - 1) {
- return ret - WAIT_OBJECT_0;
+ return map_native_wait_result_to_managed (ret - WAIT_OBJECT_0);
}
else if (ret >= WAIT_ABANDONED_0 && ret <= WAIT_ABANDONED_0 + numhandles - 1) {
- return ret - WAIT_ABANDONED_0;
+ return map_native_wait_result_to_managed (ret - WAIT_ABANDONED_0);
}
else {
/* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
- return ret == WAIT_FAILED ? 0x7fffffff : ret;
+ return map_native_wait_result_to_managed (ret);
}
}
gint32 ves_icall_System_Threading_WaitHandle_WaitOne_internal(HANDLE handle, gint32 ms)
{
+ MonoError error;
guint32 ret;
MonoInternalThread *thread = mono_thread_internal_current ();
ms=INFINITE;
}
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return map_native_wait_result_to_managed (WAIT_FAILED);
mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
- ret = mono_wait_uninterrupted (thread, FALSE, 1, &handle, FALSE, ms, TRUE);
+ ret = mono_wait_uninterrupted (thread, 1, &handle, FALSE, ms, &error);
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
-
- /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
- return ret == WAIT_FAILED ? 0x7fffffff : ret;
+
+ mono_error_set_pending_exception (&error);
+ return map_native_wait_result_to_managed (ret);
}
gint32
if (ms == -1)
ms = INFINITE;
- mono_thread_current_check_pending_interrupt ();
+ if (mono_thread_current_check_pending_interrupt ())
+ return map_native_wait_result_to_managed (WAIT_FAILED);
mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
- /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
- return ret == WAIT_FAILED ? 0x7fffffff : ret;
+ return map_native_wait_result_to_managed (ret);
}
HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoString *name, MonoBoolean *created)
}
}
-void mono_thread_current_check_pending_interrupt ()
+/**
+ * mono_thread_current_check_pending_interrupt:
+ *
+ * Checks if there's a interruption request and set the pending exception if so.
+ *
+ * @returns true if a pending exception was set
+ */
+gboolean
+mono_thread_current_check_pending_interrupt (void)
{
MonoInternalThread *thread = mono_thread_internal_current ();
gboolean throw_ = FALSE;
UNLOCK_THREAD (thread);
- if (throw_) {
- mono_raise_exception (mono_get_exception_thread_interrupted ());
- }
+ if (throw_)
+ mono_set_pending_exception (mono_get_exception_thread_interrupted ());
+ return throw_;
}
-void
-ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject *state)
+static gboolean
+request_thread_abort (MonoInternalThread *thread, MonoObject *state)
{
LOCK_THREAD (thread);
(thread->state & ThreadState_Stopped) != 0)
{
UNLOCK_THREAD (thread);
- return;
+ return FALSE;
}
if ((thread->state & ThreadState_Unstarted) != 0) {
thread->state |= ThreadState_Aborted;
UNLOCK_THREAD (thread);
- return;
+ return FALSE;
}
thread->state |= ThreadState_AbortRequested;
mono_thread_resume (thread);
UNLOCK_THREAD (thread);
+ return TRUE;
+}
- if (thread == mono_thread_internal_current ())
- self_abort_internal ();
- else
+void
+ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject *state)
+{
+ if (!request_thread_abort (thread, state))
+ return;
+
+ if (thread == mono_thread_internal_current ()) {
+ MonoError error;
+ self_abort_internal (&error);
+ mono_error_set_pending_exception (&error);
+ } else {
async_abort_internal (thread, TRUE);
+ }
+}
+
+/**
+ * mono_thread_internal_abort:
+ *
+ * Request thread @thread to be aborted.
+ *
+ * @thread MUST NOT be the current thread.
+ */
+void
+mono_thread_internal_abort (MonoInternalThread *thread)
+{
+ g_assert (thread != mono_thread_internal_current ());
+
+ if (!request_thread_abort (thread, NULL))
+ return;
+ async_abort_internal (thread, TRUE);
}
void
return found;
}
-void mono_thread_internal_stop (MonoInternalThread *thread)
+static gboolean
+request_thread_stop (MonoInternalThread *thread)
{
LOCK_THREAD (thread);
(thread->state & ThreadState_Stopped) != 0)
{
UNLOCK_THREAD (thread);
- return;
+ return FALSE;
}
/* Make sure the thread is awake */
thread->state &= ~ThreadState_AbortRequested;
UNLOCK_THREAD (thread);
+ return TRUE;
+}
+
+/**
+ * mono_thread_internal_stop:
+ *
+ * Request thread @thread to stop.
+ *
+ * @thread MUST NOT be the current thread.
+ */
+void
+mono_thread_internal_stop (MonoInternalThread *thread)
+{
+ g_assert (thread != mono_thread_internal_current ());
+
+ if (!request_thread_stop (thread))
+ return;
- if (thread == mono_thread_internal_current ())
- self_abort_internal ();
- else
- async_abort_internal (thread, TRUE);
+ async_abort_internal (thread, TRUE);
}
void mono_thread_stop (MonoThread *thread)
{
- mono_thread_internal_stop (thread->internal_thread);
+ MonoInternalThread *internal = thread->internal_thread;
+
+ if (!request_thread_stop (internal))
+ return;
+
+ if (internal == mono_thread_internal_current ()) {
+ MonoError error;
+ self_abort_internal (&error);
+ /*
+ This function is part of the embeding API and has no way to return the exception
+ to be thrown. So what we do is keep the old behavior and raise the exception.
+ */
+ mono_error_raise_exception (&error);
+ } else {
+ async_abort_internal (internal, TRUE);
+ }
}
gint8
}
/* Obtain the thread dump of all threads */
-static void
-mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_frames)
+static gboolean
+mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_frames, MonoError *error)
{
- MonoError error;
ThreadDumpUserData ud;
MonoInternalThread *thread_array [128];
MonoDebugSourceLocation *location;
int tindex, nthreads;
- mono_error_init (&error);
+ mono_error_init (error);
*out_threads = NULL;
*out_stack_frames = NULL;
ud.frames = g_new0 (MonoStackFrameInfo, 256);
ud.max_frames = 256;
- *out_threads = mono_array_new_checked (domain, mono_defaults.thread_class, nthreads, &error);
- if (!is_ok (&error))
+ *out_threads = mono_array_new_checked (domain, mono_defaults.thread_class, nthreads, error);
+ if (!is_ok (error))
goto leave;
- *out_stack_frames = mono_array_new_checked (domain, mono_defaults.array_class, nthreads, &error);
- if (!is_ok (&error))
+ *out_stack_frames = mono_array_new_checked (domain, mono_defaults.array_class, nthreads, error);
+ if (!is_ok (error))
goto leave;
for (tindex = 0; tindex < nthreads; ++tindex) {
mono_array_setref_fast (*out_threads, tindex, mono_thread_current_for_thread (thread));
- thread_frames = mono_array_new_checked (domain, mono_defaults.stack_frame_class, ud.nframes, &error);
- if (!is_ok (&error))
+ thread_frames = mono_array_new_checked (domain, mono_defaults.stack_frame_class, ud.nframes, error);
+ if (!is_ok (error))
goto leave;
mono_array_setref_fast (*out_stack_frames, tindex, thread_frames);
for (i = 0; i < ud.nframes; ++i) {
MonoStackFrameInfo *frame = &ud.frames [i];
MonoMethod *method = NULL;
- MonoStackFrame *sf = (MonoStackFrame *)mono_object_new_checked (domain, mono_defaults.stack_frame_class, &error);
- if (!mono_error_ok (&error))
+ MonoStackFrame *sf = (MonoStackFrame *)mono_object_new_checked (domain, mono_defaults.stack_frame_class, error);
+ if (!is_ok (error))
goto leave;
sf->native_offset = frame->native_offset;
if (method) {
sf->method_address = (gsize) frame->ji->code_start;
- MonoReflectionMethod *rm = mono_method_get_object_checked (domain, method, NULL, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ MonoReflectionMethod *rm = mono_method_get_object_checked (domain, method, NULL, error);
+ if (!is_ok (error))
+ goto leave;
MONO_OBJECT_SETREF (sf, method, rm);
location = mono_debug_lookup_source_location (method, frame->native_offset, domain);
leave:
g_free (ud.frames);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ return is_ok (error);
}
/**
if (user_data.wait.num > 0) {
/* Abort the threads outside the threads lock */
for (i = 0; i < user_data.wait.num; ++i)
- ves_icall_System_Threading_Thread_Abort (user_data.wait.threads [i], NULL);
+ mono_thread_internal_abort (user_data.wait.threads [i]);
/*
* We should wait for the threads either to abort, or to leave the
mono_threads_unlock ();
}
-static void
-mono_special_static_data_free_slot (guint32 offset, guint32 size)
-{
- /* Only ever called for ThreadLocal instances */
- g_assert (ACCESS_SPECIAL_STATIC_OFFSET (offset, type) == SPECIAL_STATIC_OFFSET_TYPE_THREAD);
-
- mono_threads_lock ();
- do_free_special_slot (offset, size);
- mono_threads_unlock ();
-}
-
#ifdef HOST_WIN32
static void CALLBACK dummy_apc (ULONG_PTR param)
{
}
static void
-self_abort_internal (void)
+self_abort_internal (MonoError *error)
{
MonoException *exc;
+ mono_error_init (error);
+
/* FIXME this is insanely broken, it doesn't cause interruption to happen synchronously
* since passing FALSE to mono_thread_request_interruption makes sure it returns NULL */
exc = mono_thread_request_interruption (TRUE);
if (exc)
- mono_raise_exception (exc);
-
- mono_thread_info_self_interrupt ();
+ mono_error_set_exception_instance (error, exc);
+ else
+ mono_thread_info_self_interrupt ();
}
typedef struct {
void
ves_icall_System_Threading_Thread_GetStackTraces (MonoArray **out_threads, MonoArray **out_stack_traces)
{
- mono_threads_get_thread_dump (out_threads, out_stack_traces);
+ MonoError error;
+ mono_threads_get_thread_dump (out_threads, out_stack_traces, &error);
+ mono_error_set_pending_exception (&error);
}
/*
gpointer
mono_threads_attach_coop (MonoDomain *domain, gpointer *dummy)
{
- MonoError error;
MonoDomain *orig;
gboolean fresh_thread;
}
if (!mono_thread_internal_current ()) {
- mono_thread_attach_full (domain, FALSE, &error);
- mono_error_assert_ok (&error);
+ mono_thread_attach_full (domain, FALSE);
// #678164
mono_thread_set_state (mono_thread_internal_current (), ThreadState_Background);
extern MONO_API void mono_thread_set_main (MonoThread *thread);
extern MONO_API MonoThread *mono_thread_get_main (void);
-extern MONO_API void mono_thread_stop (MonoThread *thread);
+extern MONO_RT_EXTERNAL_ONLY MONO_API void mono_thread_stop (MonoThread *thread);
extern MONO_API void mono_thread_new_init (intptr_t tid, void* stack_start,
void* func);
RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE)
CSC = $(mcs_topdir)/class/lib/build/mcs.exe
-MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll
+MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Core.dll
ILASM = $(MINI_RUNTIME) $(CLASS)/ilasm.exe
AM_CFLAGS = \
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir); \
LANG=C; export LANG; \
- branch=`git branch | grep '^\*' | sed 's/(detached from .*/explicit/' | cut -d ' ' -f 2`; \
+ if test -z "$$ghprbPullId"; then \
+ branch=`git branch | grep '^\*' | sed 's/(detached from .*/explicit/' | cut -d ' ' -f 2`; \
+ else \
+ branch="pull-request-$$ghprbPullId"; \
+ fi; \
version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
echo "#define FULL_VERSION \"$$branch/$$version\""; \
); \
}
gpointer
-mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot)
+mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error)
{
- MonoError error;
int i;
MonoClass *klass = vtable->klass;
MonoAotModule *amodule = (MonoAotModule *)klass->image->aot_module;
gboolean err;
MethodRef ref;
gboolean res;
+ gpointer addr;
+ MonoError inner_error;
+
+ mono_error_init (error);
if (MONO_CLASS_IS_INTERFACE (klass) || klass->rank || !amodule)
return NULL;
return NULL;
for (i = 0; i < slot; ++i) {
- decode_method_ref (amodule, &ref, p, &p, &error);
- mono_error_cleanup (&error); /* FIXME don't swallow the error */
+ decode_method_ref (amodule, &ref, p, &p, &inner_error);
+ mono_error_cleanup (&inner_error); /* FIXME don't swallow the error */
}
- res = decode_method_ref (amodule, &ref, p, &p, &error);
- mono_error_cleanup (&error); /* FIXME don't swallow the error */
+ res = decode_method_ref (amodule, &ref, p, &p, &inner_error);
+ mono_error_cleanup (&inner_error); /* FIXME don't swallow the error */
if (!res)
return NULL;
if (ref.no_aot_trampoline)
if (mono_metadata_token_index (ref.token) == 0 || mono_metadata_token_table (ref.token) != MONO_TABLE_METHOD)
return NULL;
- return mono_aot_get_method_from_token (domain, ref.image, ref.token);
+ addr = mono_aot_get_method_from_token (domain, ref.image, ref.token, error);
+ return addr;
}
gboolean
return FALSE;
}
+static void
+init_llvmonly_method (MonoAotModule *amodule, guint32 method_index, MonoMethod *method, MonoClass *init_class, MonoGenericContext *context)
+{
+ gboolean res;
+ MonoError error;
+
+ res = init_method (amodule, method_index, method, init_class, context, &error);
+ if (!is_ok (&error)) {
+ MonoException *ex = mono_error_convert_to_exception (&error);
+ /* Its okay to raise in llvmonly mode */
+ if (ex)
+ mono_llvm_throw_exception ((MonoObject*)ex);
+ }
+}
+
void
mono_aot_init_llvm_method (gpointer aot_module, guint32 method_index)
{
MonoAotModule *amodule = (MonoAotModule *)aot_module;
- gboolean res;
- MonoError error;
- res = init_method (amodule, method_index, NULL, NULL, NULL, &error);
- // FIXME: Pass the exception up to the caller ?
- /* Its okay to raise in llvmonly mode */
- mono_error_raise_exception (&error);
+ init_llvmonly_method (amodule, method_index, NULL, NULL, NULL);
}
void
mono_aot_init_gshared_method_this (gpointer aot_module, guint32 method_index, MonoObject *this_obj)
{
MonoAotModule *amodule = (MonoAotModule *)aot_module;
- gboolean res;
MonoClass *klass;
MonoGenericContext *context;
MonoMethod *method;
- MonoError error;
// FIXME:
g_assert (this_obj);
context = mono_method_get_context (method);
g_assert (context);
- res = init_method (amodule, method_index, NULL, klass, context, &error);
- /* Its okay to raise in llvmonly mode */
- mono_error_raise_exception (&error);
+ init_llvmonly_method (amodule, method_index, NULL, klass, context);
}
void
mono_aot_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx)
{
MonoAotModule *amodule = (MonoAotModule *)aot_module;
- gboolean res;
MonoGenericContext context = { NULL, NULL };
MonoClass *klass = rgctx->class_vtable->klass;
- MonoError error;
if (klass->generic_class)
context.class_inst = klass->generic_class->context.class_inst;
context.class_inst = klass->generic_container->context.class_inst;
context.method_inst = rgctx->method_inst;
- res = init_method (amodule, method_index, NULL, rgctx->class_vtable->klass, &context, &error);
- /* Its okay to raise in llvmonly mode */
- mono_error_raise_exception (&error);
+ init_llvmonly_method (amodule, method_index, NULL, rgctx->class_vtable->klass, &context);
}
void
mono_aot_init_gshared_method_vtable (gpointer aot_module, guint32 method_index, MonoVTable *vtable)
{
MonoAotModule *amodule = (MonoAotModule *)aot_module;
- gboolean res;
MonoClass *klass;
MonoGenericContext *context;
MonoMethod *method;
- MonoError error;
klass = vtable->klass;
context = mono_method_get_context (method);
g_assert (context);
- res = init_method (amodule, method_index, NULL, klass, context, &error);
- /* Its okay to raise in llvmonly mode */
- mono_error_raise_exception (&error);
+ init_llvmonly_method (amodule, method_index, NULL, klass, context);
}
/*
MonoAotModule *amodule = (MonoAotModule *)klass->image->aot_module;
guint8 *code;
gboolean cache_result = FALSE;
+ MonoError inner_error;
mono_error_init (error);
* remoting.
*/
if (mono_aot_only && method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK)
- return mono_aot_get_method (domain, mono_marshal_method_from_wrapper (method));
+ return mono_aot_get_method_checked (domain, mono_marshal_method_from_wrapper (method), error);
g_assert (klass->inited);
if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED && method->klass->rank && strstr (method->name, "System.Collections.Generic")) {
MonoMethod *m = mono_aot_get_array_helper_from_wrapper (method);
- code = (guint8 *)mono_aot_get_method (domain, m);
+ code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+ mono_error_cleanup (&inner_error);
if (code)
return code;
}
* an out parameter, so the managed-to-native wrappers can share the same code.
*/
if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE && method->klass == mono_defaults.array_class && !strcmp (method->name, "GetGenericValueImpl")) {
- MonoError error;
MonoMethod *m;
MonoGenericContext ctx;
MonoType *args [16];
args [0] = &mono_defaults.object_class->byval_arg;
ctx.method_inst = mono_metadata_get_generic_inst (1, args);
- m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, &error), TRUE, TRUE);
+ m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, error), TRUE, TRUE);
if (!m)
- g_error ("AOT runtime could not load method due to %s", mono_error_get_message (&error)); /* FIXME don't swallow the error */
+ g_error ("AOT runtime could not load method due to %s", mono_error_get_message (error)); /* FIXME don't swallow the error */
/*
* Get the code for the <object> instantiation which should be emitted into
* the mscorlib aot image by the AOT compiler.
*/
- code = (guint8 *)mono_aot_get_method (domain, m);
+ code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+ mono_error_cleanup (&inner_error);
if (code)
return code;
}
((!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Interlocked") && (!strcmp (method->name, "CompareExchange") || !strcmp (method->name, "Exchange")) && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1]))) ||
(!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Volatile") && (!strcmp (method->name, "Read") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->ret)))) ||
(!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Volatile") && (!strcmp (method->name, "Write") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1])))))) {
- MonoError error;
MonoMethod *m;
MonoGenericContext ctx;
MonoType *args [16];
args [0] = &mono_defaults.object_class->byval_arg;
ctx.method_inst = mono_metadata_get_generic_inst (1, args);
- m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, &error), TRUE, TRUE);
+ m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, error), TRUE, TRUE);
if (!m)
- g_error ("AOT runtime could not load method due to %s", mono_error_get_message (&error)); /* FIXME don't swallow the error */
+ g_error ("AOT runtime could not load method due to %s", mono_error_get_message (error)); /* FIXME don't swallow the error */
/* Avoid recursion */
if (method == m)
* Get the code for the <object> instantiation which should be emitted into
* the mscorlib aot image by the AOT compiler.
*/
- code = (guint8 *)mono_aot_get_method (domain, m);
+ code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+ mono_error_cleanup (&inner_error);
if (code)
return code;
}
m = mono_marshal_get_array_accessor_wrapper (m);
if (m != method) {
- code = (guint8 *)mono_aot_get_method (domain, m);
+ code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+ mono_error_cleanup (&inner_error);
if (code)
return code;
}
MonoError error;
gpointer res = mono_aot_get_method_checked (domain, method, &error);
+ /* This is external only, so its ok to raise here */
mono_error_raise_exception (&error);
return res;
}
* method.
*/
gpointer
-mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token)
+mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error)
{
MonoAotModule *aot_module = (MonoAotModule *)image->aot_module;
int method_index;
- MonoError error;
gpointer res;
+ mono_error_init (error);
+
if (!aot_module)
return NULL;
method_index = mono_metadata_token_index (token) - 1;
- res = load_method (domain, aot_module, image, NULL, token, method_index, &error);
- mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+ res = load_method (domain, aot_module, image, NULL, token, method_index, error);
return res;
}
return NULL;
}
+gpointer
+mono_aot_get_method_checked (MonoDomain *domain,
+ MonoMethod *method, MonoError *error);
+{
+ mono_error_init (error);
+ return NULL;
+}
+
gboolean
mono_aot_is_got_entry (guint8 *code, guint8 *addr)
{
}
gpointer
-mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token)
+mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error)
{
+ mono_error_init (error);
return NULL;
}
}
gpointer
-mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot)
+mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error)
{
+ mono_error_init (error);
+
return NULL;
}
res ^= insn->sreg1 << 0x10;
res ^= insn->sreg2 << 0x14;
res ^= insn->sreg3 << 0x18;
- res ^= (guint) insn->next;
- res ^= (guint) insn->prev;
- res ^= (guint) insn;
+ res ^= (gsize) insn->next;
+ res ^= (gsize) insn->prev;
+ res ^= (gsize) insn;
return res;
}
int hash = 0;
if (obj == NULL)
- return 0;
+ return NULL;
if (suspend_count) {
/*
static inline int
get_objid (MonoObject *obj)
{
- return get_objref (obj)->id;
+ if (!obj)
+ return 0;
+ else
+ return get_objref (obj)->id;
}
/*
DEBUG_PRINTF (1, "[%p] Interrupting %p...\n", (gpointer) (gsize) mono_native_thread_id_get (), (gpointer)tid);
- /* This is _not_ equivalent to ves_icall_System_Threading_Thread_Abort () */
+ /* This is _not_ equivalent to mono_thread_internal_abort () */
InterruptData interrupt_data = { 0 };
interrupt_data.tls = tls;
ecount ++;
- if (!thread)
- thread = mono_thread_current ();
+ if (event == EVENT_KIND_VM_DEATH) {
+ thread = NULL;
+ } else {
+ if (!thread)
+ thread = mono_thread_current ();
- if (event == EVENT_KIND_VM_START && arg != NULL)
- thread = (MonoThread *)arg;
+ if (event == EVENT_KIND_VM_START && arg != NULL)
+ thread = (MonoThread *)arg;
+ }
buffer_add_objid (&buf, (MonoObject*)thread); // thread
static void
runtime_shutdown (MonoProfiler *prof)
{
- process_profiler_event (EVENT_KIND_VM_DEATH, mono_thread_current ());
+ process_profiler_event (EVENT_KIND_VM_DEATH, NULL);
mono_debugger_agent_cleanup ();
}
code = mono_jit_find_compiled_method_with_jit_info (domain, method, &ji);
if (!code) {
+ MonoError oerror;
+
/* Might be AOTed code */
- code = mono_aot_get_method (domain, method);
+ code = mono_aot_get_method_checked (domain, method, &oerror);
g_assert (code);
+ mono_error_assert_ok (&oerror);
ji = mono_jit_info_table_find (domain, (char *)code);
g_assert (ji);
}
void
mono_debugger_agent_debug_log (int level, MonoString *category, MonoString *message)
{
+ MonoError error;
int suspend_policy;
GSList *events;
EventInfo ei;
mono_loader_unlock ();
ei.level = level;
- ei.category = category ? mono_string_to_utf8 (category) : NULL;
- ei.message = message ? mono_string_to_utf8 (message) : NULL;
+ ei.category = NULL;
+ if (category) {
+ ei.category = mono_string_to_utf8_checked (category, &error);
+ mono_error_cleanup (&error);
+ }
+ ei.message = NULL;
+ if (message) {
+ ei.message = mono_string_to_utf8_checked (message, &error);
+ mono_error_cleanup (&error);
+ }
process_event (EVENT_KIND_USER_LOG, &ei, 0, NULL, events, suspend_policy);
/*
* Take the loader lock to avoid race conditions with CMD_VM_ABORT_INVOKE:
*
- * It is possible that ves_icall_System_Threading_Thread_Abort () was called
+ * It is possible that mono_thread_internal_abort () was called
* after the mono_runtime_invoke_checked() already returned, but it doesn't matter
* because we reset the abort here.
*/
tls->abort_requested = TRUE;
- ves_icall_System_Threading_Thread_Abort (THREAD_TO_INTERNAL (thread), NULL);
+ mono_thread_internal_abort (THREAD_TO_INTERNAL (thread));
mono_loader_unlock ();
break;
}
static void
buffer_add_cattr_arg (Buffer *buf, MonoType *t, MonoDomain *domain, MonoObject *val)
{
- if (val && val->vtable->klass == mono_defaults.monotype_class) {
+ if (val && val->vtable->klass == mono_defaults.runtimetype_class) {
/* Special case these so the client doesn't have to handle Type objects */
buffer_add_byte (buf, VALUE_TYPE_ID_TYPE);
s = mono_ldstr_checked (domain, method->klass->image, mono_metadata_token_index (token), &error);
mono_error_assert_ok (&error); /* FIXME don't swallow the error */
- s2 = mono_string_to_utf8 (s);
+ s2 = mono_string_to_utf8_checked (s, &error);
+ mono_error_assert_ok (&error);
buffer_add_byte (buf, TOKEN_TYPE_STRING);
buffer_add_string (buf, s2);
break;
}
default: {
+ MonoError error;
gpointer val;
MonoClass *handle_class;
break;
}
} else {
- MonoError error;
val = mono_ldtoken_checked (method->klass->image, token, &handle_class, NULL, &error);
if (!val)
g_error ("Could not load token due to %s", mono_error_get_message (&error));
} else if (handle_class == mono_defaults.string_class) {
char *s;
- s = mono_string_to_utf8 ((MonoString *)val);
+ s = mono_string_to_utf8_checked ((MonoString *)val, &error);
+ mono_error_assert_ok (&error);
buffer_add_byte (buf, TOKEN_TYPE_STRING);
buffer_add_string (buf, s);
g_free (s);
buffer_add_int (buf, mono_string_length (str) * 2);
buffer_add_data (buf, (guint8*)mono_string_chars (str), mono_string_length (str) * 2);
} else {
- s = mono_string_to_utf8 (str);
+ MonoError error;
+ s = mono_string_to_utf8_checked (str, &error);
+ mono_error_assert_ok (&error);
buffer_add_string (buf, s);
g_free (s);
}
if (verbose >= 2)
g_print ("Running '%s' ...\n", method->name);
#ifdef MONO_USE_AOT_COMPILER
- if ((func = (TestMethod)mono_aot_get_method (mono_get_root_domain (), method)))
- ;
- else
-#endif
+ MonoError error;
+ func = (TestMethod)mono_aot_get_method_checked (mono_get_root_domain (), method, &error);
+ mono_error_cleanup (&error);
+ if (!func)
func = (TestMethod)(gpointer)cfg->native_code;
+#else
+ func = (TestMethod)(gpointer)cfg->native_code;
+#endif
func = (TestMethod)mono_create_ftnptr (mono_get_root_domain (), func);
result = func ();
if (result != expected) {
#define NEW_LDSTRLITCONST(cfg,dest,val) NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val))
-#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class)
+#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class)
#define NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL)
#define EMIT_NEW_LDSTRLITCONST(cfg,dest,val) do { NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
-#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
#define EMIT_NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
/* Same as in common_call_trampoline () */
/* Avoid loading metadata or creating a generic vtable if possible */
- addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot);
+ addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot, &error);
+ mono_error_raise_exception (&error); // FIXME: Don't raise here
if (addr && !vt->klass->valuetype)
return mono_create_ftnptr (mono_domain_get (), addr);
MONO_API MonoJitInfo *
mono_get_jit_info_from_method (MonoDomain *domain, MonoMethod *method);
-MONO_API void *
+MONO_API MONO_RT_EXTERNAL_ONLY void *
mono_aot_get_method (MonoDomain *domain, MonoMethod *method);
MONO_END_DECLS
ins->inst_destbasereg = def->sreg1;
ins->inst_offset += def->inst_imm;
}
+
+ if (!MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
+ defs [ins->dreg] = ins;
+ def_index [ins->dreg] = ins_index;
+ }
}
- if ((spec [MONO_INST_DEST] != ' ') && !MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
- defs [ins->dreg] = ins;
- def_index [ins->dreg] = ins_index;
- }
-
if (MONO_IS_CALL (ins))
last_call_index = ins_index;
int context_used;
MonoInst *klass_inst = NULL, *res;
+ if (src->opcode == OP_PCONST && src->inst_p0 == 0)
+ return src;
+
context_used = mini_class_check_context_used (cfg, klass);
if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
if (context_used) {
MonoInst *args [3];
- if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
+ if (mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
MonoInst *cache_ins;
cache_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_CAST_CACHE);
MONO_INST_NEW (cfg, ins, OP_OBJC_GET_SELECTOR);
ins->dreg = mono_alloc_ireg (cfg);
// FIXME: Leaks
- ins->inst_p0 = mono_string_to_utf8 (s);
+ ins->inst_p0 = mono_string_to_utf8_checked (s, &cfg->error);
+ return_val_if_nok (&cfg->error, NULL);
MONO_ADD_INS (cfg->cbb, ins);
return ins;
}
case MONO_TYPE_I8:
info->ret_marshal = GSHAREDVT_RET_I8;
break;
-
+ case MONO_TYPE_GENERICINST:
+ g_assert (!mono_type_generic_inst_is_valuetype (ret));
+ info->ret_marshal = GSHAREDVT_RET_I8;
+ break;
default:
g_error ("Gsharedvt can't handle dst type [%d]", (int)sig->ret->type);
}
#define MONO_ARCH_HAVE_SDB_TRAMPOLINES 1
#define MONO_ARCH_HAVE_PATCH_CODE_NEW 1
#define MONO_ARCH_HAVE_OP_GENERIC_CLASS_INIT 1
+#define MONO_ARCH_HAVE_GENERAL_RGCTX_LAZY_FETCH_TRAMPOLINE 1
#if defined(TARGET_OSX) || defined(__linux__)
#define MONO_ARCH_HAVE_UNWIND_BACKTRACE 1
reg_offset += 4;
}
}
- if (iphone_abi) {
- mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
- mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
- } else {
- mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
- mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
- }
+ mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
+ mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
} else {
ARM_MOV_REG_REG (code, ARMREG_IP, ARMREG_SP);
ARM_PUSH (code, 0x5ff0);
}
}
+ MonoError isinst_error;
+ mono_error_init (&isinst_error);
if (ei->flags == MONO_EXCEPTION_CLAUSE_NONE && mono_object_isinst_checked (ex_obj, catch_class, &error)) {
setup_stack_trace (mono_ex, dynamic_methods, initial_trace_ips, &trace_ips);
g_slist_free (dynamic_methods);
MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
return TRUE;
}
- mono_error_cleanup (&error);
+ mono_error_cleanup (&isinst_error);
}
}
mono_error_assert_ok (&error);
}
if (msg == NULL) {
- msg = message ? mono_string_to_utf8 ((MonoString *) message) : g_strdup ("(System.Exception.Message property not available)");
+ if (message) {
+ msg = mono_string_to_utf8_checked ((MonoString *) message, &error);
+ if (!is_ok (&error)) {
+ mono_error_cleanup (&error);
+ msg = g_strdup ("(error while display System.Exception.Message property)");
+ }
+ } else {
+ msg = g_strdup ("(System.Exception.Message property not available)");
+ }
}
g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", (void*)mono_native_thread_id_get (), mono_object_class (obj)->name_space, mono_object_class (obj)->name, msg);
g_free (msg);
MonoString *str = mono_object_to_string (exc, &other);
char *msg = NULL;
- if (str)
- msg = mono_string_to_utf8 (str);
+ if (str) {
+ MonoError inner_error;
+ msg = mono_string_to_utf8_checked (str, &inner_error);
+ if (!is_ok (&inner_error)) {
+ msg = g_strdup_printf ("Nested exception while formatting original exception");
+ mono_error_cleanup (&inner_error);
+ }
+ }
else if (other) {
char *original_backtrace = mono_exception_get_managed_backtrace ((MonoException*)exc);
char *nested_backtrace = mono_exception_get_managed_backtrace ((MonoException*)other);
else
wrapper = mini_get_gsharedvt_out_sig_wrapper (normal_sig);
res = mono_compile_method_checked (wrapper, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
return res;
}
}
void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
{
MonoJumpInfo *patch_info;
+ mono_error_init (error);
+
for (patch_info = ji; patch_info; patch_info = patch_info->next) {
unsigned char *ip = patch_info->ip.i + code;
const unsigned char *target;
- MonoError error;
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+ return_if_nok (error);
if (patch_info->type == MONO_PATCH_INFO_NONE)
continue;
target =
mono_create_jit_trampoline (mono_domain_get (),
call->method, &error);
- if (!mono_error_ok (&error))
- mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+ if (!is_ok (&error)) {
+ set_failure (ctx, mono_error_get_message (&error));
+ mono_error_cleanup (&error);
+ return;
+ }
+
tramp_var = LLVMAddGlobal (ctx->lmodule, LLVMPointerType (llvm_sig, 0), name);
LLVMSetInitializer (tramp_var, LLVMConstIntToPtr (LLVMConstInt (LLVMInt64Type (), (guint64)(size_t)target, FALSE), LLVMPointerType (llvm_sig, 0)));
LLVMSetLinkage (tramp_var, LLVMExternalLinkage);
#else
target =
mono_create_jit_trampoline (mono_domain_get (),
- call->method, &error);
- if (!mono_error_ok (&error))
- mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+ call->method, &error);
+ if (!is_ok (&error)) {
+ g_free (name);
+ set_failure (ctx, mono_error_get_message (&error));
+ mono_error_cleanup (&error);
+ return;
+ }
callee = LLVMAddFunction (ctx->lmodule, name, llvm_sig);
g_free (name);
- if (!mono_error_ok (&error))
- mono_error_raise_exception (&error); /* FIXME: Don't raise here */
LLVMAddGlobalMapping (ctx->module->ee, callee, target);
#endif
}
}
void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
{
MonoJumpInfo *patch_info;
- MonoError error;
+
+ mono_error_init (error);
for (patch_info = ji; patch_info; patch_info = patch_info->next) {
unsigned char *ip = patch_info->ip.i + code;
case MONO_PATCH_INFO_R4:
case MONO_PATCH_INFO_R8:
/* from OP_AOTCONST : lui + addiu */
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+ return_if_nok (error);
+
patch_lui_addiu ((guint32 *)(void *)ip, (guint32)target);
continue;
#if 0
/* everything is dealt with at epilog output time */
continue;
default:
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+ return_if_nok (error);
+
mips_patch ((guint32 *)(void *)ip, (guint32)target);
break;
}
MINI_OP(OP_IL_SEQ_POINT, "il_seq_point", NONE, NONE, NONE)
MINI_OP(OP_IMPLICIT_EXCEPTION, "implicit_exception", NONE, NONE, NONE)
+/* CALL opcodes need to stay together, see MONO_IS_CALL macro */
MINI_OP(OP_VOIDCALL, "voidcall", NONE, NONE, NONE)
MINI_OP(OP_VOIDCALL_REG, "voidcall_reg", NONE, IREG, NONE)
MINI_OP(OP_VOIDCALL_MEMBASE, "voidcall_membase", NONE, IREG, NONE)
#ifndef DISABLE_JIT
void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
{
MonoJumpInfo *patch_info;
gboolean compile_aot = !run_cctors;
- MonoError error;
+
+ mono_error_init (error);
for (patch_info = ji; patch_info; patch_info = patch_info->next) {
unsigned char *ip = patch_info->ip.i + code;
unsigned char *target;
gboolean is_fd = FALSE;
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+ return_if_nok (error);
if (compile_aot) {
switch (patch_info->type) {
* Returns: a pointer to the newly created code
*/
static gpointer
-mono_jit_create_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target)
+mono_jit_create_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error)
{
- MonoError error;
MonoMethod *nm;
guint8 *addr = NULL;
+ mono_error_init (error);
+
if ((method->flags & METHOD_ATTRIBUTE_VIRTUAL) && mono_method_signature (method)->generic_param_count) {
return mono_create_specific_trampoline (method, MONO_TRAMPOLINE_GENERIC_VIRTUAL_REMOTING,
domain, NULL);
}
if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) ||
- (mono_method_signature (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class))) {
+ (mono_method_signature (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class)))
nm = mono_marshal_get_remoting_invoke_for_target (method, target);
- addr = (guint8 *)mono_compile_method_checked (nm, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
- } else
- {
- addr = (guint8 *)mono_compile_method_checked (method, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
- }
+ else
+ nm = method;
+ addr = (guint8 *)mono_compile_method_checked (nm, error);
+ return_val_if_nok (error, NULL);
return mono_get_addr_from_ftnptr (addr);
}
#endif
/* */
/*------------------------------------------------------------------*/
+static void
+decodeParmString (MonoString *s)
+{
+ char *str = mono_string_to_utf8(s, &error);
+ if (is_ok (&error)) {
+ printf("[STRING:%p:%s], ", s, str);
+ g_free (str);
+ } else {
+ mono_error_cleanup (&error);
+ printf("[STRING:%p:], ", s);
+ }
+}
+
static void
decodeParm(MonoType *type, void *curParm, int size)
{
MonoString *s = *((MonoString **) curParm);
if (s) {
g_assert (((MonoObject *) s)->vtable->klass == mono_defaults.string_class);
- printf("[STRING:%p:%s], ", s, mono_string_to_utf8(s));
+ decodeParmString (s);
} else {
printf("[STRING:null], ");
}
klass = obj->vtable->klass;
printf("%p [%p] ",obj,curParm);
if (klass == mono_defaults.string_class) {
- printf("[STRING:%p:%s]",
- obj, mono_string_to_utf8 ((MonoString *) obj));
+ decodeParmString ((MonoString *)obj);
} else if (klass == mono_defaults.int32_class) {
printf("[INT32:%p:%d]",
obj, *(gint32 *)((char *)obj + sizeof (MonoObject)));
if (obj->vtable) {
klass = obj->vtable->klass;
if (klass == mono_defaults.string_class) {
- printf ("this:[STRING:%p:%s], ",
- obj, mono_string_to_utf8 ((MonoString *)obj));
+ printf ("this:");
+ decodeParmString((MonoString *)obj);
} else {
printf ("this:%p[%s.%s], ",
obj, klass->name_space, klass->name);
;
if (s) {
g_assert (((MonoObject *)s)->vtable->klass == mono_defaults.string_class);
- printf ("[STRING:%p:%s]", s, mono_string_to_utf8 (s));
+ decodeParmString (s);
} else
printf ("[STRING:null], ");
break;
void
mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain,
- guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+ guint8 *code, MonoJumpInfo *ji, gboolean run_cctors,
+ MonoError *error)
{
MonoJumpInfo *patch_info;
- MonoError error;
+
+ mono_error_init (error);
for (patch_info = ji; patch_info; patch_info = patch_info->next) {
unsigned char *ip = patch_info->ip.i + code;
gconstpointer target = NULL;
target = mono_resolve_patch_target (method, domain, code,
- patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ patch_info, run_cctors, error);
+ return_if_nok (error);
switch (patch_info->type) {
case MONO_PATCH_INFO_IP:
}
void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
{
- MonoError error;
MonoJumpInfo *patch_info;
+ mono_error_init (error);
+
/* FIXME: Move part of this to arch independent code */
for (patch_info = ji; patch_info; patch_info = patch_info->next) {
unsigned char *ip = patch_info->ip.i + code;
gpointer target;
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
- mono_error_raise_exception (&error); /* FIXME: don't raise here */
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+ return_if_nok (error);
switch (patch_info->type) {
case MONO_PATCH_INFO_NONE:
impl = mono_class_inflate_generic_method_checked (impl, &context, &error);
g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
} else {
+ MonoError error;
+
/* Avoid loading metadata or creating a generic vtable if possible */
- if (lookup_aot && !vt->klass->valuetype)
- aot_addr = (guint8 *)mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
- else
+ if (lookup_aot && !vt->klass->valuetype) {
+ aot_addr = (guint8 *)mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method), &error);
+ mono_error_raise_exception (&error); // FIXME: Don't raise here
+ } else {
aot_addr = NULL;
+ }
if (aot_addr)
impl = NULL;
else
vtable_slot = &(vt->vtable [slot]);
/* Avoid loading metadata or creating a generic vtable if possible */
- addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot);
+ addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
if (addr && !vt->klass->valuetype) {
if (mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot))
*vtable_slot = addr;
MonoMethod *method = NULL;
gpointer addr;
guint8 *plt_entry;
+ MonoError error;
trampoline_calls ++;
token_info += sizeof (gpointer);
token = *(guint32*)(gpointer)token_info;
- addr = mono_aot_get_method_from_token (mono_domain_get (), image, token);
+ addr = mono_aot_get_method_from_token (mono_domain_get (), image, token, &error);
+ if (!is_ok (&error))
+ mono_error_cleanup (&error);
if (!addr) {
- MonoError error;
method = mono_get_method_checked (image, token, NULL, NULL, &error);
if (!method)
g_error ("Could not load AOT trampoline due to %s", mono_error_get_message (&error));
}
}
#else
- mono_arch_patch_code (cfg, cfg->method, cfg->domain, cfg->native_code, cfg->patch_info, cfg->run_cctors);
+ mono_arch_patch_code (cfg, cfg->method, cfg->domain, cfg->native_code, cfg->patch_info, cfg->run_cctors, &cfg->error);
+ if (!is_ok (&cfg->error)) {
+ mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
+ return;
+ }
#endif
if (cfg->method->dynamic) {
mono_arch_patch_code_new (NULL, target_domain, (guint8 *)tmp->data, &patch_info, target);
}
#else
- for (tmp = jlist->list; tmp; tmp = tmp->next)
- mono_arch_patch_code (NULL, NULL, target_domain, tmp->data, &patch_info, TRUE);
+ for (tmp = jlist->list; tmp; tmp = tmp->next) {
+ mono_arch_patch_code (NULL, NULL, target_domain, tmp->data, &patch_info, TRUE, error);
+ if (!is_ok (error))
+ break;
+ }
#endif
}
}
#define MONO_IS_STORE_MEMBASE(ins) (((ins)->opcode >= OP_STORE_MEMBASE_REG && (ins)->opcode <= OP_STOREV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_STORE_I1 && (ins)->opcode <= OP_ATOMIC_STORE_R8))
#define MONO_IS_STORE_MEMINDEX(ins) (((ins)->opcode >= OP_STORE_MEMINDEX) && ((ins)->opcode <= OP_STORER8_MEMINDEX))
-#define MONO_IS_CALL(ins) (((ins->opcode >= OP_VOIDCALL) && (ins->opcode <= OP_VOIDCALL_MEMBASE)) || ((ins->opcode >= OP_FCALL) && (ins->opcode <= OP_FCALL_MEMBASE)) || ((ins->opcode >= OP_LCALL) && (ins->opcode <= OP_LCALL_MEMBASE)) || ((ins->opcode >= OP_VCALL) && (ins->opcode <= OP_VCALL_MEMBASE)) || ((ins->opcode >= OP_CALL) && (ins->opcode <= OP_CALL_MEMBASE)) || ((ins->opcode >= OP_VCALL2) && (ins->opcode <= OP_VCALL2_MEMBASE)) || (ins->opcode == OP_TAILCALL) || ((ins->opcode >= OP_RCALL) && (ins->opcode <= OP_RCALL_MEMBASE)))
+// OP_DYN_CALL is not a MonoCallInst
+#define MONO_IS_CALL(ins) (((ins->opcode >= OP_VOIDCALL) && (ins->opcode <= OP_VCALL2_MEMBASE)) || (ins->opcode == OP_TAILCALL))
#define MONO_IS_JUMP_TABLE(ins) (((ins)->opcode == OP_JUMP_TABLE) ? TRUE : ((((ins)->opcode == OP_AOTCONST) && (ins->inst_i1 == (gpointer)MONO_PATCH_INFO_SWITCH)) ? TRUE : ((ins)->opcode == OP_SWITCH) ? TRUE : ((((ins)->opcode == OP_GOT_ENTRY) && ((ins)->inst_right->inst_i1 == (gpointer)MONO_PATCH_INFO_SWITCH)) ? TRUE : FALSE)))
/* AOT */
void mono_aot_init (void);
void mono_aot_cleanup (void);
-gpointer mono_aot_get_method (MonoDomain *domain,
- MonoMethod *method);
gpointer mono_aot_get_method_checked (MonoDomain *domain,
MonoMethod *method, MonoError *error);
-gpointer mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token);
+gpointer mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error);
gboolean mono_aot_is_got_entry (guint8 *code, guint8 *addr);
guint8* mono_aot_get_plt_entry (guint8 *code);
guint32 mono_aot_get_plt_info_offset (mgreg_t *regs, guint8 *code);
MonoJitInfo* mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr);
gpointer mono_aot_plt_resolve (gpointer aot_module, guint32 plt_info_offset, guint8 *code, MonoError *error);
void mono_aot_patch_plt_entry (guint8 *code, guint8 *plt_entry, gpointer *got, mgreg_t *regs, guint8 *addr);
-gpointer mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot);
+gpointer mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error);
gpointer mono_aot_create_specific_trampoline (MonoImage *image, gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len);
gpointer mono_aot_get_trampoline (const char *name);
gpointer mono_aot_get_trampoline_full (const char *name, MonoTrampInfo **out_tinfo);
GList *mono_arch_get_iregs_clobbered_by_call (MonoCallInst *call);
GList *mono_arch_get_fregs_clobbered_by_call (MonoCallInst *call);
guint32 mono_arch_regalloc_cost (MonoCompile *cfg, MonoMethodVar *vmv);
-void mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors);
+void mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error);
void mono_arch_patch_code_new (MonoCompile *cfg, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gpointer target);
void mono_arch_flush_icache (guint8 *code, gint size);
int mono_arch_max_epilog_size (MonoCompile *cfg);
g_free (as);
} else if (klass == mono_defaults.int32_class) {
printf ("[INT32:%p:%d], ", o, *(gint32 *)((char *)o + sizeof (MonoObject)));
- } else if (klass == mono_defaults.monotype_class) {
+ } else if (klass == mono_defaults.runtimetype_class) {
printf ("[TYPE:%s], ", mono_type_full_name (((MonoReflectionType*)o)->type));
} else
printf ("[%s.%s:%p], ", klass->name_space, klass->name, o);
return buf;
}
+gpointer
+mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboolean aot)
+{
+ guint8 *code, *buf;
+ int tramp_size;
+ MonoJumpInfo *ji = NULL;
+ GSList *unwind_ops;
+
+ g_assert (aot);
+ tramp_size = 64;
+
+ code = buf = (guint8 *)mono_global_codeman_reserve (tramp_size);
+
+ unwind_ops = mono_arch_get_cie_program ();
+
+ // FIXME: Currently, we always go to the slow path.
+ /* This receives a <slot, trampoline> in the rgctx arg reg. */
+ /* Load trampoline addr */
+ amd64_mov_reg_membase (code, AMD64_R11, MONO_ARCH_RGCTX_REG, 8, 8);
+ /* move the rgctx pointer to the VTABLE register */
+ amd64_mov_reg_reg (code, MONO_ARCH_VTABLE_REG, AMD64_ARG_REG1, sizeof(gpointer));
+ /* Jump to the trampoline */
+ amd64_jump_reg (code, AMD64_R11);
+
+ mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
+
+ g_assert (code - buf <= tramp_size);
+
+ if (info)
+ *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, code - buf, ji, unwind_ops);
+
+ return buf;
+}
+
void
mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
{
prop = mono_class_get_property_from_name (klass, "StackTrace");
str = (MonoString*)mono_property_get_value_checked (prop, NULL, NULL, &error);
mono_error_assert_ok (&error);
- stack_trace = mono_string_to_utf8 (str);
+ stack_trace = mono_string_to_utf8_checked (str, &error);
+ mono_error_assert_ok (&error);
fprintf (stdout, "-= Stack Trace =-\n%s\n\n", stack_trace);
g_free (stack_trace);
static inline void append_report (GString **report, const gchar *format, ...)
{
-#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
va_list ap;
if (!*report)
*report = g_string_new ("");
va_start (ap, format);
g_string_append_vprintf (*report, format, ap);
va_end (ap);
-#else
- g_assert_not_reached ();
-#endif
}
static gboolean saved_strings_find_func (gpointer key, gpointer value, gpointer user_data)
{
+ MonoError error;
SavedStringFindInfo *info = (SavedStringFindInfo*)user_data;
SavedString *saved = (SavedString*)value;
gchar *utf_str;
if (!info || !saved || mono_string_length (saved->string) != info->len)
return FALSE;
- utf_str = mono_string_to_utf8 (saved->string);
+ utf_str = mono_string_to_utf8_checked (saved->string, &error);
+ mono_error_assert_ok (&error);
hash = do_calc_string_hash (0, utf_str);
g_free (utf_str);
break;
}
- if (ref->vtable->klass == mono_defaults.string_class)
- str = mono_string_to_utf8 ((MonoString*)ref);
- else
+ if (ref->vtable->klass == mono_defaults.string_class) {
+ MonoError error;
+ str = mono_string_to_utf8_checked ((MonoString*)ref, &error);
+ mono_error_cleanup (&error);
+ } else
str = NULL;
g_print ("xdomain reference in %p (%s.%s) at offset %d (%s) to %p (%s.%s) (%s) - pointed to by:\n",
obj, obj->vtable->klass->name_space, obj->vtable->klass->name,
{
EmptyStruct s;
+ memset (&s, 0, sizeof (s));
+
g_assert (a == 42);
return s;
static void
mono_error_prepare (MonoErrorInternal *error)
{
+ /* mono_error_set_* after a mono_error_cleanup without an intervening init */
+ g_assert (error->error_code != MONO_ERROR_CLEANUP_CALLED_SENTINEL);
if (error->error_code != MONO_ERROR_NONE)
return;
mono_error_cleanup (MonoError *oerror)
{
MonoErrorInternal *error = (MonoErrorInternal*)oerror;
- if (error->error_code == MONO_ERROR_NONE)
+ short int orig_error_code = error->error_code;
+ gboolean free_strings = error->flags & MONO_ERROR_FREE_STRINGS;
+ gboolean has_instance_handle = is_managed_exception (error);
+
+ /* Two cleanups in a row without an intervening init. */
+ g_assert (orig_error_code != MONO_ERROR_CLEANUP_CALLED_SENTINEL);
+
+ /* Mark it as cleaned up. */
+ error->error_code = MONO_ERROR_CLEANUP_CALLED_SENTINEL;
+ error->flags = 0;
+
+ if (orig_error_code == MONO_ERROR_NONE)
return;
- if (is_managed_exception (error))
+
+ if (has_instance_handle)
mono_gchandle_free (error->exn.instance_handle);
+
g_free ((char*)error->full_message);
g_free ((char*)error->full_message_with_fields);
- if (!(error->flags & MONO_ERROR_FREE_STRINGS)) //no memory was allocated
+ error->full_message = NULL;
+ error->full_message_with_fields = NULL;
+ if (!free_strings) //no memory was allocated
return;
g_free ((char*)error->type_name);
g_free ((char*)error->exception_name_space);
g_free ((char*)error->exception_name);
g_free ((char*)error->first_argument);
+ error->type_name = error->assembly_name = error->member_name = error->exception_name_space = error->exception_name = error->first_argument = NULL;
+ error->exn.klass = NULL;
+
}
gboolean
exception = (MonoException*) mono_gchandle_get_target (error->exn.instance_handle);
break;
+ case MONO_ERROR_CLEANUP_CALLED_SENTINEL:
+ mono_error_set_execution_engine (error_out, "MonoError reused after mono_error_cleanup");
+ break;
default:
mono_error_set_execution_engine (error_out, "Invalid error-code %d", error->error_code);
}
*/
MONO_ERROR_GENERIC = 9,
/* This one encapsulates a managed exception instance */
- MONO_ERROR_EXCEPTION_INSTANCE = 10
+ MONO_ERROR_EXCEPTION_INSTANCE = 10,
+
+ /* Not a valid error code - indicates that the error was cleaned up and reused */
+ MONO_ERROR_CLEANUP_CALLED_SENTINEL = 0xffff
};
/*Keep in sync with MonoErrorInternal*/
static inline void append_report (GString **report, const gchar *format, ...)
{
-#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
va_list ap;
if (!*report)
*report = g_string_new ("");
va_start (ap, format);
g_string_append_vprintf (*report, format, ap);
va_end (ap);
-#else
- g_assert_not_reached ();
-#endif
}
static inline void do_mono_profiler_iomap (GString **report, const char *pathname, const char *new_pathname)
--- /dev/null
+$(ProjectDir)\..\..\jay\jay.exe -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
--- /dev/null
+@MONO@ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)\..\..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-9.cs
+@MONO@ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)\..\..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-0-8.cs
+@MONO@ $(OutputPath)\RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)\..\..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)\..\..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
}
//
// Prebuild code, might be in inputs, check:
- // inputs/LIBRARY-PROFILE.pre
// inputs/LIBRARY.pre
//
- string prebuild = Load (library + ".pre");
- string prebuild_windows, prebuild_unix;
-
- int q = library.IndexOf ("-");
- if (q != -1)
- prebuild = prebuild + Load (library.Substring (0, q) + ".pre");
-
- if (prebuild.IndexOf ("@MONO@") != -1){
- prebuild_unix = prebuild.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat");
- prebuild_windows = prebuild.Replace ("@MONO@", "").Replace ("@CAT@", "type");
- } else {
- prebuild_unix = prebuild.Replace ("jay.exe", "jay");
- prebuild_windows = prebuild;
- }
-
- const string condition_unix = "Condition=\" '$(OS)' != 'Windows_NT' \"";
- const string condition_windows = "Condition=\" '$(OS)' == 'Windows_NT' \"";
- prebuild =
- " <PreBuildEvent " + condition_unix + ">\n" + prebuild_unix + "\n </PreBuildEvent>" + NewLine +
- " <PreBuildEvent " + condition_windows + ">" + NewLine + prebuild_windows + NewLine + " </PreBuildEvent>" + NewLine;
+ string prebuild = GenerateStep (library, ".pre", "PreBuildEvent");
+ string postbuild = GenerateStep (library, ".post", "PostBuildEvent");
var all_args = new Queue<string []> ();
all_args.Enqueue (flags.Split ());
}
string [] source_files;
- //Console.WriteLine ("Base: {0} res: {1}", base_dir, response);
using (var reader = new StreamReader (NativeName (base_dir + "\\" + response))) {
source_files = reader.ReadToEnd ().Split ();
}
if (embedded_resources.Count > 0) {
resources.AppendFormat (" <ItemGroup>" + NewLine);
foreach (var dk in embedded_resources) {
- resources.AppendFormat (" <EmbeddedResource Include=\"{0}\">" + NewLine, dk.Key);
+ var source = dk.Key;
+ if (source.EndsWith (".resources"))
+ source = source.Replace (".resources", ".resx");
+ resources.AppendFormat (" <EmbeddedResource Include=\"{0}\">" + NewLine, source);
resources.AppendFormat (" <LogicalName>{0}</LogicalName>" + NewLine, dk.Value);
resources.AppendFormat (" </EmbeddedResource>" + NewLine);
}
build_output_dir = Path.GetDirectoryName (LibraryOutput);
else
build_output_dir = "bin\\Debug\\" + library;
-
-
- string postbuild_unix = string.Empty;
- string postbuild_windows = string.Empty;
-
- var postbuild =
- " <PostBuildEvent " + condition_unix + ">" + NewLine + postbuild_unix + NewLine + " </PostBuildEvent>" + NewLine +
- " <PostBuildEvent " + condition_windows + ">" + NewLine + postbuild_windows + NewLine + " </PostBuildEvent>";
-
bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build"));
Replace ("@DEBUGTYPE@", want_debugging_support ? "full" : "pdbonly").
Replace ("@REFERENCES@", refs.ToString ()).
Replace ("@PREBUILD@", prebuild).
- Replace ("@STARTUPOBJECT@", main == null ? "" : $"<StartupObject>{main}</StartupObject>").
Replace ("@POSTBUILD@", postbuild).
+ Replace ("@STARTUPOBJECT@", main == null ? "" : $"<StartupObject>{main}</StartupObject>").
//Replace ("@ADDITIONALLIBPATHS@", String.Format ("<AdditionalLibPaths>{0}</AdditionalLibPaths>", string.Join (",", libs.ToArray ()))).
Replace ("@ADDITIONALLIBPATHS@", String.Empty).
Replace ("@RESOURCES@", resources.ToString ()).
return Csproj;
}
+ string GenerateStep (string library, string suffix, string eventKey)
+ {
+ string target = Load (library + suffix);
+ string target_windows, target_unix;
+
+ int q = library.IndexOf ("-");
+ if (q != -1)
+ target = target + Load (library.Substring (0, q) + suffix);
+
+ if (target.IndexOf ("@MONO@") != -1){
+ target_unix = target.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat");
+ target_windows = target.Replace ("@MONO@", "").Replace ("@CAT@", "type");
+ } else {
+ target_unix = target.Replace ("jay.exe", "jay");
+ target_windows = target;
+ }
+ const string condition_unix = "Condition=\" '$(OS)' != 'Windows_NT' \"";
+ const string condition_windows = "Condition=\" '$(OS)' == 'Windows_NT' \"";
+ var result =
+ $" <{eventKey} {condition_unix}>\n{target_unix}\n </{eventKey}>{NewLine}" +
+ $" <{eventKey} {condition_windows}>{NewLine}{target_windows}{NewLine} </{eventKey}>";
+ return result;
+ }
+
void AddProjectReference (StringBuilder refs, VsCsproj result, MsbuildGenerator match, string r, string alias)
{
refs.AppendFormat (" <ProjectReference Include=\"{0}\">{1}", GetRelativePath (result.csProjFilename, match.CsprojFilename), NewLine);
}
switch (args [1]){
- case "xml":
- Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay",
- bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay",
- (i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern")));
- break;
-
case "core":
Filter (bdir + "/build/common/Consts.cs.in",
bdir + "/build/common/Consts.cs",
.stamp-clone:
@if [ ! -d $(CPPSHARP_DIR) ]; then \
- git clone git@github.com:xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
+ git clone git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
fi
MonoAotOffsetsDumper.exe: .stamp-clone MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)