mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
172
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f9c74f4c5 | ||
|
|
df43380ea6 | ||
|
|
ab5dda7fba | ||
|
|
12bceb1700 | ||
|
|
f930824ea9 | ||
|
|
e0a408f702 | ||
|
|
12dc660454 | ||
|
|
ac2e2c7703 | ||
|
|
d5a18ba292 | ||
|
|
dfb8d2ac8e | ||
|
|
ea77b1f9fb | ||
|
|
558750f053 | ||
|
|
e2e74c95e6 | ||
|
|
ca51c3b026 | ||
|
|
d4b4c2dbbc | ||
|
|
23042a0aa3 | ||
|
|
64b8e0c063 | ||
|
|
05d341392c | ||
|
|
af429ecfd0 | ||
|
|
d2c021407d | ||
|
|
3461617bc2 | ||
|
|
605c8771b8 | ||
|
|
fcb9de513a | ||
|
|
7ad366c25a | ||
|
|
d1ffd5a794 | ||
|
|
3552179bda | ||
|
|
eb6781f3cd | ||
|
|
548dca4730 | ||
|
|
a4024ba4ae | ||
|
|
8ed233ef06 | ||
|
|
4fc8068d2a | ||
|
|
28179361ec | ||
|
|
d62679a4a4 | ||
|
|
e2f24086a8 | ||
|
|
818b81ef40 | ||
|
|
753f233a31 | ||
|
|
4f719f9ce9 | ||
|
|
5dbf97e660 | ||
|
|
2804d6af37 | ||
|
|
87622fc711 | ||
|
|
4e1e37519a | ||
|
|
9aed010782 | ||
|
|
80b14d356f | ||
|
|
557390ee46 | ||
|
|
02f48039b1 | ||
|
|
ae030203e7 | ||
|
|
fad438976c | ||
|
|
240cf239a2 | ||
|
|
64f6eb2d1d | ||
|
|
1531798bbe | ||
|
|
2320d0dc40 | ||
|
|
6ea08668a2 | ||
|
|
8b10d9bb0b | ||
|
|
b7fb736254 | ||
|
|
5fc6ecd7c7 | ||
|
|
8790297c85 | ||
|
|
1afc866f87 | ||
|
|
52cdea5c0a | ||
|
|
be02242f8b | ||
|
|
85650c7528 | ||
|
|
79de2b62f9 | ||
|
|
17ad50a165 | ||
|
|
1ec4bd5c26 | ||
|
|
7439e997ac | ||
|
|
d77664ceb0 | ||
|
|
777f69153c | ||
|
|
7f2825301e | ||
|
|
a1f58d35be | ||
|
|
6c1bf0d17e | ||
|
|
a8392ba567 | ||
|
|
f065a289f6 | ||
|
|
3f740f3d94 | ||
|
|
300876b229 | ||
|
|
7f6a46403d | ||
|
|
f0d2ee46f8 | ||
|
|
90bb9c6d00 | ||
|
|
41339d95c6 | ||
|
|
c842249d72 | ||
|
|
9fd3c7ac4b | ||
|
|
550d314e51 | ||
|
|
0083728e19 | ||
|
|
e73499b337 | ||
|
|
b818408b16 | ||
|
|
b946785022 | ||
|
|
468160e712 | ||
|
|
da04211894 | ||
|
|
924a954d1f | ||
|
|
1242b4b82c | ||
|
|
1eb9ba45c4 | ||
|
|
d2f391c80c | ||
|
|
2c11b2ea4a | ||
|
|
7912295bc9 | ||
|
|
582b370761 | ||
|
|
d3624fa257 | ||
|
|
1d63659429 | ||
|
|
29abf6790d | ||
|
|
6d07ad8e7a | ||
|
|
9050d9cba1 | ||
|
|
156c7cf97a | ||
|
|
f8ff518ebe | ||
|
|
5fdbad2444 | ||
|
|
0804720aaa | ||
|
|
f008d4afb6 | ||
|
|
bbbcc73bde | ||
|
|
0537cb3c2a | ||
|
|
95b09a1a79 | ||
|
|
6e5e8d7915 | ||
|
|
462c6b08e9 | ||
|
|
ebe2a3df1d | ||
|
|
5846c52247 | ||
|
|
6cb9a04fca | ||
|
|
5e9eba8ffb | ||
|
|
65f17c2c26 | ||
|
|
00f631312f | ||
|
|
666ea5f867 | ||
|
|
3bbedfebb7 | ||
|
|
a17da53c37 | ||
|
|
6382fd247d | ||
|
|
a94aa47cd8 | ||
|
|
ec7be0fd36 | ||
|
|
4b726a17b8 | ||
|
|
7dd6476b8e | ||
|
|
2ed68d65e8 | ||
|
|
3968beaced | ||
|
|
5fa8e1abe7 | ||
|
|
6d60ff581c | ||
|
|
5c8ab13f0c | ||
|
|
32e2bb7c39 | ||
|
|
a824dde30f | ||
|
|
3ee5d36ec7 | ||
|
|
57cce937d8 | ||
|
|
efa5a5ad17 | ||
|
|
82c38c4409 | ||
|
|
d3da468965 | ||
|
|
2006bf3f44 | ||
|
|
59be7ba9c5 | ||
|
|
bb296086c0 | ||
|
|
ccbd0b1a0d | ||
|
|
a27d7ee86d | ||
|
|
8602eed8f7 | ||
|
|
a27a42b99b | ||
|
|
cf7319008b | ||
|
|
4f8114aabd | ||
|
|
749171e917 | ||
|
|
2b72c6bdf2 | ||
|
|
c8e73660db | ||
|
|
dc17504d3f | ||
|
|
4373bd213a | ||
|
|
f574898b09 | ||
|
|
ceb74f4118 | ||
|
|
41c28a59bb | ||
|
|
83924ebb2c | ||
|
|
3c920be3e5 | ||
|
|
27b3636cef | ||
|
|
ea6b8960d0 | ||
|
|
d2d338fe26 | ||
|
|
4bd9820eaa | ||
|
|
14f56f6aea | ||
|
|
88bc5cee97 | ||
|
|
92ff3c372d | ||
|
|
128f297b84 | ||
|
|
247bf1f21c | ||
|
|
d595c66bbd | ||
|
|
788c95a0e0 | ||
|
|
e207bf76ab | ||
|
|
f8365f7900 | ||
|
|
1852905c44 | ||
|
|
ddcfc42070 | ||
|
|
db57c23c29 | ||
|
|
17972cec4f | ||
|
|
6bee6a7b18 | ||
|
|
44acb717d8 |
No files matched your search
@@ -494,16 +494,12 @@ Directory Roadmap
|
||||
|
||||
* `dis/` - CIL executable Disassembler
|
||||
|
||||
* `cli/` - Common code for the JIT and the interpreter.
|
||||
|
||||
* `io-layer/` - The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
* `cil/` - Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
* `interp/` - Interpreter for CLI executables (obsolete).
|
||||
|
||||
* `arch/` - Architecture specific portions.
|
||||
|
||||
* `man/` - Manual pages for the various Mono commands and programs.
|
||||
|
||||
+3
-19
@@ -2499,7 +2499,6 @@ TARGET="unknown"
|
||||
ACCESS_UNALIGNED="yes"
|
||||
|
||||
JIT_SUPPORTED=no
|
||||
INTERP_SUPPORTED=no
|
||||
LIBC="libc.so.6"
|
||||
INTL="libc.so.6"
|
||||
SQLITE="libsqlite.so.0"
|
||||
@@ -2512,7 +2511,6 @@ XINERAMA="libXinerama.so.1"
|
||||
sizeof_register="SIZEOF_VOID_P"
|
||||
|
||||
jit_wanted=true
|
||||
interp_wanted=false
|
||||
sgen_supported=false
|
||||
boehm_supported=true
|
||||
case "$host" in
|
||||
@@ -2940,18 +2938,10 @@ if test x$JIT_SUPPORTED = xyes; then
|
||||
USEJIT=true
|
||||
jit_status="Building and using the JIT"
|
||||
else
|
||||
if $interp_wanted; then
|
||||
jit_status="Building the JIT, defaulting to the interpreter"
|
||||
else
|
||||
AC_ERROR(No JIT or interpreter support available or selected.)
|
||||
fi
|
||||
AC_ERROR(No JIT support available or selected.)
|
||||
fi
|
||||
else
|
||||
if test x$interp_wanted = xtrue; then
|
||||
jit_status="interpreter"
|
||||
else
|
||||
AC_ERROR(No JIT or interpreter support available or selected.)
|
||||
fi
|
||||
AC_ERROR(No JIT support available or selected.)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
|
||||
@@ -3358,7 +3348,6 @@ AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
|
||||
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
|
||||
|
||||
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
|
||||
AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
|
||||
AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
|
||||
|
||||
AC_SUBST(LIBC)
|
||||
@@ -3378,11 +3367,7 @@ AC_SUBST(LDFLAGS)
|
||||
mono_build_root=`pwd`
|
||||
AC_SUBST(mono_build_root)
|
||||
|
||||
if test x$USEJIT = xtrue; then
|
||||
mono_runtime=mono/mini/mono
|
||||
else
|
||||
mono_runtime=mono/interpreter/mint
|
||||
fi
|
||||
mono_runtime=mono/mini/mono
|
||||
AC_SUBST(mono_runtime)
|
||||
|
||||
mono_cfg_root=$mono_build_root/runtime
|
||||
@@ -3579,7 +3564,6 @@ mono/arch/arm/Makefile
|
||||
mono/arch/arm64/Makefile
|
||||
mono/arch/ia64/Makefile
|
||||
mono/arch/mips/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/tests/tests-config
|
||||
mono/tests/assemblyresolve/Makefile
|
||||
|
||||
@@ -27,13 +27,8 @@ SGENPCFILE=
|
||||
endif
|
||||
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
else
|
||||
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
|
||||
endif
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ default_stderr_handler (const gchar *message)
|
||||
}
|
||||
|
||||
|
||||
#elif MONOTOUCH
|
||||
#elif defined(HOST_IOS)
|
||||
#include <asl.h>
|
||||
|
||||
static int
|
||||
|
||||
@@ -12,6 +12,7 @@ monotouch_SUBDIRS := build class
|
||||
monotouch_runtime_SUBDIRS := build class
|
||||
xammac_SUBDIRS := build class
|
||||
mobile_SUBDIRS := build class
|
||||
mobile_static_SUBDIRS := build class
|
||||
net_3_5_SUBDIRS := build class tools/xbuild
|
||||
net_4_0_SUBDIRS := build class
|
||||
net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
|
||||
@@ -114,6 +115,7 @@ $(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%:
|
||||
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--mobile--%): profile-do--mobile--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--mobile_static--%): profile-do--mobile_static--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
|
||||
|
||||
|
||||
@@ -12,7 +12,22 @@ profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:MOBILE \
|
||||
-d:MOBILE_DYNAMIC \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_INSTALL = yes
|
||||
@@ -12,7 +12,24 @@ profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:FULL_AOT_RUNTIME -d:DISABLE_REMOTING -d:DISABLE_COM -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-d:MOBILE \
|
||||
-d:FULL_AOT_RUNTIME \
|
||||
-d:DISABLE_REMOTING \
|
||||
-d:DISABLE_COM \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
NO_TEST = yes
|
||||
|
||||
|
||||
@@ -12,7 +12,24 @@ profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MOBILE_DYNAMIC -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-d:MOBILE \
|
||||
-d:MOBILE_DYNAMIC \
|
||||
-d:MONODROID \
|
||||
-d:ANDROID \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
NO_TEST = yes
|
||||
|
||||
|
||||
@@ -12,9 +12,27 @@ profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FULL_AOT_RUNTIME -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-d:MOBILE \
|
||||
-d:MONOTOUCH \
|
||||
-d:DISABLE_REMOTING \
|
||||
-d:DISABLE_COM \
|
||||
-d:FULL_AOT_RUNTIME \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
NO_TEST = yes
|
||||
|
||||
# the tuner takes care of the install
|
||||
NO_INSTALL = yes
|
||||
NO_INSTALL = yes
|
||||
@@ -13,7 +13,7 @@ using System.Xml;
|
||||
using Commons.Xml.Nvdl;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.Commons.Xml.Nvdl
|
||||
namespace MonoTests.Commons.Xml.Relaxng
|
||||
{
|
||||
[TestFixture]
|
||||
public class NvdlValidatingReaderTests
|
||||
|
||||
+23
-20
@@ -106,7 +106,7 @@ net_2_0_only_dirs := \
|
||||
|
||||
pcl_facade_dirs := Facades
|
||||
|
||||
mobile_dirs := \
|
||||
mobile_common_dirs := \
|
||||
corlib \
|
||||
System \
|
||||
System.Core \
|
||||
@@ -134,19 +134,27 @@ mobile_dirs := \
|
||||
System.Net \
|
||||
System.Windows \
|
||||
System.Xml.Serialization \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
monodroid_dirs := \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
Mono.CSharp \
|
||||
Microsoft.CSharp \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
mobile_static_dirs := \
|
||||
$(mobile_common_dirs) \
|
||||
Mono.Dynamic.Interpreter
|
||||
|
||||
mobile_dynamic_dirs := \
|
||||
$(mobile_common_dirs) \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
System.Net.Http
|
||||
|
||||
xammac_dirs := \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
Mono.CSharp \
|
||||
Microsoft.CSharp \
|
||||
System.Net.Http
|
||||
$(mobile_dynamic_dirs)
|
||||
|
||||
monodroid_dirs := \
|
||||
$(mobile_dynamic_dirs)
|
||||
|
||||
monotouch_dirs := \
|
||||
$(mobile_static_dirs)
|
||||
|
||||
monotouch_runtime_dirs := \
|
||||
corlib \
|
||||
@@ -155,11 +163,6 @@ monotouch_runtime_dirs := \
|
||||
System.XML \
|
||||
Mono.CSharp
|
||||
|
||||
monotouch_dirs := \
|
||||
Mono.CSharp \
|
||||
Microsoft.CSharp \
|
||||
Mono.Dynamic.Interpreter
|
||||
|
||||
net_4_0_dirs := \
|
||||
System.Numerics \
|
||||
Microsoft.CSharp \
|
||||
@@ -229,12 +232,12 @@ xbuild_4_0_dirs := \
|
||||
Microsoft.Build
|
||||
|
||||
net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
|
||||
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
|
||||
monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs)
|
||||
monodroid_SUBDIRS := $(monodroid_dirs)
|
||||
monotouch_SUBDIRS := $(monotouch_dirs)
|
||||
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
|
||||
mobile_static_SUBDIRS := $(mobile_dirs)
|
||||
mobile_SUBDIRS := $(mobile_dirs)
|
||||
xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs)
|
||||
mobile_static_SUBDIRS := $(mobile_static_dirs)
|
||||
mobile_SUBDIRS := $(mobile_dynamic_dirs)
|
||||
xammac_SUBDIRS := $(xammac_dirs)
|
||||
net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
|
||||
net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
|
||||
net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
|
||||
@@ -242,7 +245,7 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
|
||||
|
||||
include ../build/rules.make
|
||||
|
||||
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
|
||||
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
|
||||
|
||||
DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs)
|
||||
|
||||
|
||||
@@ -3663,7 +3663,8 @@ namespace System.Windows.Forms
|
||||
if (View != View.Details) {
|
||||
if (bounds.Left < 0)
|
||||
h_scroll.Value += bounds.Left;
|
||||
else if (bounds.Right > view_rect.Right)
|
||||
// Don't shift right unless right-to-left layout is active. (Xamarin bug 22483)
|
||||
else if (this.RightToLeftLayout && bounds.Right > view_rect.Right)
|
||||
h_scroll.Value += (bounds.Right - view_rect.Right);
|
||||
}
|
||||
|
||||
|
||||
@@ -1018,13 +1018,27 @@ namespace Microsoft.Build.BuildEngine
|
||||
if (!StartHandlerHasExecuted)
|
||||
return;
|
||||
|
||||
if (EventArgs is ProjectStartedEventArgs)
|
||||
ConsoleLogger.ProjectFinishedHandler (Sender, finished_args as ProjectFinishedEventArgs);
|
||||
else if (EventArgs is TargetStartedEventArgs)
|
||||
ConsoleLogger.TargetFinishedHandler (Sender, finished_args as TargetFinishedEventArgs);
|
||||
else if (EventArgs is TaskStartedEventArgs)
|
||||
ConsoleLogger.TaskFinishedHandler (Sender, finished_args as TaskFinishedEventArgs);
|
||||
else if (!(EventArgs is BuildStartedEventArgs))
|
||||
if (EventArgs is ProjectStartedEventArgs) {
|
||||
var pfa = finished_args as ProjectFinishedEventArgs;
|
||||
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
|
||||
if (pfa == null)
|
||||
return;
|
||||
|
||||
ConsoleLogger.ProjectFinishedHandler (Sender, pfa);
|
||||
} else if (EventArgs is TargetStartedEventArgs) {
|
||||
var fa = finished_args as TargetFinishedEventArgs;
|
||||
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
|
||||
if (fa == null)
|
||||
return;
|
||||
|
||||
ConsoleLogger.TargetFinishedHandler (Sender, fa);
|
||||
} else if (EventArgs is TaskStartedEventArgs) {
|
||||
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
|
||||
if (!(finished_args is TaskFinishedEventArgs))
|
||||
return;
|
||||
|
||||
ConsoleLogger.TaskFinishedHandler (Sender, (TaskFinishedEventArgs) finished_args);
|
||||
} else if (!(EventArgs is BuildStartedEventArgs))
|
||||
throw new InvalidOperationException ("Unexpected event on the stack, type: " + EventArgs.GetType ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,8 +99,12 @@ namespace Microsoft.Build.BuildEngine {
|
||||
try {
|
||||
TaskExecutionMode taskExecutionMode;
|
||||
string reason;
|
||||
if (!BuildTargetNeeded (out reason)) {
|
||||
bool skip_completely;
|
||||
if (!BuildTargetNeeded (out reason, out skip_completely)) {
|
||||
LogTargetSkipped (target, reason);
|
||||
if (skip_completely)
|
||||
return true;
|
||||
|
||||
taskExecutionMode = TaskExecutionMode.SkipAndSetOutput;
|
||||
} else {
|
||||
taskExecutionMode = TaskExecutionMode.Complete;
|
||||
@@ -113,8 +117,27 @@ namespace Microsoft.Build.BuildEngine {
|
||||
//FIXME: parsing attributes repeatedly
|
||||
IBuildTask bt = target.BuildTasks [i];
|
||||
|
||||
// HACK: need some form of cross references checks
|
||||
var tem = taskExecutionMode;
|
||||
if (tem == TaskExecutionMode.SkipAndSetOutput) {
|
||||
var bti = bt as BuildTask;
|
||||
|
||||
//
|
||||
// BuildTargetNeeded checks only files timestamps but ignores any metadata dependencies
|
||||
// that way we can end up in the situation when output metadata are populated but from
|
||||
// incomplete dependencies.
|
||||
//
|
||||
// E.g.
|
||||
// <CreateItem Include="$(IntermediateOutputPath)%(_PngImage.LogicalName)" AdditionalMetadata="LogicalName=%(_PngImage.LogicalName)">
|
||||
// <Output TaskParameter="Include" />
|
||||
// </CreateItem>
|
||||
//
|
||||
if (bti != null && bti.Name == "CreateItem")
|
||||
tem = TaskExecutionMode.Complete;
|
||||
}
|
||||
|
||||
TaskBatchingImpl batchingImpl = new TaskBatchingImpl (project);
|
||||
bool task_result = batchingImpl.Build (bt, taskExecutionMode, out executeOnErrors);
|
||||
bool task_result = batchingImpl.Build (bt, tem, out executeOnErrors);
|
||||
if (task_result)
|
||||
continue;
|
||||
|
||||
@@ -149,15 +172,17 @@ namespace Microsoft.Build.BuildEngine {
|
||||
ParseAttribute (outputs);
|
||||
}
|
||||
|
||||
bool BuildTargetNeeded (out string reason)
|
||||
bool BuildTargetNeeded (out string reason, out bool skipCompletely)
|
||||
{
|
||||
reason = String.Empty;
|
||||
ITaskItem [] inputFiles;
|
||||
ITaskItem [] outputFiles;
|
||||
DateTime youngestInput, oldestOutput;
|
||||
skipCompletely = false;
|
||||
|
||||
if (String.IsNullOrEmpty (inputs.Trim ()))
|
||||
if (String.IsNullOrEmpty (inputs.Trim ())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty (outputs.Trim ())) {
|
||||
project.ParentEngine.LogError ("Target {0} has inputs but no outputs specified.", name);
|
||||
@@ -178,6 +203,7 @@ namespace Microsoft.Build.BuildEngine {
|
||||
}
|
||||
|
||||
if (inputFiles == null || inputFiles.Length == 0) {
|
||||
skipCompletely = true;
|
||||
reason = String.Format ("No input files were specified for target {0}, skipping.", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
//
|
||||
// ToolTask.cs: Base class for command line tool tasks.
|
||||
//
|
||||
// Author:
|
||||
// Authors:
|
||||
// Marek Sieradzki ([email protected])
|
||||
// Ankit Jain ([email protected])
|
||||
// Marek Safar ([email protected])
|
||||
//
|
||||
// (C) 2005 Marek Sieradzki
|
||||
// Copyright 2009 Novell, Inc (http://www.novell.com)
|
||||
// Copyright 2014 Xamarin Inc
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
@@ -90,12 +92,45 @@ namespace Microsoft.Build.Utilities
|
||||
return true;
|
||||
}
|
||||
|
||||
string CreateToolPath ()
|
||||
{
|
||||
string tp;
|
||||
if (string.IsNullOrEmpty (ToolPath)) {
|
||||
tp = GenerateFullPathToTool ();
|
||||
if (string.IsNullOrEmpty (tp))
|
||||
return null;
|
||||
|
||||
//
|
||||
// GenerateFullPathToTool can return path including tool name
|
||||
//
|
||||
if (string.IsNullOrEmpty (ToolExe))
|
||||
return tp;
|
||||
|
||||
tp = Path.GetDirectoryName (tp);
|
||||
} else {
|
||||
tp = ToolPath;
|
||||
}
|
||||
|
||||
var path = Path.Combine (tp, ToolExe);
|
||||
if (!File.Exists (path)) {
|
||||
if (Log != null)
|
||||
Log.LogError ("Tool executable '{0}' could not be found", path);
|
||||
return null;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public override bool Execute ()
|
||||
{
|
||||
if (SkipTaskExecution ())
|
||||
return true;
|
||||
|
||||
exitCode = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
|
||||
var tool_path = CreateToolPath ();
|
||||
if (tool_path == null)
|
||||
return false;
|
||||
|
||||
exitCode = ExecuteTool (tool_path, GenerateResponseFileCommands (),
|
||||
GenerateCommandLineCommands ());
|
||||
|
||||
// HandleTaskExecutionErrors is called only if exitCode != 0
|
||||
@@ -289,14 +324,14 @@ namespace Microsoft.Build.Utilities
|
||||
|
||||
protected virtual string GenerateCommandLineCommands ()
|
||||
{
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
|
||||
protected abstract string GenerateFullPathToTool ();
|
||||
|
||||
protected virtual string GenerateResponseFileCommands ()
|
||||
{
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
|
||||
protected virtual string GetResponseFileSwitch (string responseFilePath)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -424,6 +425,53 @@ namespace MonoTests.Microsoft.Build.Utilities {
|
||||
Assert.AreEqual (a.ToolPath, "Bar", "#5");
|
||||
a.ToolPath = "";
|
||||
Assert.AreEqual (a.ToolPath, "", "#6");
|
||||
|
||||
a.Execute ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Execute_1 ()
|
||||
{
|
||||
var t = new TestExecuteToolTask ();
|
||||
t.OnExecuteTool = delegate { Assert.Fail ("#1"); };
|
||||
t.BuildEngine = new MockBuildEngine ();
|
||||
Assert.IsFalse (t.Execute (), "result");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Execute_2 ()
|
||||
{
|
||||
var t = new TestExecuteToolTask ();
|
||||
t.BuildEngine = new MockBuildEngine ();
|
||||
t.ToolPath = Directory.GetCurrentDirectory ();
|
||||
t.ToolExe = "Makefile";
|
||||
|
||||
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
|
||||
Assert.AreEqual (Path.Combine (Directory.GetCurrentDirectory (), "Makefile"), pathToTool, "#1");
|
||||
Assert.AreEqual ("", responseFileCommands, "#2");
|
||||
Assert.AreEqual ("", commandLineCommands, "#3");
|
||||
|
||||
};
|
||||
|
||||
Assert.IsTrue (t.Execute (), "result");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Execute_3 ()
|
||||
{
|
||||
var t = new TestExecuteToolTask ();
|
||||
t.FullPathToTool = "fpt";
|
||||
t.BuildEngine = new MockBuildEngine ();
|
||||
t.ToolExe = "Makefile.mk";
|
||||
|
||||
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
|
||||
Assert.AreEqual ("Makefile.mk", pathToTool, "#1");
|
||||
Assert.AreEqual ("", responseFileCommands, "#2");
|
||||
Assert.AreEqual ("", commandLineCommands, "#3");
|
||||
|
||||
};
|
||||
|
||||
Assert.IsFalse (t.Execute (), "result");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,9 +596,86 @@ namespace MonoTests.Microsoft.Build.Utilities {
|
||||
}
|
||||
|
||||
protected override string GenerateFullPathToTool ()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class MockBuildEngine : IBuildEngine
|
||||
{
|
||||
public int ColumnNumberOfTaskNode {
|
||||
get {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContinueOnError {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int LineNumberOfTaskNode {
|
||||
get {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public string ProjectFileOfTaskNode {
|
||||
get {
|
||||
return "ProjectFileOfTaskNode";
|
||||
}
|
||||
}
|
||||
|
||||
public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void LogCustomEvent (CustomBuildEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public void LogErrorEvent (BuildErrorEventArgs e)
|
||||
{
|
||||
Console.WriteLine (e.Message);
|
||||
}
|
||||
|
||||
public void LogMessageEvent (BuildMessageEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public void LogWarningEvent (BuildWarningEventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class TestExecuteToolTask : ToolTask
|
||||
{
|
||||
public Action<string, string, string> OnExecuteTool;
|
||||
public string FullPathToTool;
|
||||
|
||||
protected override string ToolName {
|
||||
get { return "TestTool.exe"; }
|
||||
}
|
||||
|
||||
protected override bool CallHostObjectToExecute ()
|
||||
{
|
||||
return base.CallHostObjectToExecute ();
|
||||
}
|
||||
|
||||
protected override string GenerateFullPathToTool ()
|
||||
{
|
||||
return FullPathToTool;
|
||||
}
|
||||
|
||||
protected override int ExecuteTool (string pathToTool, string responseFileCommands, string commandLineCommands)
|
||||
{
|
||||
if (OnExecuteTool != null)
|
||||
OnExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ LIBRARY = Mono.CSharp.dll
|
||||
|
||||
LIB_MCS_FLAGS = -r:System.Core.dll -r:System.Xml.dll -r:System.dll
|
||||
|
||||
ifeq (monotouch, $(PROFILE))
|
||||
MOBILE_STATIC := $(filter mobile_static monotouch, $(PROFILE))
|
||||
|
||||
ifdef MOBILE_STATIC
|
||||
LIB_MCS_FLAGS += -d:IOS_REFLECTION
|
||||
endif
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#include Mono.CSharp.dll.sources
|
||||
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
|
||||
../corlib/System.Reflection.Emit/FlowControl.cs
|
||||
../corlib/System.Reflection.Emit/OpCode.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeNames.cs
|
||||
../corlib/System.Reflection.Emit/OpCodes.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeType.cs
|
||||
../corlib/System.Reflection.Emit/OperandType.cs
|
||||
../corlib/System.Reflection.Emit/PEFileKinds.cs
|
||||
../corlib/System.Reflection.Emit/Label.cs
|
||||
../corlib/System.Reflection.Emit/MethodToken.cs
|
||||
../corlib/System.Reflection.Emit/StackBehaviour.cs
|
||||
monotouch.cs
|
||||
@@ -1,13 +1,2 @@
|
||||
#include Mono.CSharp.dll.sources
|
||||
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
|
||||
../corlib/System.Reflection.Emit/FlowControl.cs
|
||||
../corlib/System.Reflection.Emit/OpCode.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeNames.cs
|
||||
../corlib/System.Reflection.Emit/OpCodes.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeType.cs
|
||||
../corlib/System.Reflection.Emit/OperandType.cs
|
||||
../corlib/System.Reflection.Emit/PEFileKinds.cs
|
||||
../corlib/System.Reflection.Emit/Label.cs
|
||||
../corlib/System.Reflection.Emit/MethodToken.cs
|
||||
../corlib/System.Reflection.Emit/StackBehaviour.cs
|
||||
monotouch.cs
|
||||
#include mobile_static_Mono.CSharp.dll.sources
|
||||
monotouch.cs
|
||||
@@ -27,11 +27,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace bug4786test
|
||||
namespace MonoTests.Mono.Data.Tds
|
||||
{
|
||||
|
||||
using NUnit.Framework;
|
||||
using Mono.Data.Tds.Protocol;
|
||||
using global::Mono.Data.Tds.Protocol;
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
@@ -9,7 +9,9 @@ LIB_MCS_FLAGS = -r:System.dll -r:System.Core.dll \
|
||||
-d:MONO_INTERPRETER \
|
||||
-delaysign -keyfile:../mono.pub
|
||||
|
||||
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
|
||||
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
|
||||
|
||||
ifdef MOBILE_STATIC
|
||||
mono_dynamic_interpreter_deps = $(the_libdir_base)plaincore/System.Core.dll
|
||||
LIB_MCS_FLAGS += -lib:$(the_libdir_base)plaincore
|
||||
endif
|
||||
@@ -21,4 +23,4 @@ $(the_libdir_base)Mono.Dynamic.Interpreter.dll: $(mono_dynamic_interpreter_deps)
|
||||
$(the_libdir_base)plaincore/System.Core.dll:
|
||||
(cd ../System.Core; $(MAKE) $@)
|
||||
|
||||
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
|
||||
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
|
||||
@@ -39,7 +39,7 @@ using NUnit.Framework;
|
||||
#if NDESK_OPTIONS
|
||||
namespace Tests.NDesk.Options
|
||||
#else
|
||||
namespace Tests.Mono.Options
|
||||
namespace MonoTests.Mono.Options
|
||||
#endif
|
||||
{
|
||||
[TestFixture]
|
||||
|
||||
@@ -46,7 +46,7 @@ using NUnit.Framework;
|
||||
#if NDESK_OPTIONS
|
||||
namespace Tests.NDesk.Options
|
||||
#else
|
||||
namespace Tests.Mono.Options
|
||||
namespace MonoTests.Mono.Options
|
||||
#endif
|
||||
{
|
||||
class FooConverter : TypeConverter {
|
||||
|
||||
@@ -39,7 +39,7 @@ using NUnit.Framework;
|
||||
#if NDESK_OPTIONS
|
||||
namespace Tests.NDesk.Options
|
||||
#else
|
||||
namespace Tests.Mono.Options
|
||||
namespace MonoTests.Mono.Options
|
||||
#endif
|
||||
{
|
||||
class DefaultOption : Option {
|
||||
|
||||
@@ -31,7 +31,7 @@ using System;
|
||||
#if NDESK_OPTIONS
|
||||
namespace Tests.NDesk.Options
|
||||
#else
|
||||
namespace Tests.Mono.Options
|
||||
namespace MonoTests.Mono.Options
|
||||
#endif
|
||||
{
|
||||
static class Utils {
|
||||
|
||||
@@ -236,8 +236,13 @@ namespace Mono.Security.X509 {
|
||||
cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
|
||||
KeyPairPersistence kpp = new KeyPairPersistence (cspParams);
|
||||
|
||||
if (!kpp.Load ())
|
||||
try {
|
||||
if (!kpp.Load ())
|
||||
return cert;
|
||||
}
|
||||
catch {
|
||||
return cert;
|
||||
}
|
||||
|
||||
if (cert.RSA != null)
|
||||
cert.RSA = new RSACryptoServiceProvider (cspParams);
|
||||
|
||||
@@ -12,7 +12,7 @@ CLEAN_FILES += $(STRING_MESSAGES)
|
||||
EXTRA_DISTFILES = \
|
||||
src/ComponentModel/Strings.resx
|
||||
|
||||
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
|
||||
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.ComponentModel.Composition.dll
|
||||
NO_INSTALL = yes
|
||||
|
||||
@@ -18,7 +18,7 @@ endif
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
# This is a .NET 3.5+ assembly
|
||||
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
|
||||
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.ComponentModel.DataAnnotations.dll
|
||||
NO_INSTALL = yes
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
#include net_4_5_System.ComponentModel.DataAnnotations.dll.sources
|
||||
@@ -10,17 +10,16 @@ ifneq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
|
||||
endif
|
||||
|
||||
ifeq (monodroid, $(PROFILE))
|
||||
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT,ANDROID
|
||||
endif
|
||||
MOBILE_DYNAMIC := $(filter monodroid xammac mobile, $(PROFILE))
|
||||
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
|
||||
|
||||
ifeq (xammac, $(PROFILE))
|
||||
ifdef MOBILE_DYNAMIC
|
||||
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT
|
||||
endif
|
||||
|
||||
system_core_plain_libdir = $(the_libdir_base)plaincore
|
||||
|
||||
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
|
||||
ifdef MOBILE_STATIC
|
||||
extra_test_flags := -exclude:NotWorkingInterpreter
|
||||
system_core_library_deps = $(the_libdir_base)Mono.Dynamic.Interpreter.dll $(system_core_plain_libdir)/System.Core.dll
|
||||
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR
|
||||
@@ -72,4 +71,4 @@ ifneq ($(PROFILE),basic)
|
||||
csproj-local:
|
||||
$(MAKE) csproj-local intermediate=plaincore/
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -64,12 +64,15 @@ namespace System {
|
||||
[DllImport ("__Internal")]
|
||||
extern static IntPtr monotouch_timezone_get_data (string name, ref int size);
|
||||
|
||||
static Stream GetMonoTouchData (string name)
|
||||
static Stream GetMonoTouchData (string name, bool throw_on_error = true)
|
||||
{
|
||||
int size = 0;
|
||||
IntPtr data = monotouch_timezone_get_data (name, ref size);
|
||||
if (size <= 0)
|
||||
throw new TimeZoneNotFoundException ();
|
||||
if (size <= 0) {
|
||||
if (throw_on_error)
|
||||
throw new TimeZoneNotFoundException ();
|
||||
return null;
|
||||
}
|
||||
|
||||
unsafe {
|
||||
var s = new UnmanagedMemoryStream ((byte*) data, size);
|
||||
|
||||
@@ -651,7 +651,9 @@ namespace System
|
||||
#elif MONOTOUCH
|
||||
if (systemTimeZones.Count == 0) {
|
||||
foreach (string name in GetMonoTouchNames ()) {
|
||||
using (Stream stream = GetMonoTouchData (name)) {
|
||||
using (Stream stream = GetMonoTouchData (name, false)) {
|
||||
if (stream == null)
|
||||
continue;
|
||||
systemTimeZones.Add (BuildFromStream (name, stream));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,109 +1,4 @@
|
||||
Assembly/AssemblyInfo.cs
|
||||
System/Actions.cs
|
||||
System/Funcs.cs
|
||||
System/InvalidTimeZoneException.cs
|
||||
System/TimeZoneInfo.AdjustmentRule.cs
|
||||
System/TimeZoneInfo.cs
|
||||
System/TimeZoneInfo.Serialization.cs
|
||||
System/TimeZoneInfo.TransitionTime.cs
|
||||
System/TimeZoneNotFoundException.cs
|
||||
System/Util.cs
|
||||
System.Runtime.CompilerServices/DynamicAttribute.cs
|
||||
System.Runtime.CompilerServices/ExecutionScope.cs
|
||||
System.Runtime.CompilerServices/ExtensionAttribute.cs
|
||||
System.Runtime.CompilerServices/IStrongBox.cs
|
||||
System.Runtime.CompilerServices/StrongBox_T.cs
|
||||
System.Linq/Check.cs
|
||||
System.Linq/Enumerable.cs
|
||||
System.Linq/QueryableEnumerable.cs
|
||||
System.Linq/QueryableTransformer.cs
|
||||
System.Linq/Grouping.cs
|
||||
System.Linq/IGrouping.cs
|
||||
System.Linq/IOrderedQueryable.cs
|
||||
System.Linq/IOrderedQueryable_T.cs
|
||||
System.Linq/IOrderedEnumerable_T.cs
|
||||
System.Linq/IQueryable.cs
|
||||
System.Linq/IQueryable_T.cs
|
||||
System.Linq/Lookup.cs
|
||||
System.Linq/ILookup_T.cs
|
||||
System.Linq/OrderedEnumerable.cs
|
||||
System.Linq/OrderedSequence.cs
|
||||
System.Linq/Queryable.cs
|
||||
System.Linq/QuickSort.cs
|
||||
System.Linq/SortContext.cs
|
||||
System.Linq/SortDirection.cs
|
||||
System.Linq/SortSequenceContext.cs
|
||||
System.Linq/IQueryProvider.cs
|
||||
System.Collections.Generic/HashSet.cs
|
||||
System.Security.Cryptography/Aes.cs
|
||||
System.Threading/LockRecursionPolicy.cs
|
||||
System.Threading/ReaderWriterLockSlim.cs
|
||||
System.Threading/ThreadLockState.cs
|
||||
System.Threading/ReaderWriterLockSlimExtensions.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
|
||||
System.Linq.Parallel.QueryNodes/SetInclusion.cs
|
||||
System.Linq.Parallel.QueryNodes/WrapHelper.cs
|
||||
System.Linq.Parallel/AggregationList.cs
|
||||
System.Linq.Parallel/ConcurrentGrouping.cs
|
||||
System.Linq.Parallel/ConcurrentLookup.cs
|
||||
System.Linq.Parallel/INodeVisitor.cs
|
||||
System.Linq.Parallel/IVisitableNode.cs
|
||||
System.Linq.Parallel/OrderingEnumerator.cs
|
||||
System.Linq.Parallel/ParallelExecuter.cs
|
||||
System.Linq.Parallel/ParallelPartitioner.cs
|
||||
System.Linq.Parallel/ParallelQueryEnumerator.cs
|
||||
System.Linq.Parallel/ParallelQuickSort.cs
|
||||
System.Linq.Parallel/QueryCheckerVisitor.cs
|
||||
System.Linq.Parallel/QueryIsOrderedVisitor.cs
|
||||
System.Linq.Parallel/QueryOptions.cs
|
||||
System.Linq.Parallel/RangeList.cs
|
||||
System.Linq.Parallel/RepeatList.cs
|
||||
System.Linq.Parallel/ReverseList.cs
|
||||
System.Linq.Parallel/StripPartitioner.cs
|
||||
System.Linq.Parallel/TemporaryArea.cs
|
||||
System.Linq/EnumerableExecutor.cs
|
||||
System.Linq/EnumerableExecutor_T.cs
|
||||
System.Linq/EnumerableQuery.cs
|
||||
System.Linq/EnumerableQuery_T.cs
|
||||
System.Linq/OrderedParallelQuery.cs
|
||||
System.Linq/ParallelEnumerable.cs
|
||||
System.Linq/ParallelExecutionMode.cs
|
||||
System.Linq/ParallelMergeOptions.cs
|
||||
System.Linq/ParallelQuery.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
|
||||
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
|
||||
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
|
||||
System.IO/HandleInheritability.cs
|
||||
System.Threading.Tasks/TaskExtensions.cs
|
||||
System.Linq.Expressions/Extensions.cs
|
||||
System.Linq.Expressions/ExpressionTransformer.cs
|
||||
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
|
||||
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
|
||||
System.Linq.Expressions/DynamicExpressionVisitor.cs
|
||||
#include mobile_common_System.Core.dll.sources
|
||||
|
||||
#include dynamic_System.Core.dll.sources
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
Assembly/AssemblyInfo.cs
|
||||
System/Actions.cs
|
||||
System/Funcs.cs
|
||||
System/InvalidTimeZoneException.cs
|
||||
System/TimeZoneInfo.AdjustmentRule.cs
|
||||
System/TimeZoneInfo.cs
|
||||
System/TimeZoneInfo.Serialization.cs
|
||||
System/TimeZoneInfo.TransitionTime.cs
|
||||
System/TimeZoneNotFoundException.cs
|
||||
System/Util.cs
|
||||
System.Runtime.CompilerServices/DynamicAttribute.cs
|
||||
System.Runtime.CompilerServices/ExecutionScope.cs
|
||||
System.Runtime.CompilerServices/ExtensionAttribute.cs
|
||||
System.Runtime.CompilerServices/IStrongBox.cs
|
||||
System.Runtime.CompilerServices/StrongBox_T.cs
|
||||
System.Linq/Check.cs
|
||||
System.Linq/Enumerable.cs
|
||||
System.Linq/QueryableEnumerable.cs
|
||||
System.Linq/QueryableTransformer.cs
|
||||
System.Linq/Grouping.cs
|
||||
System.Linq/IGrouping.cs
|
||||
System.Linq/IOrderedQueryable.cs
|
||||
System.Linq/IOrderedQueryable_T.cs
|
||||
System.Linq/IOrderedEnumerable_T.cs
|
||||
System.Linq/IQueryable.cs
|
||||
System.Linq/IQueryable_T.cs
|
||||
System.Linq/Lookup.cs
|
||||
System.Linq/ILookup_T.cs
|
||||
System.Linq/OrderedEnumerable.cs
|
||||
System.Linq/OrderedSequence.cs
|
||||
System.Linq/Queryable.cs
|
||||
System.Linq/QuickSort.cs
|
||||
System.Linq/SortContext.cs
|
||||
System.Linq/SortDirection.cs
|
||||
System.Linq/SortSequenceContext.cs
|
||||
System.Linq/IQueryProvider.cs
|
||||
System.Collections.Generic/HashSet.cs
|
||||
System.Security.Cryptography/Aes.cs
|
||||
System.Threading/LockRecursionPolicy.cs
|
||||
System.Threading/ReaderWriterLockSlim.cs
|
||||
System.Threading/ThreadLockState.cs
|
||||
System.Threading/ReaderWriterLockSlimExtensions.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
|
||||
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
|
||||
System.Linq.Parallel.QueryNodes/SetInclusion.cs
|
||||
System.Linq.Parallel.QueryNodes/WrapHelper.cs
|
||||
System.Linq.Parallel/AggregationList.cs
|
||||
System.Linq.Parallel/ConcurrentGrouping.cs
|
||||
System.Linq.Parallel/ConcurrentLookup.cs
|
||||
System.Linq.Parallel/INodeVisitor.cs
|
||||
System.Linq.Parallel/IVisitableNode.cs
|
||||
System.Linq.Parallel/OrderingEnumerator.cs
|
||||
System.Linq.Parallel/ParallelExecuter.cs
|
||||
System.Linq.Parallel/ParallelPartitioner.cs
|
||||
System.Linq.Parallel/ParallelQueryEnumerator.cs
|
||||
System.Linq.Parallel/ParallelQuickSort.cs
|
||||
System.Linq.Parallel/QueryCheckerVisitor.cs
|
||||
System.Linq.Parallel/QueryIsOrderedVisitor.cs
|
||||
System.Linq.Parallel/QueryOptions.cs
|
||||
System.Linq.Parallel/RangeList.cs
|
||||
System.Linq.Parallel/RepeatList.cs
|
||||
System.Linq.Parallel/ReverseList.cs
|
||||
System.Linq.Parallel/StripPartitioner.cs
|
||||
System.Linq.Parallel/TemporaryArea.cs
|
||||
System.Linq/EnumerableExecutor.cs
|
||||
System.Linq/EnumerableExecutor_T.cs
|
||||
System.Linq/EnumerableQuery.cs
|
||||
System.Linq/EnumerableQuery_T.cs
|
||||
System.Linq/OrderedParallelQuery.cs
|
||||
System.Linq/ParallelEnumerable.cs
|
||||
System.Linq/ParallelExecutionMode.cs
|
||||
System.Linq/ParallelMergeOptions.cs
|
||||
System.Linq/ParallelQuery.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
|
||||
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
|
||||
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
|
||||
System.IO/HandleInheritability.cs
|
||||
System.Threading.Tasks/TaskExtensions.cs
|
||||
System.Linq.Expressions/Extensions.cs
|
||||
System.Linq.Expressions/ExpressionTransformer.cs
|
||||
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
|
||||
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
|
||||
System.Linq.Expressions/DynamicExpressionVisitor.cs
|
||||
@@ -0,0 +1,2 @@
|
||||
#include mobile_common_System.Core.dll.sources
|
||||
#include interpreter_System.Core.dll.sources
|
||||
@@ -1,4 +1,4 @@
|
||||
#include mobile_System.Core.dll.sources
|
||||
#include mobile_common_System.Core.dll.sources
|
||||
|
||||
#include dynamic_System.Core.dll.sources
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#include mobile_System.Core.dll.sources
|
||||
#include mobile_common_System.Core.dll.sources
|
||||
#include interpreter_System.Core.dll.sources
|
||||
System/TimeZoneInfo.MonoTouch.cs
|
||||
@@ -1,4 +1,4 @@
|
||||
#include mobile_System.Core.dll.sources
|
||||
#include mobile_common_System.Core.dll.sources
|
||||
|
||||
#include dynamic_System.Core.dll.sources
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -111,7 +111,7 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -127,7 +127,7 @@ namespace System.Data.OracleClient.Oci
|
||||
byte[] valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -142,7 +142,7 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -157,7 +157,7 @@ namespace System.Data.OracleClient.Oci
|
||||
byte[] valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -172,7 +172,7 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -193,8 +193,8 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
|
||||
ref short indp,
|
||||
ref short rlenp,
|
||||
IntPtr indp,
|
||||
IntPtr rlenp,
|
||||
IntPtr rcodep,
|
||||
uint mode);
|
||||
|
||||
@@ -206,8 +206,8 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
|
||||
ref short indp,
|
||||
ref short rlenp,
|
||||
IntPtr indp,
|
||||
IntPtr rlenp,
|
||||
IntPtr rcodep,
|
||||
uint mode);
|
||||
|
||||
@@ -547,7 +547,7 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -558,7 +558,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByName (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
internal static int OCIBindByNameRef (IntPtr stmtp,
|
||||
@@ -569,7 +569,7 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -580,7 +580,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByNameRef (stmtp, out bindpp, errhp, placeholder, placeh_len, ref valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
internal static int OCIBindByNameBytes (IntPtr stmtp,
|
||||
@@ -591,7 +591,7 @@ namespace System.Data.OracleClient.Oci
|
||||
byte[] valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -602,7 +602,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByNameBytes (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
internal static int OCIBindByPos (IntPtr stmtp,
|
||||
@@ -612,7 +612,7 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -623,7 +623,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByPos (stmtp, out bindpp, errhp, position, valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
internal static int OCIBindByPosRef (IntPtr stmtp,
|
||||
@@ -633,7 +633,7 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -644,7 +644,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByPosRef (stmtp, out bindpp, errhp, position, ref valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
internal static int OCIBindByPosBytes (IntPtr stmtp,
|
||||
@@ -654,7 +654,7 @@ namespace System.Data.OracleClient.Oci
|
||||
byte[] valuep,
|
||||
int value_sz,
|
||||
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
|
||||
ref short indp,
|
||||
IntPtr indp,
|
||||
IntPtr alenp,
|
||||
IntPtr rcodep,
|
||||
uint maxarr_len,
|
||||
@@ -665,7 +665,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIBindByPosBytes (stmtp, out bindpp, errhp, position, valuep,
|
||||
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
|
||||
}
|
||||
|
||||
[DllImport ("oci")]
|
||||
@@ -723,8 +723,8 @@ namespace System.Data.OracleClient.Oci
|
||||
IntPtr valuep,
|
||||
int value_sz,
|
||||
OciDataType dty,
|
||||
ref short indp,
|
||||
ref short rlenp,
|
||||
IntPtr indp,
|
||||
IntPtr rlenp,
|
||||
IntPtr rcodep,
|
||||
uint mode)
|
||||
{
|
||||
@@ -732,7 +732,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIDefineByPos", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIDefineByPos (stmtp, out defnpp, errhp, position, valuep,
|
||||
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
|
||||
value_sz, dty, indp, rlenp, rcodep, mode);
|
||||
}
|
||||
|
||||
internal static int OCIDefineByPosPtr (IntPtr stmtp,
|
||||
@@ -742,8 +742,8 @@ namespace System.Data.OracleClient.Oci
|
||||
ref IntPtr valuep,
|
||||
int value_sz,
|
||||
OciDataType dty,
|
||||
ref short indp,
|
||||
ref short rlenp,
|
||||
IntPtr indp,
|
||||
IntPtr rlenp,
|
||||
IntPtr rcodep,
|
||||
uint mode)
|
||||
{
|
||||
@@ -751,7 +751,7 @@ namespace System.Data.OracleClient.Oci
|
||||
Trace.WriteLineIf(traceOci, "OCIDefineByPosPtr", "OCI");
|
||||
#endif
|
||||
return OciNativeCalls.OCIDefineByPosPtr (stmtp, out defnpp, errhp, position, ref valuep,
|
||||
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
|
||||
value_sz, dty, indp, rlenp, rcodep, mode);
|
||||
}
|
||||
|
||||
internal static int OCIDescriptorFree (IntPtr hndlp,
|
||||
|
||||
+36
-26
@@ -32,16 +32,16 @@ namespace System.Data.OracleClient.Oci
|
||||
|
||||
//IntPtr handle;
|
||||
IntPtr value;
|
||||
short indicator;
|
||||
IntPtr indicator;
|
||||
//OracleType type;
|
||||
OciDataType ociType;
|
||||
OciDataType definedType;
|
||||
int definedSize;
|
||||
short rlenp = 0;
|
||||
IntPtr rlenp;
|
||||
//short precision;
|
||||
short scale;
|
||||
Type fieldType;
|
||||
//string name;
|
||||
string name;
|
||||
|
||||
// Oracle defines the LONG VARCHAR and LONG VARRAW to have a size of 2 to the 31 power - 5
|
||||
// see DefineLongVarChar and DefineLongVarRaw
|
||||
@@ -70,11 +70,13 @@ namespace System.Data.OracleClient.Oci
|
||||
{
|
||||
OciParameterDescriptor parameter = ((OciStatementHandle) Parent).GetParameter (position);
|
||||
|
||||
//name = parameter.GetName ();
|
||||
name = parameter.GetName ();
|
||||
definedType = parameter.GetDataType ();
|
||||
definedSize = parameter.GetDataSize ();
|
||||
//precision = parameter.GetPrecision ();
|
||||
scale = parameter.GetScale ();
|
||||
rlenp = OciCalls.AllocateClear (sizeof(short));
|
||||
indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
|
||||
Define (position, connection);
|
||||
|
||||
@@ -103,7 +105,7 @@ namespace System.Data.OracleClient.Oci
|
||||
}
|
||||
|
||||
internal bool IsNull {
|
||||
get { return (indicator == -1); }
|
||||
get { return (Indicator == -1); }
|
||||
}
|
||||
|
||||
internal short Scale {
|
||||
@@ -111,7 +113,13 @@ namespace System.Data.OracleClient.Oci
|
||||
}
|
||||
|
||||
internal short Size {
|
||||
get { return rlenp; }
|
||||
get { return(Marshal.ReadInt16(rlenp)); }
|
||||
set { Marshal.WriteInt16(rlenp, value); }
|
||||
}
|
||||
|
||||
internal short Indicator {
|
||||
get { return(Marshal.ReadInt16(indicator)); }
|
||||
set { Marshal.WriteInt16(indicator, value); }
|
||||
}
|
||||
|
||||
internal IntPtr Value {
|
||||
@@ -192,8 +200,8 @@ namespace System.Data.OracleClient.Oci
|
||||
ref value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
|
||||
@@ -222,8 +230,8 @@ namespace System.Data.OracleClient.Oci
|
||||
value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
|
||||
@@ -261,11 +269,11 @@ namespace System.Data.OracleClient.Oci
|
||||
value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero, 0);
|
||||
|
||||
rlenp = (short) definedSize;
|
||||
Size = (short) definedSize;
|
||||
|
||||
if (status != 0) {
|
||||
OciErrorInfo info = ErrorHandle.HandleError ();
|
||||
@@ -291,8 +299,8 @@ namespace System.Data.OracleClient.Oci
|
||||
value,
|
||||
maxByteCount,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
OciErrorHandle.ThrowExceptionIfError (ErrorHandle, status);
|
||||
@@ -312,10 +320,10 @@ namespace System.Data.OracleClient.Oci
|
||||
ErrorHandle,
|
||||
position + 1,
|
||||
value,
|
||||
definedSize * 2,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
|
||||
@@ -357,8 +365,8 @@ namespace System.Data.OracleClient.Oci
|
||||
ref value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
|
||||
@@ -386,8 +394,8 @@ namespace System.Data.OracleClient.Oci
|
||||
value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero, 0);
|
||||
|
||||
if (status != 0) {
|
||||
@@ -415,8 +423,8 @@ namespace System.Data.OracleClient.Oci
|
||||
value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero, 0);
|
||||
|
||||
if (status != 0) {
|
||||
@@ -459,8 +467,8 @@ namespace System.Data.OracleClient.Oci
|
||||
ref value,
|
||||
definedSize,
|
||||
ociType,
|
||||
ref indicator,
|
||||
ref rlenp,
|
||||
indicator,
|
||||
rlenp,
|
||||
IntPtr.Zero,
|
||||
0);
|
||||
|
||||
@@ -487,6 +495,8 @@ namespace System.Data.OracleClient.Oci
|
||||
}
|
||||
disposed = true;
|
||||
} finally {
|
||||
Marshal.FreeHGlobal (indicator);
|
||||
Marshal.FreeHGlobal (rlenp);
|
||||
base.Dispose (disposing);
|
||||
value = IntPtr.Zero;
|
||||
}
|
||||
|
||||
@@ -37,12 +37,13 @@ using System.Text;
|
||||
namespace System.Data.OracleClient
|
||||
{
|
||||
[TypeConverter (typeof(OracleParameter.OracleParameterConverter))]
|
||||
public sealed class OracleParameter :
|
||||
public sealed class OracleParameter :
|
||||
#if NET_2_0
|
||||
DbParameter, IDbDataParameter, ICloneable
|
||||
DbParameter, IDbDataParameter, ICloneable,
|
||||
#else
|
||||
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
|
||||
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable,
|
||||
#endif
|
||||
IDisposable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
@@ -66,6 +67,7 @@ namespace System.Data.OracleClient
|
||||
object value = DBNull.Value;
|
||||
OciLobLocator lobLocator; // only if Blob or Clob
|
||||
IntPtr bindOutValue = IntPtr.Zero;
|
||||
IntPtr indicator = IntPtr.Zero;
|
||||
OciDateTimeDescriptor dateTimeDesc;
|
||||
IntPtr cursor = IntPtr.Zero;
|
||||
|
||||
@@ -77,7 +79,6 @@ namespace System.Data.OracleClient
|
||||
bool useRef;
|
||||
OciDataType bindType;
|
||||
|
||||
short indicator;
|
||||
int bindSize;
|
||||
bool sizeManuallySet;
|
||||
|
||||
@@ -104,6 +105,7 @@ namespace System.Data.OracleClient
|
||||
this.value = value.value;
|
||||
this.lobLocator = value.lobLocator;
|
||||
this.oracleTypeSet = value.oracleTypeSet;
|
||||
this.indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
}
|
||||
|
||||
public OracleParameter ()
|
||||
@@ -119,6 +121,7 @@ namespace System.Data.OracleClient
|
||||
this.srcVersion = DataRowVersion.Current;
|
||||
this.value = null;
|
||||
this.oracleTypeSet = false;
|
||||
this.indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
}
|
||||
|
||||
public OracleParameter (string name, object value)
|
||||
@@ -129,6 +132,7 @@ namespace System.Data.OracleClient
|
||||
srcColumn = string.Empty;
|
||||
SourceVersion = DataRowVersion.Current;
|
||||
InferOracleType (value);
|
||||
this.indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
#if NET_2_0
|
||||
// Find the OciType before inferring for the size
|
||||
if (value != null && value != DBNull.Value) {
|
||||
@@ -173,6 +177,7 @@ namespace System.Data.OracleClient
|
||||
OracleType = oracleType;
|
||||
SourceColumn = sourceColumn;
|
||||
SourceVersion = sourceVersion;
|
||||
this.indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -199,6 +204,12 @@ namespace System.Data.OracleClient
|
||||
OracleType = oracleType;
|
||||
SourceColumn = srcColumn;
|
||||
SourceVersion = srcVersion;
|
||||
this.indicator = OciCalls.AllocateClear (sizeof(short));
|
||||
}
|
||||
|
||||
~OracleParameter ()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
#endregion // Constructors
|
||||
@@ -210,6 +221,11 @@ namespace System.Data.OracleClient
|
||||
set { container = value; }
|
||||
}
|
||||
|
||||
internal short Indicator {
|
||||
get { return (Marshal.ReadInt16(indicator)); }
|
||||
set { Marshal.WriteInt16(indicator, value); }
|
||||
}
|
||||
|
||||
#if !NET_2_0
|
||||
[Browsable (false)]
|
||||
[RefreshProperties (RefreshProperties.All)]
|
||||
@@ -453,7 +469,6 @@ namespace System.Data.OracleClient
|
||||
}
|
||||
|
||||
if (isnull == true && direction == ParameterDirection.Input) {
|
||||
indicator = 0;
|
||||
bindType = OciDataType.VarChar2;
|
||||
bindSize = 0;
|
||||
} else {
|
||||
@@ -465,7 +480,6 @@ namespace System.Data.OracleClient
|
||||
case OciDataType.CharZ:
|
||||
case OciDataType.OciString:
|
||||
bindType = OciDataType.String;
|
||||
indicator = 0;
|
||||
svalue = "\0";
|
||||
// convert value from managed type to type to marshal
|
||||
if (direction == ParameterDirection.Input ||
|
||||
@@ -558,7 +572,7 @@ namespace System.Data.OracleClient
|
||||
dt = DateTime.MinValue;
|
||||
sDate = "";
|
||||
if (isnull)
|
||||
indicator = -1;
|
||||
Indicator = -1;
|
||||
else if (v is String) {
|
||||
sDate = (string) v;
|
||||
dt = DateTime.Parse (sDate);
|
||||
@@ -594,7 +608,7 @@ namespace System.Data.OracleClient
|
||||
case OciDataType.Float:
|
||||
case OciDataType.Number:
|
||||
bindType = OciDataType.String;
|
||||
indicator = 0;
|
||||
Indicator = 0;
|
||||
svalue = "\0";
|
||||
// convert value from managed type to type to marshal
|
||||
if (direction == ParameterDirection.Input ||
|
||||
@@ -638,7 +652,7 @@ namespace System.Data.OracleClient
|
||||
|
||||
bindSize = Size + 5; // 4 bytes prepended for length, bytes, 1 byte NUL character
|
||||
|
||||
indicator = 0;
|
||||
Indicator = 0;
|
||||
svalue = "\0";
|
||||
// convert value from managed type to type to marshal
|
||||
if (direction == ParameterDirection.Input ||
|
||||
@@ -758,7 +772,7 @@ namespace System.Data.OracleClient
|
||||
case OciDataType.VarRaw:
|
||||
bindType = OciDataType.VarRaw;
|
||||
bindSize = Size + 2; // include 2 bytes prepended to hold the length
|
||||
indicator = 0;
|
||||
Indicator = 0;
|
||||
bytes = new byte [bindSize];
|
||||
if (direction == ParameterDirection.Input ||
|
||||
direction == ParameterDirection.InputOutput) {
|
||||
@@ -784,7 +798,7 @@ namespace System.Data.OracleClient
|
||||
case OciDataType.LongVarRaw:
|
||||
bindType = OciDataType.LongVarRaw;
|
||||
bindSize = Size + 4; // include 4 bytes prepended to hold the length
|
||||
indicator = 0;
|
||||
Indicator = 0;
|
||||
bytes = new byte [bindSize];
|
||||
if (direction == ParameterDirection.Input ||
|
||||
direction == ParameterDirection.InputOutput) {
|
||||
@@ -854,7 +868,7 @@ namespace System.Data.OracleClient
|
||||
ref bindValue,
|
||||
bindSize,
|
||||
bindType,
|
||||
ref indicator,
|
||||
indicator,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
@@ -870,7 +884,7 @@ namespace System.Data.OracleClient
|
||||
ref bindValue,
|
||||
bindSize,
|
||||
bindType,
|
||||
ref indicator,
|
||||
indicator,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
@@ -887,7 +901,7 @@ namespace System.Data.OracleClient
|
||||
ref cursor,
|
||||
bindSize,
|
||||
bindType,
|
||||
ref indicator,
|
||||
indicator,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
@@ -903,7 +917,7 @@ namespace System.Data.OracleClient
|
||||
bytes,
|
||||
bindSize,
|
||||
bindType,
|
||||
ref indicator,
|
||||
indicator,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
@@ -919,7 +933,7 @@ namespace System.Data.OracleClient
|
||||
bindValue,
|
||||
bindSize,
|
||||
bindType,
|
||||
ref indicator,
|
||||
indicator,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
0,
|
||||
@@ -1251,7 +1265,7 @@ namespace System.Data.OracleClient
|
||||
// used to update the parameter value
|
||||
// for Output, the output of InputOutput, and Return parameters
|
||||
value = DBNull.Value;
|
||||
if (indicator == -1)
|
||||
if (Indicator == -1)
|
||||
return;
|
||||
|
||||
int rsize = 0;
|
||||
@@ -1453,6 +1467,22 @@ namespace System.Data.OracleClient
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
}
|
||||
|
||||
void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
if (indicator != IntPtr.Zero) {
|
||||
Marshal.FreeHGlobal (indicator);
|
||||
indicator = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
|
||||
internal sealed class OracleParameterConverter : ExpandableObjectConverter
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
#include System.Data.Services.Client.dll.sources
|
||||
./Client/AssemblyAttributes.cs
|
||||
#include net_4_5_System.Data.Services.Client.dll.sources
|
||||
@@ -26,9 +26,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class ChangeInterceptorAttributeTests {
|
||||
[Test]
|
||||
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.AreEqual ("setName", ci.EntitySetName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class DataServiceExceptionTests {
|
||||
[Test]
|
||||
@@ -68,4 +70,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.AreEqual (inner, ex.InnerException);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class DataServiceTests {
|
||||
[Test]
|
||||
@@ -79,4 +81,4 @@ namespace System.Data.Services.Tests {
|
||||
this.OnStartProcessingRequest (args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,12 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class ETagAttributeTests {
|
||||
[Test]
|
||||
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.AreEqual ("bar", e.PropertyNames[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Data.Services;
|
||||
using System.Linq.Expressions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class ExpandSegmentCollectionTests {
|
||||
[Test]
|
||||
@@ -101,4 +102,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.IsFalse (esc.HasFilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,12 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using System.Linq.Expressions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class ExpandSegmentTests {
|
||||
[Test]
|
||||
@@ -84,4 +86,4 @@ namespace System.Data.Services.Tests {
|
||||
{ new ExpandSegment ("first", null), new ExpandSegment ("second", null), new ExpandSegment ("third", null) }));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,12 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class IgnorePropertiesAttributeTests {
|
||||
[Test]
|
||||
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.AreEqual ("bar", e.PropertyNames[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,10 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Data.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class MimeTypeAttributeTests {
|
||||
[Test]
|
||||
@@ -39,4 +40,4 @@ namespace System.Data.Services.Tests {
|
||||
Assert.AreEqual ("type", mt.MimeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,11 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace System.Data.Services.Tests {
|
||||
namespace MonoTests.System.Data.Services {
|
||||
[TestFixture]
|
||||
public class QueryInterceptorAttributeTests {
|
||||
[Test]
|
||||
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
|
||||
new QueryInterceptorAttribute (null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Test.System.Data.Common
|
||||
namespace MonoTests.System.Data.Common
|
||||
{
|
||||
internal class DbDataReaderMock : DbDataReader
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Test.System.Data.Common
|
||||
namespace MonoTests.System.Data.Common
|
||||
{
|
||||
[TestFixture]
|
||||
public class DbDataReaderTest
|
||||
|
||||
@@ -12,6 +12,8 @@ using System.Threading;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class BinarySerializationTest
|
||||
{
|
||||
@@ -751,3 +753,4 @@ public class BinarySerializationTest
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class ConstraintExceptionTest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Data;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DBConcurrencyExceptionTest
|
||||
|
||||
@@ -39,7 +39,7 @@ using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataSetTest2
|
||||
@@ -448,7 +448,7 @@ namespace MonoTests_System.Data
|
||||
dt.Rows.Add(new object[] {2,"Value3","Value4"});
|
||||
dt.Rows.Add(new object[] {3,"Value5","Value5"});
|
||||
|
||||
System.Text.StringBuilder resultXML = new System.Text.StringBuilder();
|
||||
StringBuilder resultXML = new StringBuilder();
|
||||
|
||||
resultXML.Append("<" + ds.DataSetName + "xmlns=\"namespace\">");
|
||||
|
||||
@@ -975,13 +975,13 @@ namespace MonoTests_System.Data
|
||||
[Test] public void Locale()
|
||||
{
|
||||
DataSet ds = new DataSet("MyDataSet");
|
||||
System.Globalization.CultureInfo culInfo = System.Globalization.CultureInfo.CurrentCulture ;
|
||||
CultureInfo culInfo = CultureInfo.CurrentCulture ;
|
||||
|
||||
// Checking Locale default from system
|
||||
Assert.AreEqual(culInfo, ds.Locale , "DS156");
|
||||
|
||||
// Checking Locale get/set
|
||||
culInfo = new System.Globalization.CultureInfo("fr"); // = french
|
||||
culInfo = new CultureInfo("fr"); // = french
|
||||
ds.Locale = culInfo ;
|
||||
Assert.AreEqual(culInfo , ds.Locale , "DS157");
|
||||
}
|
||||
@@ -1998,11 +1998,11 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables.Add(DataProvider.CreateParentDataTable());
|
||||
ds1.Tables.Add(DataProvider.CreateChildDataTable());
|
||||
|
||||
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
//write xml schema only
|
||||
ds1.WriteXmlSchema(ms);
|
||||
|
||||
System.IO.MemoryStream ms1 = new System.IO.MemoryStream(ms.GetBuffer());
|
||||
MemoryStream ms1 = new MemoryStream(ms.GetBuffer());
|
||||
//copy schema
|
||||
DataSet ds2 = new DataSet();
|
||||
ds2.ReadXmlSchema(ms1);
|
||||
@@ -2073,7 +2073,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(0, ds2.Tables[1].Rows.Count , "DS282");
|
||||
|
||||
//try to delete the file
|
||||
System.IO.File.Delete(sTempFileName);
|
||||
File.Delete(sTempFileName);
|
||||
}
|
||||
|
||||
[Test] public void ReadXmlSchema_ByTextReader()
|
||||
@@ -2082,11 +2082,11 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables.Add(DataProvider.CreateParentDataTable());
|
||||
ds1.Tables.Add(DataProvider.CreateChildDataTable());
|
||||
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter();
|
||||
StringWriter sw = new StringWriter();
|
||||
//write xml file, schema only
|
||||
ds1.WriteXmlSchema(sw);
|
||||
|
||||
System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
|
||||
StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
|
||||
//copy both data and schema
|
||||
DataSet ds2 = new DataSet();
|
||||
ds2.ReadXmlSchema(sr);
|
||||
@@ -2122,14 +2122,14 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables.Add(DataProvider.CreateParentDataTable());
|
||||
ds1.Tables.Add(DataProvider.CreateChildDataTable());
|
||||
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter();
|
||||
System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
|
||||
StringWriter sw = new StringWriter();
|
||||
XmlTextWriter xmlTW = new XmlTextWriter(sw);
|
||||
//write xml file, schema only
|
||||
ds1.WriteXmlSchema(xmlTW);
|
||||
xmlTW.Flush();
|
||||
|
||||
System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
|
||||
System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
|
||||
StringReader sr = new StringReader(sw.ToString());
|
||||
XmlTextReader xmlTR = new XmlTextReader(sr);
|
||||
|
||||
//copy both data and schema
|
||||
DataSet ds2 = new DataSet();
|
||||
@@ -2196,7 +2196,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(ds2.Tables[1].Rows.Count, ds1.Tables[1].Rows.Count , "DS299");
|
||||
|
||||
//try to delete the file
|
||||
System.IO.File.Delete(sTempFileName);
|
||||
File.Delete(sTempFileName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -2212,7 +2212,7 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
|
||||
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
//write xml file, data only
|
||||
ds1.WriteXml(ms);
|
||||
|
||||
@@ -2241,7 +2241,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
string input = string.Empty;
|
||||
|
||||
System.IO.StringReader sr;
|
||||
StringReader sr;
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
input += "<?xml version=\"1.0\"?>";
|
||||
@@ -2261,7 +2261,7 @@ namespace MonoTests_System.Data
|
||||
input += " </Price>";
|
||||
input += "</Stock>";
|
||||
|
||||
sr = new System.IO.StringReader(input);
|
||||
sr = new StringReader(input);
|
||||
|
||||
ds.ReadXml(sr);
|
||||
|
||||
@@ -2311,7 +2311,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
DataSet ds = new DataSet("TestDataSet");
|
||||
string input = string.Empty;
|
||||
System.IO.StringReader sr;
|
||||
StringReader sr;
|
||||
|
||||
input += "<?xml version=\"1.0\" standalone=\"yes\"?>";
|
||||
input += "<Stocks><Stock name=\"MSFT\"><Company name=\"Microsoft Corp.\" /><Price type=\"high\"><Value>10.0</Value>";
|
||||
@@ -2320,7 +2320,7 @@ namespace MonoTests_System.Data
|
||||
input += "<Company name=\"General Electric\" /><Price type=\"high\"><Value>22.23</Value><Date>02/12/2001</Date></Price>";
|
||||
input += "<Price type=\"low\"><Value>1.97</Value><Date>04/20/2003</Date></Price><Price type=\"current\"><Value>3.0</Value>";
|
||||
input += "<Date>TODAY</Date></Price></Stock></Stocks>";
|
||||
sr = new System.IO.StringReader(input);
|
||||
sr = new StringReader(input);
|
||||
ds.EnforceConstraints = false;
|
||||
ds.ReadXml(sr);
|
||||
|
||||
@@ -2339,7 +2339,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
m_ds = new DataSet("Stocks");
|
||||
string input = string.Empty;
|
||||
System.IO.StringReader sr;
|
||||
StringReader sr;
|
||||
|
||||
input += "<?xml version=\"1.0\"?>";
|
||||
input += "<Stocks>";
|
||||
@@ -2408,7 +2408,7 @@ namespace MonoTests_System.Data
|
||||
input += " </Stock>";
|
||||
input += "</Stocks>";
|
||||
|
||||
sr = new System.IO.StringReader(input);
|
||||
sr = new StringReader(input);
|
||||
m_ds.EnforceConstraints = true;
|
||||
m_ds.ReadXml(sr);
|
||||
this.privateTestCase("TestCase 1", "Company", "name='Microsoft Corp.'", "Stock", "name='MSFT'", "DS320");
|
||||
@@ -2444,14 +2444,14 @@ namespace MonoTests_System.Data
|
||||
#region "TestCase 1 - Empty string"
|
||||
// Empty string
|
||||
DataSet ds = new DataSet();
|
||||
System.IO.StringReader sr = new System.IO.StringReader (string.Empty);
|
||||
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr);
|
||||
StringReader sr = new StringReader (string.Empty);
|
||||
XmlTextReader xReader = new XmlTextReader(sr);
|
||||
try
|
||||
{
|
||||
ds.ReadXml (xReader);
|
||||
Assert.Fail("DS335: ReadXml Failed to throw XmlException");
|
||||
}
|
||||
catch (System.Xml.XmlException) {}
|
||||
catch (XmlException) {}
|
||||
catch (AssertionException exc) {throw exc;}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -2635,8 +2635,8 @@ namespace MonoTests_System.Data
|
||||
private void PrivateTestCase(string a_name, string a_expected, string a_xmlData)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
System.IO.StringReader sr = new System.IO.StringReader(a_xmlData) ;
|
||||
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
|
||||
StringReader sr = new StringReader(a_xmlData) ;
|
||||
XmlTextReader xReader = new XmlTextReader(sr) ;
|
||||
ds.ReadXml (xReader);
|
||||
Assert.AreEqual(a_expected, this.dataSetDescription(ds), "DS337");
|
||||
}
|
||||
@@ -2681,8 +2681,8 @@ namespace MonoTests_System.Data
|
||||
xmlData += "<c>3</c>";
|
||||
xmlData += "</b>";
|
||||
xmlData += "</a>";
|
||||
System.IO.StringReader sr = new System.IO.StringReader(xmlData) ;
|
||||
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
|
||||
StringReader sr = new StringReader(xmlData) ;
|
||||
XmlTextReader xReader = new XmlTextReader(sr) ;
|
||||
ds.ReadXml (xReader);
|
||||
Assert.AreEqual(3, ds.Tables["c"].Rows.Count, "DS338");
|
||||
}
|
||||
@@ -2738,7 +2738,7 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter();
|
||||
StringWriter sw = new StringWriter();
|
||||
//write xml file, data only
|
||||
ds1.WriteXml(sw);
|
||||
|
||||
@@ -2747,7 +2747,7 @@ namespace MonoTests_System.Data
|
||||
//clear the data
|
||||
ds2.Clear();
|
||||
|
||||
System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
|
||||
StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
|
||||
ds2.ReadXml(sr);
|
||||
|
||||
//check xml data
|
||||
@@ -2777,8 +2777,8 @@ namespace MonoTests_System.Data
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
|
||||
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter();
|
||||
System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
|
||||
StringWriter sw = new StringWriter();
|
||||
XmlTextWriter xmlTW = new XmlTextWriter(sw);
|
||||
|
||||
//write xml file, data only
|
||||
ds1.WriteXml(xmlTW);
|
||||
@@ -2788,8 +2788,8 @@ namespace MonoTests_System.Data
|
||||
DataSet ds2 = ds1.Copy();
|
||||
//clear the data
|
||||
ds2.Clear();
|
||||
System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
|
||||
System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
|
||||
StringReader sr = new StringReader(sw.ToString());
|
||||
XmlTextReader xmlTR = new XmlTextReader(sr);
|
||||
ds2.ReadXml(xmlTR);
|
||||
|
||||
//check xml data
|
||||
@@ -2847,8 +2847,8 @@ namespace MonoTests_System.Data
|
||||
|
||||
[Test] public void WriteXmlSchema_Relations_ForeignKeys ()
|
||||
{
|
||||
System.IO.MemoryStream ms = null;
|
||||
System.IO.MemoryStream ms1 = null;
|
||||
MemoryStream ms = null;
|
||||
MemoryStream ms1 = null;
|
||||
|
||||
DataSet ds1 = new DataSet();
|
||||
|
||||
@@ -2884,10 +2884,10 @@ namespace MonoTests_System.Data
|
||||
new DataColumn[] {col1_5, col1_6},
|
||||
new DataColumn[] {col2_5, col2_6});
|
||||
|
||||
ms = new System.IO.MemoryStream();
|
||||
ms = new MemoryStream();
|
||||
ds1.WriteXmlSchema (ms);
|
||||
|
||||
ms1 = new System.IO.MemoryStream (ms.GetBuffer());
|
||||
ms1 = new MemoryStream (ms.GetBuffer());
|
||||
DataSet ds2 = new DataSet();
|
||||
ds2.ReadXmlSchema(ms1);
|
||||
|
||||
@@ -3096,18 +3096,18 @@ namespace MonoTests_System.Data
|
||||
|
||||
[Test] public void WriteXml_ByTextWriterXmlWriteMode()
|
||||
{
|
||||
System.IO.StringReader sr = null;
|
||||
System.IO.StringWriter sw = null;
|
||||
StringReader sr = null;
|
||||
StringWriter sw = null;
|
||||
|
||||
try // For real
|
||||
{
|
||||
// ReadXml - DataSetOut
|
||||
|
||||
DataSet oDataset = new DataSet("DataSetOut");
|
||||
sw = new System.IO.StringWriter();
|
||||
oDataset.WriteXml(sw,System.Data.XmlWriteMode.WriteSchema);
|
||||
sw = new StringWriter();
|
||||
oDataset.WriteXml(sw, XmlWriteMode.WriteSchema);
|
||||
|
||||
sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
|
||||
sr = new StringReader(sw.GetStringBuilder().ToString());
|
||||
oDataset = new DataSet("DataSetOut");
|
||||
|
||||
oDataset.ReadXml(sr);
|
||||
@@ -3252,13 +3252,13 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
string input = "<a><b><c>2</c></b></a>";
|
||||
System.IO.StringReader sr = new System.IO.StringReader(input) ;
|
||||
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
|
||||
StringReader sr = new StringReader(input) ;
|
||||
XmlTextReader xReader = new XmlTextReader(sr) ;
|
||||
ds.ReadXml (xReader);
|
||||
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter(sb);
|
||||
System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringWriter sw = new StringWriter(sb);
|
||||
XmlTextWriter xWriter = new XmlTextWriter(sw);
|
||||
ds.WriteXml(xWriter);
|
||||
string output = sb.ToString();
|
||||
Assert.AreEqual(input,output, "DS76");
|
||||
@@ -3267,20 +3267,20 @@ namespace MonoTests_System.Data
|
||||
DataSet ds = new DataSet();
|
||||
string input = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><a><b><c>2</c></b></a>";
|
||||
string expectedOutput = "<a><b><c>2</c></b></a>";
|
||||
System.IO.StringReader sr = new System.IO.StringReader(input) ;
|
||||
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
|
||||
StringReader sr = new StringReader(input) ;
|
||||
XmlTextReader xReader = new XmlTextReader(sr) ;
|
||||
ds.ReadXml (xReader);
|
||||
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
System.IO.StringWriter sw = new System.IO.StringWriter(sb);
|
||||
System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringWriter sw = new StringWriter(sb);
|
||||
XmlTextWriter xWriter = new XmlTextWriter(sw);
|
||||
ds.WriteXml(xWriter);
|
||||
string output = sb.ToString();
|
||||
Assert.AreEqual(expectedOutput,output, "DS77");
|
||||
}
|
||||
{
|
||||
DataSet ds = new DataSet("DSName");
|
||||
System.IO.StringWriter sr = new System.IO.StringWriter();
|
||||
StringWriter sr = new StringWriter();
|
||||
ds.WriteXml(sr);
|
||||
Assert.AreEqual("<DSName />",sr.ToString(), "DS78");
|
||||
}
|
||||
@@ -3315,7 +3315,7 @@ namespace MonoTests_System.Data
|
||||
ds.Tables.Remove("ChildTable");
|
||||
|
||||
//Get the xml representation of the dataset.
|
||||
System.IO.StringWriter sr = new System.IO.StringWriter();
|
||||
StringWriter sr = new StringWriter();
|
||||
ds.WriteXml(sr);
|
||||
string xml = sr.ToString();
|
||||
|
||||
|
||||
@@ -28,10 +28,12 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DataTableCollectionTest2
|
||||
{
|
||||
@@ -143,7 +145,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
counter = 0;
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.CollectionChanged+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanged);
|
||||
ds.Tables.CollectionChanged+=new CollectionChangeEventHandler(Tables_CollectionChanged);
|
||||
ds.Tables.Add();
|
||||
ds.Tables.Add();
|
||||
Assert.AreEqual(2, counter, "DTC15");
|
||||
@@ -153,7 +155,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(4, counter, "DTC16");
|
||||
}
|
||||
|
||||
private void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
|
||||
private void Tables_CollectionChanged(object sender, CollectionChangeEventArgs e)
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
@@ -163,7 +165,7 @@ namespace MonoTests_System.Data
|
||||
{
|
||||
counter = 0;
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.CollectionChanging+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanging);
|
||||
ds.Tables.CollectionChanging+=new CollectionChangeEventHandler(Tables_CollectionChanging);
|
||||
ds.Tables.Add();
|
||||
ds.Tables.Add();
|
||||
Assert.AreEqual(2, counter, "DTC17");
|
||||
@@ -173,7 +175,7 @@ namespace MonoTests_System.Data
|
||||
Assert.AreEqual(4, counter, "DTC18");
|
||||
}
|
||||
|
||||
private void Tables_CollectionChanging(object sender, System.ComponentModel.CollectionChangeEventArgs e)
|
||||
private void Tables_CollectionChanging(object sender, CollectionChangeEventArgs e)
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
@@ -233,7 +235,7 @@ namespace MonoTests_System.Data
|
||||
ds.Tables.Add();
|
||||
int count=0;
|
||||
|
||||
System.Collections.IEnumerator myEnumerator = ds.Tables.GetEnumerator();
|
||||
IEnumerator myEnumerator = ds.Tables.GetEnumerator();
|
||||
|
||||
while (myEnumerator.MoveNext())
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ using MonoTests.System.Data.Utils;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest2
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Xml;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest3
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.IO;
|
||||
using System.Xml;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest4
|
||||
@@ -1600,7 +1600,7 @@ namespace Monotests_System.Data
|
||||
DataSet ds = new DataSet ();
|
||||
DataTable table = new DataTable ("ParentTable");
|
||||
XmlReadMode mode = XmlReadMode.Auto;
|
||||
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
|
||||
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
|
||||
ds.Tables.Add (table);
|
||||
|
||||
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
|
||||
@@ -1638,7 +1638,7 @@ namespace Monotests_System.Data
|
||||
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
|
||||
DataSet ds = new DataSet ();
|
||||
DataTable table = new DataTable ("Table1");
|
||||
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
|
||||
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
|
||||
ds.Tables.Add (table);
|
||||
|
||||
try {
|
||||
@@ -1852,7 +1852,7 @@ namespace Monotests_System.Data
|
||||
DataTable table = new DataTable ("DummyTable");
|
||||
//define the table schame partially with a column name which does not match with any
|
||||
//table columns in the diffgram
|
||||
table.Columns.Add (new DataColumn ("WrongColumnName", System.Type.GetType ("System.String")));
|
||||
table.Columns.Add (new DataColumn ("WrongColumnName", Type.GetType ("System.String")));
|
||||
|
||||
XmlReadMode mode = XmlReadMode.Auto;
|
||||
|
||||
@@ -2013,8 +2013,8 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table.DataSet.DataSetName, "#2");
|
||||
Assert.AreEqual (2, table.Columns.Count, "#3");
|
||||
Assert.AreEqual (2, table.Rows.Count, "#4");
|
||||
Assert.AreEqual (typeof (System.Int32), table.Columns [0].DataType, "#5");
|
||||
Assert.AreEqual (typeof (System.String), table.Columns [1].DataType, "#6");
|
||||
Assert.AreEqual (typeof (Int32), table.Columns [0].DataType, "#5");
|
||||
Assert.AreEqual (typeof (String), table.Columns [1].DataType, "#6");
|
||||
Assert.AreEqual (1, table.Constraints.Count, "#7");
|
||||
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#8");
|
||||
Assert.AreEqual (1, table.ChildRelations.Count, "#9");
|
||||
@@ -2027,9 +2027,9 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#14");
|
||||
Assert.AreEqual (3, table1.Columns.Count, "#15");
|
||||
Assert.AreEqual (4, table1.Rows.Count, "#16");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#17");
|
||||
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#18");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [2].DataType, "#19");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#17");
|
||||
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#18");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [2].DataType, "#19");
|
||||
Assert.AreEqual (2, table1.Constraints.Count, "#20");
|
||||
Assert.AreEqual (typeof (UniqueConstraint), table1.Constraints [0].GetType (), "#21");
|
||||
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [1].GetType (), "#22");
|
||||
@@ -2045,8 +2045,8 @@ namespace Monotests_System.Data
|
||||
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#29");
|
||||
Assert.AreEqual (2, table1.Columns.Count, "#30");
|
||||
Assert.AreEqual (8, table1.Rows.Count, "#31");
|
||||
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#32");
|
||||
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#33");
|
||||
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#32");
|
||||
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#33");
|
||||
Assert.AreEqual (1, table1.Constraints.Count, "#34");
|
||||
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [0].GetType (), "#35");
|
||||
Assert.AreEqual (1, table1.ParentRelations.Count, "#36");
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Xml.Serialization;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataTableTest5
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DataViewTest2
|
||||
{
|
||||
@@ -41,7 +42,7 @@ namespace MonoTests_System.Data
|
||||
|
||||
class EventProperties //hold the event properties to be checked
|
||||
{
|
||||
public System.ComponentModel.ListChangedType lstType ;
|
||||
public ListChangedType lstType ;
|
||||
public int NewIndex;
|
||||
public int OldIndex;
|
||||
}
|
||||
@@ -508,7 +509,7 @@ namespace MonoTests_System.Data
|
||||
//create the dataview for the table
|
||||
DataView dv = new DataView(dt);
|
||||
|
||||
System.Collections.IEnumerator ienm = null;
|
||||
IEnumerator ienm = null;
|
||||
|
||||
// GetEnumerator != null
|
||||
ienm = dv.GetEnumerator();
|
||||
@@ -549,7 +550,7 @@ namespace MonoTests_System.Data
|
||||
DataView dv = new DataView(dt);
|
||||
|
||||
//add event handler
|
||||
dv.ListChanged +=new System.ComponentModel.ListChangedEventHandler(dv_ListChanged);
|
||||
dv.ListChanged +=new ListChangedEventHandler(dv_ListChanged);
|
||||
|
||||
// ----- Change Value ---------
|
||||
evProp = null;
|
||||
@@ -557,7 +558,7 @@ namespace MonoTests_System.Data
|
||||
dv[1]["String1"] = "something";
|
||||
Assert.AreEqual(true , evProp!=null , "DV58");
|
||||
// change value - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemChanged, evProp.lstType , "DV59");
|
||||
Assert.AreEqual(ListChangedType.ItemChanged, evProp.lstType , "DV59");
|
||||
// change value - NewIndex
|
||||
Assert.AreEqual(1, evProp.NewIndex, "DV60");
|
||||
// change value - OldIndex
|
||||
@@ -569,7 +570,7 @@ namespace MonoTests_System.Data
|
||||
dv.AddNew();
|
||||
Assert.AreEqual(true , evProp!=null , "DV62");
|
||||
// Add New - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemAdded , evProp.lstType , "DV63");
|
||||
Assert.AreEqual(ListChangedType.ItemAdded , evProp.lstType , "DV63");
|
||||
// Add New - NewIndex
|
||||
Assert.AreEqual(6, evProp.NewIndex, "DV64");
|
||||
// Add New - OldIndex
|
||||
@@ -581,7 +582,7 @@ namespace MonoTests_System.Data
|
||||
dv.Sort = "ParentId Desc";
|
||||
Assert.AreEqual(true , evProp!=null , "DV66");
|
||||
// sort - ListChangedType
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV67");
|
||||
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV67");
|
||||
// sort - NewIndex
|
||||
Assert.AreEqual(-1, evProp.NewIndex, "DV68");
|
||||
// sort - OldIndex
|
||||
@@ -627,12 +628,12 @@ namespace MonoTests_System.Data
|
||||
|
||||
Assert.AreEqual(true , evProp != null , "DV168");
|
||||
// Clear DataTable - should emit ListChangedType.Reset
|
||||
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV169");
|
||||
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV169");
|
||||
// Clear DataTable - should clear view count
|
||||
Assert.AreEqual(0, dt.DefaultView.Count , "DV169");
|
||||
}
|
||||
|
||||
private void dv_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
|
||||
private void dv_ListChanged(object sender, ListChangedEventArgs e)
|
||||
{
|
||||
evProp = new EventProperties();
|
||||
evProp.lstType = e.ListChangedType;
|
||||
@@ -646,7 +647,7 @@ namespace MonoTests_System.Data
|
||||
// this test also check DataView.Count property
|
||||
|
||||
DataRowView[] drvResult = null;
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
//create the source datatable
|
||||
DataTable dt = DataProvider.CreateChildDataTable();
|
||||
@@ -763,7 +764,7 @@ namespace MonoTests_System.Data
|
||||
*/
|
||||
|
||||
//DataRowView[] drvResult = null;
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
|
||||
DataTable dt = DataProvider.CreateParentDataTable();
|
||||
|
||||
@@ -821,7 +822,7 @@ namespace MonoTests_System.Data
|
||||
private DataRow[] GetResultRows(DataTable dt,DataRowState State)
|
||||
{
|
||||
//get expected rows
|
||||
System.Collections.ArrayList al = new System.Collections.ArrayList();
|
||||
ArrayList al = new ArrayList();
|
||||
DataRowVersion drVer = DataRowVersion.Current;
|
||||
|
||||
//From MSDN - The row the default version for the current DataRowState.
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DeletedRowInaccessibleExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class DuplicateNameExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
//using GHTUtils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class EvaluateExceptionTest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using System;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class ForeignKeyConstraintTest2
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class InRowChangingEventExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class InvalidConstraintExceptionTest
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Data;
|
||||
using NUnit.Framework;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
class MissingPrimaryKeyExceptionTest
|
||||
@@ -57,4 +57,4 @@ namespace MonoTests_System.Data
|
||||
tbl.Rows.Contains("Something");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class NoNullAllowedExceptionTest
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.IO;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class ReadOnlyExceptionTest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using System;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class RowNotInTableExceptionTest
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Text;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class SyntaxErrorExceptionTest
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ using NUnit.Framework;
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace Monotests_Mono.Data.SqlExpressions
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class ComparisonTest {
|
||||
@@ -10,7 +10,7 @@ namespace Monotests_Mono.Data.SqlExpressions
|
||||
[Test]
|
||||
public void TestStringTrailingSpaceHandling () {
|
||||
// test for bug 79695 - does not ignore certain trailing whitespace chars when comparing strings
|
||||
System.Data.DataTable dataTable = new System.Data.DataTable ("Person");
|
||||
DataTable dataTable = new DataTable ("Person");
|
||||
dataTable.Columns.Add ("Name", typeof (string));
|
||||
dataTable.Rows.Add (new object[] {"Mike "});
|
||||
DataRow[] selectedRows = dataTable.Select ("Name = 'Mike'");
|
||||
|
||||
@@ -31,7 +31,7 @@ using System;
|
||||
using System.Data;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture] public class UniqueConstraintTest2
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System.Data;
|
||||
using NUnit.Framework;
|
||||
using MonoTests.System.Data.Utils;
|
||||
|
||||
namespace MonoTests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
class VersionNotFoundExceptionTest
|
||||
@@ -73,4 +73,4 @@ namespace MonoTests_System.Data
|
||||
object obj = drParent[0,DataRowVersion.Original];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ using System.Xml;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class XmlDataLoaderTest
|
||||
@@ -74,7 +74,7 @@ namespace Monotests_System.Data
|
||||
DataSet ds = new DataSet ("Set");
|
||||
DataTable dt = new DataTable ("Test");
|
||||
dt.Columns.Add ("CustName", typeof (String));
|
||||
dt.Columns.Add ("Type", typeof (System.Type));
|
||||
dt.Columns.Add ("Type", typeof (Type));
|
||||
ds.Tables.Add (dt);
|
||||
return ds;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.Xml.Serialization;
|
||||
using System.Xml.Schema;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Monotests_System.Data
|
||||
namespace MonoTests.System.Data
|
||||
{
|
||||
[TestFixture]
|
||||
public class XmlDataReaderTest
|
||||
@@ -103,7 +103,7 @@ namespace Monotests_System.Data
|
||||
StringReader sr = new StringReader (xml);
|
||||
XmlTextReader xr = new XmlTextReader (sr);
|
||||
DataTable tbl = new DataTable("CustomTypesTable");
|
||||
tbl.Columns.Add("Dummy", typeof(System.UInt32));
|
||||
tbl.Columns.Add("Dummy", typeof(UInt32));
|
||||
tbl.Columns.Add("FuncXml", typeof(CustomTypeXml));
|
||||
|
||||
DataSet ds = new DataSet("CustomTypesData");
|
||||
|
||||
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid mobile mobile_static xammac net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Interactive.Async.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -22,7 +22,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Interactive.Providers.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Interactive.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -120,9 +120,17 @@ namespace System.Net.Http.Headers
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return FindParameter ("name");
|
||||
var value = FindParameter ("name");
|
||||
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
return DecodeValue (value, false);
|
||||
}
|
||||
set {
|
||||
if (value != null)
|
||||
value = EncodeBase64Value (value);
|
||||
|
||||
SetValue ("name", value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace System.Net.Http.Headers
|
||||
} else {
|
||||
value.From = nvalue;
|
||||
|
||||
t = lexer.Scan ();
|
||||
t = lexer.Scan (recognizeDash: true);
|
||||
if (t != Token.Type.SeparatorDash)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace System.Net.Http.Headers
|
||||
HeaderInfo.CreateSingle<AuthenticationHeaderValue> ("Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
|
||||
HeaderInfo.CreateSingle<CacheControlHeaderValue> ("Cache-Control", CacheControlHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
|
||||
HeaderInfo.CreateMulti<string> ("Connection", CollectionParser.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
|
||||
HeaderInfo.CreateSingle<ContentDispositionHeaderValue> ("Content-Disposition", ContentDispositionHeaderValue.TryParse, HttpHeaderKind.Content),
|
||||
HeaderInfo.CreateMulti<string> ("Content-Encoding", CollectionParser.TryParse, HttpHeaderKind.Content),
|
||||
HeaderInfo.CreateMulti<string> ("Content-Language", CollectionParser.TryParse, HttpHeaderKind.Content),
|
||||
HeaderInfo.CreateSingle<long> ("Content-Length", Parser.Long.TryParse, HttpHeaderKind.Content),
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace System.Net.Http.Headers
|
||||
return false;
|
||||
}
|
||||
|
||||
public Token Scan ()
|
||||
public Token Scan (bool recognizeDash = false)
|
||||
{
|
||||
int start = pos;
|
||||
if (s == null)
|
||||
@@ -279,8 +279,12 @@ namespace System.Net.Http.Headers
|
||||
ttype = Token.Type.SeparatorSlash;
|
||||
break;
|
||||
case '-':
|
||||
ttype = Token.Type.SeparatorDash;
|
||||
break;
|
||||
if (recognizeDash) {
|
||||
ttype = Token.Type.SeparatorDash;
|
||||
break;
|
||||
}
|
||||
|
||||
goto default;
|
||||
case ',':
|
||||
ttype = Token.Type.SeparatorComma;
|
||||
break;
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace System.Net.Http.Headers
|
||||
int number;
|
||||
token_read = false;
|
||||
|
||||
t = lexer.Scan ();
|
||||
t = lexer.Scan (recognizeDash: true);
|
||||
switch (t.Kind) {
|
||||
case Token.Type.SeparatorDash:
|
||||
t = lexer.Scan ();
|
||||
@@ -144,7 +144,7 @@ namespace System.Net.Http.Headers
|
||||
|
||||
switch (values.Length) {
|
||||
case 1:
|
||||
t = lexer.Scan ();
|
||||
t = lexer.Scan (recognizeDash: true);
|
||||
from = number;
|
||||
switch (t.Kind) {
|
||||
case Token.Type.SeparatorDash:
|
||||
|
||||
@@ -50,7 +50,6 @@ namespace System.Net.Http
|
||||
bool useProxy;
|
||||
ClientCertificateOption certificate;
|
||||
bool sentRequest;
|
||||
HttpWebRequest wrequest;
|
||||
string connectionGroupName;
|
||||
bool disposed;
|
||||
|
||||
@@ -221,12 +220,9 @@ namespace System.Net.Http
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (wrequest != null) {
|
||||
wrequest.ServicePoint.CloseConnectionGroup (wrequest.ConnectionGroupName);
|
||||
Volatile.Write (ref wrequest, null);
|
||||
}
|
||||
if (disposing && !disposed) {
|
||||
Volatile.Write (ref disposed, true);
|
||||
ServicePointManager.CloseConnectionGroup (connectionGroupName);
|
||||
}
|
||||
|
||||
base.Dispose (disposing);
|
||||
@@ -317,7 +313,7 @@ namespace System.Net.Http
|
||||
throw new ObjectDisposedException (GetType ().ToString ());
|
||||
|
||||
Volatile.Write (ref sentRequest, true);
|
||||
wrequest = CreateWebRequest (request);
|
||||
var wrequest = CreateWebRequest (request);
|
||||
|
||||
if (request.Content != null) {
|
||||
var headers = wrequest.Headers;
|
||||
|
||||
+27
@@ -239,6 +239,33 @@ namespace MonoTests.System.Net.Http.Headers
|
||||
Assert.AreEqual (new NameValueHeaderValue ("filename*", "utf-8''%C4%8D"), value.Parameters.First (), "#12");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Properties_Name ()
|
||||
{
|
||||
var value = new ContentDispositionHeaderValue ("a");
|
||||
|
||||
value.Name = "aa";
|
||||
Assert.AreEqual ("aa", value.Name, "#1");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("name", "aa"), value.Parameters.First (), "#2");
|
||||
|
||||
value.Name = "č";
|
||||
Assert.AreEqual ("č", value.Name, "#11");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#12");
|
||||
|
||||
value.Name = "(@)";
|
||||
Assert.AreEqual ("\"(@)\"", value.Name, "#21");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("name", "\"(@)\""), value.Parameters.First (), "#22");
|
||||
|
||||
value.Name = "\"č\"";
|
||||
Assert.AreEqual ("č", value.Name, "#31");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#32");
|
||||
|
||||
value.Name = "\"quoted\"";
|
||||
Assert.AreEqual ("\"quoted\"", value.Name, "#41");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("name", "\"quoted\""), value.Parameters.First (), "#42");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Properties_ModificationDate ()
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Linq;
|
||||
|
||||
namespace MonoTests.System.Net.Http.Headers
|
||||
{
|
||||
@@ -81,6 +82,13 @@ namespace MonoTests.System.Net.Http.Headers
|
||||
Assert.AreEqual ("mu/m", res.MediaType, "#2");
|
||||
Assert.AreEqual ("jj'", res.CharSet, "#2b");
|
||||
Assert.AreEqual ("mu/m; CHarset=jj'", res.ToString (), "#2c");
|
||||
|
||||
res = MediaTypeHeaderValue.Parse ("multipart/form-data; boundary=----Wk");
|
||||
Assert.AreEqual ("multipart/form-data", res.MediaType, "#3");
|
||||
Assert.IsNull (res.CharSet, "#3b");
|
||||
Assert.AreEqual (1, res.Parameters.Count, "#3c");
|
||||
Assert.AreEqual (new NameValueHeaderValue ("boundary", "----Wk"), res.Parameters.First (), "#3d");
|
||||
Assert.AreEqual ("multipart/form-data; boundary=----Wk", res.ToString (), "#3e");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -222,6 +222,7 @@ namespace MonoTests.System.Net.Http
|
||||
Assert.AreEqual (330, scm.Headers.ContentLength, "#2");
|
||||
|
||||
headers.Allow.Add ("a1");
|
||||
headers.ContentDisposition = new ContentDispositionHeaderValue ("cd1");
|
||||
headers.ContentEncoding.Add ("ce1");
|
||||
headers.ContentLanguage.Add ("cl1");
|
||||
headers.ContentLength = 23;
|
||||
@@ -234,6 +235,12 @@ namespace MonoTests.System.Net.Http
|
||||
|
||||
|
||||
headers.Add ("allow", "a2");
|
||||
try {
|
||||
headers.Add ("content-disposition", "cd2");
|
||||
Assert.Fail ("content-disposition");
|
||||
} catch (FormatException) {
|
||||
}
|
||||
|
||||
headers.Add ("content-encoding", "ce3");
|
||||
headers.Add ("content-language", "cl2");
|
||||
|
||||
@@ -307,6 +314,7 @@ namespace MonoTests.System.Net.Http
|
||||
Assert.AreEqual (new MediaTypeHeaderValue ("multipart/*"), headers.ContentType);
|
||||
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.Expires);
|
||||
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.LastModified);
|
||||
Assert.AreEqual (new ContentDispositionHeaderValue ("cd1"), headers.ContentDisposition);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
//
|
||||
// System.Numerics.BigInteger
|
||||
//
|
||||
// Rodrigo Kumpera ([email protected])
|
||||
|
||||
// Authors:
|
||||
// Rodrigo Kumpera ([email protected])
|
||||
// Marek Safar <[email protected]>
|
||||
//
|
||||
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
|
||||
// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
@@ -68,7 +70,6 @@ namespace System.Numerics {
|
||||
readonly uint[] data;
|
||||
readonly short sign;
|
||||
|
||||
static readonly uint[] ZERO = new uint [1];
|
||||
static readonly uint[] ONE = new uint [1] { 1 };
|
||||
|
||||
BigInteger (short sign, uint[] data)
|
||||
@@ -81,7 +82,7 @@ namespace System.Numerics {
|
||||
{
|
||||
if (value == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
} else if (value > 0) {
|
||||
sign = 1;
|
||||
data = new uint[] { (uint) value };
|
||||
@@ -96,7 +97,7 @@ namespace System.Numerics {
|
||||
{
|
||||
if (value == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
} else {
|
||||
sign = 1;
|
||||
data = new uint [1] { value };
|
||||
@@ -107,7 +108,7 @@ namespace System.Numerics {
|
||||
{
|
||||
if (value == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
} else if (value > 0) {
|
||||
sign = 1;
|
||||
uint low = (uint)value;
|
||||
@@ -135,7 +136,7 @@ namespace System.Numerics {
|
||||
{
|
||||
if (value == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
} else {
|
||||
sign = 1;
|
||||
uint low = (uint)value;
|
||||
@@ -180,7 +181,7 @@ namespace System.Numerics {
|
||||
int exponent = Exponent (bytes);
|
||||
if (exponent == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -217,7 +218,7 @@ namespace System.Numerics {
|
||||
|
||||
if (size == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,7 +242,7 @@ namespace System.Numerics {
|
||||
|
||||
if (len == 0 || (len == 1 && value [0] == 0)) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -254,7 +255,7 @@ namespace System.Numerics {
|
||||
while (value [len - 1] == 0) {
|
||||
if (--len == 0) {
|
||||
sign = 0;
|
||||
data = ZERO;
|
||||
data = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -456,12 +457,12 @@ namespace System.Numerics {
|
||||
}
|
||||
|
||||
public static BigInteger Zero {
|
||||
get { return new BigInteger (0, ZERO); }
|
||||
get { return new BigInteger (0); }
|
||||
}
|
||||
|
||||
public static explicit operator int (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return 0;
|
||||
if (value.data.Length > 1)
|
||||
throw new OverflowException ();
|
||||
@@ -483,7 +484,7 @@ namespace System.Numerics {
|
||||
[CLSCompliantAttribute (false)]
|
||||
public static explicit operator uint (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return 0;
|
||||
if (value.data.Length > 1 || value.sign == -1)
|
||||
throw new OverflowException ();
|
||||
@@ -527,7 +528,7 @@ namespace System.Numerics {
|
||||
|
||||
public static explicit operator long (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return 0;
|
||||
|
||||
if (value.data.Length > 2)
|
||||
@@ -569,7 +570,7 @@ namespace System.Numerics {
|
||||
[CLSCompliantAttribute (false)]
|
||||
public static explicit operator ulong (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return 0;
|
||||
if (value.data.Length > 2 || value.sign == -1)
|
||||
throw new OverflowException ();
|
||||
@@ -584,9 +585,10 @@ namespace System.Numerics {
|
||||
|
||||
public static explicit operator double (BigInteger value)
|
||||
{
|
||||
switch (value.data.Length) {
|
||||
case 0:
|
||||
if (value.data == null)
|
||||
return 0.0;
|
||||
|
||||
switch (value.data.Length) {
|
||||
case 1:
|
||||
return BuildDouble (value.sign, value.data [0], 0);
|
||||
case 2:
|
||||
@@ -613,7 +615,7 @@ namespace System.Numerics {
|
||||
|
||||
public static explicit operator decimal (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return Decimal.Zero;
|
||||
|
||||
uint[] data = value.data;
|
||||
@@ -703,7 +705,7 @@ namespace System.Numerics {
|
||||
int r = CoreCompare (left.data, right.data);
|
||||
|
||||
if (r == 0)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (r > 0) //left > right
|
||||
return new BigInteger (left.sign, CoreSub (left.data, right.data));
|
||||
@@ -722,7 +724,7 @@ namespace System.Numerics {
|
||||
int r = CoreCompare (left.data, right.data);
|
||||
|
||||
if (r == 0)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (r > 0) //left > right
|
||||
return new BigInteger (left.sign, CoreSub (left.data, right.data));
|
||||
@@ -736,7 +738,7 @@ namespace System.Numerics {
|
||||
public static BigInteger operator* (BigInteger left, BigInteger right)
|
||||
{
|
||||
if (left.sign == 0 || right.sign == 0)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (left.data [0] == 1 && left.data.Length == 1) {
|
||||
if (left.sign == 1)
|
||||
@@ -797,7 +799,7 @@ namespace System.Numerics {
|
||||
int i;
|
||||
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
if (i < quotient.Length - 1)
|
||||
quotient = Resize (quotient, i + 1);
|
||||
|
||||
@@ -820,7 +822,7 @@ namespace System.Numerics {
|
||||
int i;
|
||||
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (i < remainder_value.Length - 1)
|
||||
remainder_value = Resize (remainder_value, i + 1);
|
||||
@@ -829,7 +831,7 @@ namespace System.Numerics {
|
||||
|
||||
public static BigInteger operator- (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return value;
|
||||
return new BigInteger ((short)-value.sign, value.data);
|
||||
}
|
||||
@@ -841,14 +843,14 @@ namespace System.Numerics {
|
||||
|
||||
public static BigInteger operator++ (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return One;
|
||||
|
||||
short sign = value.sign;
|
||||
uint[] data = value.data;
|
||||
if (data.Length == 1) {
|
||||
if (sign == -1 && data [0] == 1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
if (sign == 0)
|
||||
return new BigInteger (1, ONE);
|
||||
}
|
||||
@@ -863,14 +865,14 @@ namespace System.Numerics {
|
||||
|
||||
public static BigInteger operator-- (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return MinusOne;
|
||||
|
||||
short sign = value.sign;
|
||||
uint[] data = value.data;
|
||||
if (data.Length == 1) {
|
||||
if (sign == 1 && data [0] == 1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
if (sign == 0)
|
||||
return new BigInteger (-1, ONE);
|
||||
}
|
||||
@@ -935,7 +937,7 @@ namespace System.Numerics {
|
||||
|
||||
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (i < result.Length - 1)
|
||||
result = Resize (result, i + 1);
|
||||
@@ -995,7 +997,7 @@ namespace System.Numerics {
|
||||
|
||||
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (i < result.Length - 1)
|
||||
result = Resize (result, i + 1);
|
||||
@@ -1055,7 +1057,7 @@ namespace System.Numerics {
|
||||
|
||||
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (i < result.Length - 1)
|
||||
result = Resize (result, i + 1);
|
||||
@@ -1065,7 +1067,7 @@ namespace System.Numerics {
|
||||
|
||||
public static BigInteger operator~ (BigInteger value)
|
||||
{
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return new BigInteger (-1, ONE);
|
||||
|
||||
uint[] data = value.data;
|
||||
@@ -1099,7 +1101,7 @@ namespace System.Numerics {
|
||||
|
||||
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
|
||||
if (i < result.Length - 1)
|
||||
result = Resize (result, i + 1);
|
||||
@@ -1121,7 +1123,7 @@ namespace System.Numerics {
|
||||
|
||||
public static BigInteger operator<< (BigInteger value, int shift)
|
||||
{
|
||||
if (shift == 0 || value.sign == 0)
|
||||
if (shift == 0 || value.data == null)
|
||||
return value;
|
||||
if (shift < 0)
|
||||
return value >> -shift;
|
||||
@@ -1177,7 +1179,7 @@ namespace System.Numerics {
|
||||
|
||||
if (size <= 0) {
|
||||
if (sign == 1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
return new BigInteger (-1, ONE);
|
||||
}
|
||||
|
||||
@@ -2142,7 +2144,7 @@ namespace System.Numerics {
|
||||
int i;
|
||||
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
|
||||
if (i == -1) {
|
||||
remainder = new BigInteger (0, ZERO);
|
||||
remainder = Zero;
|
||||
} else {
|
||||
if (i < remainder_value.Length - 1)
|
||||
remainder_value = Resize (remainder_value, i + 1);
|
||||
@@ -2151,7 +2153,7 @@ namespace System.Numerics {
|
||||
|
||||
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
|
||||
if (i == -1)
|
||||
return new BigInteger (0, ZERO);
|
||||
return Zero;
|
||||
if (i < quotient.Length - 1)
|
||||
quotient = Resize (quotient, i + 1);
|
||||
|
||||
@@ -2264,7 +2266,7 @@ namespace System.Numerics {
|
||||
if (baseValue == 0.0d || baseValue == Double.PositiveInfinity)
|
||||
return value.IsOne ? 0 : double.NaN;
|
||||
|
||||
if (value.sign == 0)
|
||||
if (value.data == null)
|
||||
return double.NegativeInfinity;
|
||||
|
||||
int length = value.data.Length - 1;
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace MonoTests.System.Numerics
|
||||
NfiUser.PercentNegativePattern = 2;
|
||||
NfiUser.PercentPositivePattern = 2;
|
||||
NfiUser.PercentSymbol = "%%%";
|
||||
NfiUser.NumberDecimalSeparator = ".";
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -625,10 +626,12 @@ namespace MonoTests.System.Numerics
|
||||
Assert.IsTrue (new BigInteger (1).IsOne, "#7");
|
||||
Assert.IsTrue (new BigInteger (32).IsPowerOfTwo, "#8");
|
||||
Assert.IsTrue (new BigInteger (0).IsZero, "#9");
|
||||
Assert.IsTrue (new BigInteger ().IsZero, "#9b");
|
||||
Assert.AreEqual (0, new BigInteger (0).Sign, "#10");
|
||||
Assert.AreEqual (-1, new BigInteger (-99999).Sign, "#11");
|
||||
|
||||
Assert.IsFalse (new BigInteger (0).IsPowerOfTwo, "#12");
|
||||
Assert.IsFalse (new BigInteger ().IsPowerOfTwo, "#12b");
|
||||
Assert.IsFalse (new BigInteger (-16).IsPowerOfTwo, "#13");
|
||||
Assert.IsTrue (new BigInteger (1).IsPowerOfTwo, "#14");
|
||||
}
|
||||
@@ -647,6 +650,7 @@ namespace MonoTests.System.Numerics
|
||||
Assert.AreEqual ("0000000005", new BigInteger (5).ToString ("d10"), "#2");
|
||||
Assert.AreEqual ("0A8", new BigInteger (168).ToString ("X"), "#3");
|
||||
Assert.AreEqual ("0", new BigInteger (0).ToString ("X"), "#4");
|
||||
Assert.AreEqual ("0", new BigInteger ().ToString ("X"), "#4b");
|
||||
Assert.AreEqual ("1", new BigInteger (1).ToString ("X"), "#5");
|
||||
Assert.AreEqual ("0A", new BigInteger (10).ToString ("X"), "#6");
|
||||
Assert.AreEqual ("F6", new BigInteger (-10).ToString ("X"), "#7");
|
||||
@@ -750,6 +754,7 @@ namespace MonoTests.System.Numerics
|
||||
Assert.AreEqual (new byte[] { 0x7F }, new BigInteger (0x7F).ToByteArray (), "#10");
|
||||
Assert.AreEqual (new byte[] { 0x45, 0xCC, 0xD0 }, new BigInteger (-0x2F33BB).ToByteArray (), "#11");
|
||||
Assert.AreEqual (new byte[] { 0 }, new BigInteger (0).ToByteArray (), "#12");
|
||||
Assert.AreEqual (new byte[] { 0 }, new BigInteger ().ToByteArray (), "#13");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -886,6 +891,14 @@ namespace MonoTests.System.Numerics
|
||||
Assert.AreEqual (-1m, (decimal)new BigInteger (-1), "#6");
|
||||
Assert.AreEqual (9999999999999999999999999999m,
|
||||
(decimal)new BigInteger (9999999999999999999999999999m), "#7");
|
||||
Assert.AreEqual (0m, (decimal)new BigInteger (), "#8");
|
||||
}
|
||||
|
||||
[SetCulture ("pt-BR")]
|
||||
[Test]
|
||||
public void Parse_pt_BR ()
|
||||
{
|
||||
Parse ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -938,7 +951,8 @@ namespace MonoTests.System.Numerics
|
||||
Assert.AreEqual (-23, (int)BigInteger.Parse(" -23 ", NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#19");
|
||||
|
||||
Assert.AreEqual (300000, (int)BigInteger.Parse("3E5", NumberStyles.AllowExponent), "#20");
|
||||
Assert.AreEqual (250, (int)BigInteger.Parse("2"+Nfi.NumberDecimalSeparator+"5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
|
||||
var dsep = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
|
||||
Assert.AreEqual (250, (int)BigInteger.Parse("2" + dsep + "5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
|
||||
Assert.AreEqual (25, (int)BigInteger.Parse("2500E-2", NumberStyles.AllowExponent), "#22");
|
||||
|
||||
Assert.AreEqual ("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408", NumberStyles.None).ToString(), "#23");
|
||||
@@ -951,7 +965,7 @@ namespace MonoTests.System.Numerics
|
||||
}
|
||||
|
||||
try {
|
||||
Int32.Parse ("2.09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
|
||||
Int32.Parse ("2" + dsep + "09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
|
||||
Assert.Fail ("#26");
|
||||
} catch (OverflowException) {
|
||||
}
|
||||
@@ -1276,6 +1290,9 @@ namespace MonoTests.System.Numerics
|
||||
|
||||
a = new BigInteger ();
|
||||
Assert.AreEqual (BigInteger.Zero.GetHashCode (), a.GetHashCode (), "#15");
|
||||
|
||||
a = new BigInteger ();
|
||||
Assert.AreEqual (BigInteger.Zero, a, "#16");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -35,7 +35,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.Core.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -24,7 +24,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.Debugger.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -24,7 +24,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.Experimental.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.Interfaces.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.Linq.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
@@ -42,7 +42,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:Mono.Reactive.Tests.dll
|
||||
|
||||
EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
|
||||
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
|
||||
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
|
||||
ifndef VALID_PROFILE
|
||||
LIBRARY_NAME = dummy-System.System.Reactive.PlatformServices.dll
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
|
||||
Loaded 100 of 313 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user