mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-15 17:10:51 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b538187892 | ||
|
|
1028e14aef | ||
|
|
62031dcabf | ||
|
|
a6203e5d2d | ||
|
|
b493ada939 | ||
|
|
000780ca82 | ||
|
|
969357ac02 | ||
|
|
fb7bbea8f9 | ||
|
|
1fd01f4fd7 | ||
|
|
e1af6ea5e7 | ||
|
|
288a9254f5 | ||
|
|
d95b5e57c4 | ||
|
|
1d40dbb42e | ||
|
|
5b9b00dd61 | ||
|
|
99f7533b63 | ||
|
|
33a0966d83 | ||
|
|
4d8bdab15e | ||
|
|
4309250dcd | ||
|
|
2334327c43 | ||
|
|
ddb9dc31f3 | ||
|
|
9fca0d8760 | ||
|
|
46ff31252d | ||
|
|
72175aa65a | ||
|
|
0f3df535f2 | ||
|
|
93b43680c0 | ||
|
|
cca6805688 | ||
|
|
82b313a29e | ||
|
|
cedb9d921d | ||
|
|
e613a64b4f | ||
|
|
e2018ed1e7 | ||
|
|
d092c53b97 | ||
|
|
582f242d47 | ||
|
|
ad910039be | ||
|
|
172a5333ba | ||
|
|
f3a2216b65 | ||
|
|
07ac089735 | ||
|
|
d31dbe843a | ||
|
|
a4ac628267 | ||
|
|
4f10cd1027 | ||
|
|
16538b28e3 | ||
|
|
e92217aad3 | ||
|
|
b25c713504 | ||
|
|
ebc0c7c215 | ||
|
|
d851c21b1f | ||
|
|
d4a680b045 | ||
|
|
0d29bd39f1 | ||
|
|
2e6757dae9 | ||
|
|
6a7c7f6853 | ||
|
|
ba63aa3589 | ||
|
|
9d4d9a8668 | ||
|
|
c95a4a2d2c | ||
|
|
5f411d9696 | ||
|
|
c03434f8f4 | ||
|
|
9d69811fd6 | ||
|
|
2389814c3c | ||
|
|
5a3352aba2 | ||
|
|
0a4c7bb91b | ||
|
|
33b8e6c418 | ||
|
|
c060398eae | ||
|
|
095dbce56f | ||
|
|
c2f12ea864 | ||
|
|
d0bb0ce89f | ||
|
|
18080dc75a | ||
|
|
872843aa92 | ||
|
|
3645833a7a | ||
|
|
5e8001a4ff | ||
|
|
639ca72904 | ||
|
|
d68cb85dc6 | ||
|
|
6f5656ea86 | ||
|
|
33f6b1d249 | ||
|
|
8ae8c52383 | ||
|
|
c87ebef727 | ||
|
|
f22c8b706e | ||
|
|
9d43da2ebf | ||
|
|
3737edb881 | ||
|
|
07c8f25fe5 | ||
|
|
335e62c3a0 | ||
|
|
36fe14548c | ||
|
|
6de3d54a24 | ||
|
|
cb54c26f6c | ||
|
|
569bd3bc52 | ||
|
|
1f44e26ab4 | ||
|
|
7b9563bc1c | ||
|
|
615252ca70 | ||
|
|
47fe82d812 | ||
|
|
0fd16dfa23 | ||
|
|
56521df97b | ||
|
|
e129a25c91 | ||
|
|
543b6872fe | ||
|
|
ed7cb7a6b7 | ||
|
|
33a9dca493 | ||
|
|
7008c37886 | ||
|
|
854f3e2952 | ||
|
|
c54cae3345 | ||
|
|
5d60a2b843 | ||
|
|
1f3334fd93 | ||
|
|
23c06f5e54 | ||
|
|
9def5c0a11 | ||
|
|
c903094761 | ||
|
|
462f511222 | ||
|
|
a08e664e4c | ||
|
|
2987232bc1 | ||
|
|
5ddc0c5fdf | ||
|
|
b2ded076c9 | ||
|
|
fa9903bcc1 | ||
|
|
820bff26b3 | ||
|
|
6d28c8f962 | ||
|
|
b2cac0129f | ||
|
|
8c55e41d50 | ||
|
|
ba806e58df | ||
|
|
0e0bf762ed | ||
|
|
46e3bd5099 | ||
|
|
67c1e412e2 | ||
|
|
b705cec3c7 | ||
|
|
a18994cc41 | ||
|
|
efe1fdeb9d | ||
|
|
993fc87b3f | ||
|
|
737ecd1033 | ||
|
|
09855094c1 | ||
|
|
419d3136fe | ||
|
|
97101d40aa | ||
|
|
4785686a4d | ||
|
|
61c25c4e10 | ||
|
|
99fedb1741 | ||
|
|
32ae8ad528 | ||
|
|
c1ef203b2c | ||
|
|
a7160188e5 | ||
|
|
ef73a4955d | ||
|
|
769481d834 | ||
|
|
4e47c8dfdc | ||
|
|
c4492e0949 | ||
|
|
ab6962b183 | ||
|
|
ad1a10e4a4 | ||
|
|
ecf6b88205 | ||
|
|
f3577389f6 | ||
|
|
9a4c8f3398 | ||
|
|
f42debee5e | ||
|
|
9ca82d47ee | ||
|
|
ce195600a3 | ||
|
|
da473eaff5 | ||
|
|
858aa226dc | ||
|
|
fd09fd9d44 | ||
|
|
12a2142852 | ||
|
|
c7b237f1be | ||
|
|
0ebfd3e385 | ||
|
|
50d84a3719 | ||
|
|
3e566852dc | ||
|
|
61fa43b909 | ||
|
|
196ea0219b | ||
|
|
b7db3364a0 | ||
|
|
20ae78fcc8 | ||
|
|
a5af7f28dc | ||
|
|
869e019e15 | ||
|
|
3ddda667e1 | ||
|
|
599f3dd3af | ||
|
|
efdd8353ed | ||
|
|
cf3e776887 | ||
|
|
38ffddd6c7 | ||
|
|
f2943b182a | ||
|
|
584b77e402 | ||
|
|
34bb601d18 | ||
|
|
b759166b96 | ||
|
|
b7015d6fd2 | ||
|
|
68f94932b7 | ||
|
|
de3c8c587a | ||
|
|
766778b545 | ||
|
|
3693fb14f4 | ||
|
|
98a3dd7f34 | ||
|
|
32ba15ee0b | ||
|
|
0931f21c4c | ||
|
|
85e13e6e2f | ||
|
|
d835b7d55f | ||
|
|
1d946e0f38 | ||
|
|
bfa85bcaaa | ||
|
|
ecd24fa6b5 | ||
|
|
eee8ff7cfc | ||
|
|
99a992605f | ||
|
|
13aa6b7199 | ||
|
|
3472efcdf9 | ||
|
|
1029de3147 | ||
|
|
2859780927 | ||
|
|
61ab3f7a34 | ||
|
|
6d5d7b57f2 | ||
|
|
f710b2c8e5 | ||
|
|
e50ce8ad66 | ||
|
|
b818777705 | ||
|
|
05ed822a48 | ||
|
|
0a5fdb5841 | ||
|
|
13183bc82b | ||
|
|
147e34f254 | ||
|
|
561092003c | ||
|
|
6cdbc561fc | ||
|
|
0dba58a734 | ||
|
|
c0af9ad2cc | ||
|
|
88b6094e06 | ||
|
|
4fbdeebbe8 | ||
|
|
bd8731da01 | ||
|
|
ea838e84f1 | ||
|
|
c3ae712ab1 | ||
|
|
7af9ad8cdb | ||
|
|
5921faad1c | ||
|
|
4bad0d6765 | ||
|
|
b0aaec8e96 | ||
|
|
e0b0a87e65 | ||
|
|
b8fb7b5e18 | ||
|
|
8a20f0dfff | ||
|
|
04529e90e2 | ||
|
|
83d7bc1a0c | ||
|
|
d1c10f8693 | ||
|
|
e9b1c90e9d | ||
|
|
59e6eb29e6 | ||
|
|
5053d17e50 |
No files matched your search
+47
-13
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.13.0],
|
||||
AC_INIT(mono, [5.14.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This can be reset to 0 when Mono's version number is bumped
|
||||
# since it's part of the corlib version (the prefix '1' in the full
|
||||
# version number is to ensure the number isn't treated as octal in C)
|
||||
MONO_CORLIB_COUNTER=3
|
||||
MONO_CORLIB_COUNTER=6
|
||||
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
|
||||
|
||||
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
|
||||
@@ -978,6 +978,30 @@ AC_SUBST(JEMALLOC_LDFLAGS)
|
||||
AC_SUBST(JEMALLOC_AUTOCONF_FLAGS)
|
||||
fi
|
||||
|
||||
|
||||
# Terminology:
|
||||
# Crash privacy - Attempts to not send identifying information in the crash dump / to protect the obscurity of the program control flow
|
||||
# MERP - The MS telemetry profile. Not for general use.
|
||||
# Structured crashes - crashes at runtime that trigger a stack walk by mono that happens cooperatively
|
||||
|
||||
# Structured crashes are not merp crashes. Structured crashes are json dumps made by mono during crashes. Merp upload is going to use the dumping code is a very specific way, and is enabled at runtime with an icall.
|
||||
|
||||
#--with-crash_privacy=yes --with-structured_crashes=no means we don't wanna dump in non-merp-enabled builds, and we want to not send symbol strings. This is going to be the default pair of settings for VS4Mac.
|
||||
#--with-crash_privacy=yes --with-structured_crashes=yes means you want to see crashes on your console, and you want to not see unmanaged symbol names. This is an option for proprietary apps that have manual bugs filed.
|
||||
#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration.
|
||||
#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI.
|
||||
|
||||
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=no])
|
||||
AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes])
|
||||
|
||||
if test "x$with_crash_privacy" = "xno"; then
|
||||
AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump])
|
||||
fi
|
||||
|
||||
if test "x$with_structured_crashes" = "xno"; then
|
||||
AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes])
|
||||
fi
|
||||
|
||||
#
|
||||
# Set the build profiles and options before things which use them
|
||||
#
|
||||
@@ -3216,9 +3240,22 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
fi
|
||||
|
||||
llvm_codegen="x86codegen"
|
||||
LLVM_ARCH_LIBS="-lLLVMX86Disassembler -lLLVMX86CodeGen -lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils"
|
||||
case "$target" in
|
||||
arm*)
|
||||
llvm_codegen="armcodegen"
|
||||
LLVM_ARCH_LIBS="-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter"
|
||||
;;
|
||||
aarch64*)
|
||||
llvm_codegen="aarch64codegen"
|
||||
LLVM_ARCH_LIBS="-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter"
|
||||
;;
|
||||
powerpc*)
|
||||
llvm_codegen="powerpccodegen"
|
||||
LLVM_ARCH_LIBS="-lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter"
|
||||
;;
|
||||
aarch64*)
|
||||
llvm_codegen="aarch64codegen"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -3284,17 +3321,14 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
LLVM_LDFLAGS="-L$with_llvm/lib"
|
||||
LLVM_SYSTEM_LIBS="-lshell32 -lpsapi -limagehlp -ldbghelp -lm"
|
||||
LLVM_LIBS="-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter \
|
||||
-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo \
|
||||
-lLLVMARMAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler \
|
||||
-lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc \
|
||||
-lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT \
|
||||
-lLLVMAnalysis -lLLVMTarget \
|
||||
-lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMSelectionDAG -lLLVMAsmPrinter \
|
||||
-lLLVMMCDisassembler -lLLVMJIT -lLLVMAnalysis -lLLVMTarget \
|
||||
-lLLVMIRReader -lLLVMAsmParser -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMInstrumentation \
|
||||
-lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils \
|
||||
-lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld \
|
||||
-lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore \
|
||||
-lLLVMSupport -lstdc++"
|
||||
LLVM_LIBS="$LLVM_LIBS $LLVM_SYSTEM_LIBS"
|
||||
LLVM_LIBS="$LLVM_LIBS $LLVM_ARCH_LIBS $LLVM_SYSTEM_LIBS"
|
||||
|
||||
llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
|
||||
llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
|
||||
@@ -3627,11 +3661,7 @@ if test "x$host" != "x$target"; then
|
||||
# TEGRA
|
||||
CPPFLAGS="$CPPFLAGS"
|
||||
;;
|
||||
armv5-*-linux-androideabi*)
|
||||
AC_DEFINE(TARGET_ANDROID, 1, [...])
|
||||
CPPFLAGS="$CPPFLAGS"
|
||||
;;
|
||||
*-linux-androideabi*)
|
||||
*-linux-android*)
|
||||
AC_DEFINE(TARGET_ANDROID, 1, [...])
|
||||
CPPFLAGS="$CPPFLAGS"
|
||||
;;
|
||||
@@ -4554,6 +4584,10 @@ AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider
|
||||
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
|
||||
if test "x$enable_btls" = "xno"; then
|
||||
enable_btls_lib=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes)
|
||||
|
||||
btls_android=no
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 63bb55c2a3...7d24404abd.
Vendored
+1
-1
Submodule external/bockbuild updated: 463bf5f401...b46c84105b.
Vendored
+1
-1
Submodule external/cecil updated: dfee11e80d...b6c50e3d34.
Vendored
+1
-1
Submodule external/corefx updated: e89c5c9646...871e5d71e7.
Vendored
+1
-1
Submodule external/corert updated: 2b3a7ff02e...d8bc0e6412.
Vendored
+1
-1
Submodule external/linker updated: dccb0d2378...d18d497504.
Vendored
+1
-1
Submodule external/nunit-lite updated: 70bb70b0ff...00e259a4bd.
Vendored
+1
-1
Submodule external/xunit-binaries updated: c5a907be25...9df2dda529.
@@ -271,6 +271,36 @@ This flag is mutually exlusive with
|
||||
By default the mkbundle tool will download from a Mono server the
|
||||
target runtimes, you can specify a different server to provide
|
||||
cross-compiled runtimes.
|
||||
.TP
|
||||
.I "--mono-api-struct-path FILE"
|
||||
FILE points to a file with the definition of the \fIBundleMonoAPI\fP structure which contains the
|
||||
required pointers to various Mono API functions used throughout the generated code. This mechanism
|
||||
is meant to be used by third parties which embed the Mono runtime and dynamically load and initialize
|
||||
it as part of the application startup, in which case the Mono APIs will not be available for the shared
|
||||
library loader and the bundle will fail to work (one example of such an embedding third party is
|
||||
Xamarin.Android).
|
||||
|
||||
After providing the definition FILE, the embedder must call the \fIvoid initialize_mono_api (const BundleMonoAPI *info)\fP
|
||||
function found in the generated code
|
||||
.B before
|
||||
calling \fIvoid mono_mkbundle_init ()\fP. The structure passed to \fIinitialize_mono_api\fP doesn't need
|
||||
to be dynamically allocated as its contents is copied to the local structure in the generated code and no
|
||||
pointer to the passed structure is retained or used after \fIinitialize_mono_api\fP returns.
|
||||
|
||||
The list of pointers is not documented here. Instead, please look at the \fIbundle-mono-api.inc\fP file
|
||||
found in the mkbundle source directory in your Mono source tree (\fImcs/tools/mkbundle\fP) or in the Mono's
|
||||
GitHub repository, https://github.com/mono/mono/blob/master/mcs/tools/mkbundle/bundle-mono-api.inc
|
||||
|
||||
Please note that your structure must match the one expected by your version of the Mono runtime.
|
||||
|
||||
The file must also define the \fImkbundle_log_error\fP function with the following signature:
|
||||
|
||||
.nf
|
||||
static void mkbundle_log_error (const char *format, ...) {}
|
||||
.fi
|
||||
|
||||
The function should implement logging API specific to the embedder.
|
||||
|
||||
.SH OLD EMBEDDING
|
||||
.PP
|
||||
The old embedding system compiles a small C stub that embeds the
|
||||
|
||||
@@ -471,6 +471,9 @@ in your program, or Mono's class libraries attempts to generate code
|
||||
dynamically. You should test your software upfront and make sure that
|
||||
you do not use any dynamic features.
|
||||
.TP
|
||||
\fB--full-aot-interp\fR
|
||||
Same as --full-aot with fallback to the interpreter.
|
||||
.TP
|
||||
\fB--gc=boehm\fR, \fB--gc=sgen\fR
|
||||
Selects the Garbage Collector engine for Mono to use, Boehm or SGen.
|
||||
Currently this merely ensures that you are running either the
|
||||
|
||||
@@ -27,11 +27,16 @@ xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttri
|
||||
ifeq ($(USE_XTEST_REMOTE_EXECUTOR), YES)
|
||||
XTEST_REMOTE_EXECUTOR = $(topdir)/class/lib/$(PROFILE)/RemoteExecutorConsoleApp.exe
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/AdminHelper.cs \
|
||||
$(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
|
||||
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs \
|
||||
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs \
|
||||
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs \
|
||||
$(topdir)/../external/corefx/src/Common/src/System/PasteArguments.cs
|
||||
|
||||
ifeq ($(PROFILE),monodroid)
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
|
||||
else
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
|
||||
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
|
||||
endif
|
||||
endif
|
||||
|
||||
xunit_class_deps :=
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Drawing.Common")]
|
||||
[assembly: AssemblyDescription ("System.Drawing.Common")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Drawing.Common")]
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
@@ -0,0 +1,49 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Drawing.Common
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Drawing.Common.dll
|
||||
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
|
||||
ifdef false # we'll enable this at a later point
|
||||
|
||||
# xammac_net_4_5 and the testing_* profiles are special, they don't build
|
||||
# System.Drawing.dll or equivalent neither in Mono nor in the XM repo.
|
||||
# For now we embed the types directly here.
|
||||
# TODO: find a better solution.
|
||||
EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hybrid, $(PROFILE))
|
||||
|
||||
ifndef EMBEDDED_DRAWING_DEP
|
||||
|
||||
# profiles which build a System.Drawing.dll in the repo
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal wasm, $(PROFILE))
|
||||
|
||||
ifdef REPO_DRAWING_DEP
|
||||
LIB_REFS += System.Drawing
|
||||
else
|
||||
# When System.Drawing.dll is not built in the Mono repo but in
|
||||
# the product repo like in the XI/XA case we need to pass in a reference
|
||||
# to the assembly containing drawing types like Rectangle etc. from there.
|
||||
# This needs to be passed in via EXTERNAL_FACADE_DRAWING_REFERENCE.
|
||||
LIB_MCS_FLAGS += /r:$(EXTERNAL_FACADE_DRAWING_REFERENCE)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
@@ -0,0 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if false // we'll enable these at a later point
|
||||
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Bitmap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSameAssemblyAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSatelliteAssemblyAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brushes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphics))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsContext))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsManager))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CharacterRange))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ColorTranslator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ContentAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CopyPixelOperation))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Design.CategoryNameCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.AdjustableArrowCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Blend))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.ColorBlend))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CombineMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingQuality))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CoordinateSpace))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CustomLineCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FillMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FlushIntention))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsContainer))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPath))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPathIterator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsState))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.InterpolationMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineJoin))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Matrix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.MatrixOrder))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathGradientBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathPointType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PixelOffsetMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.QualityMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.RegionData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.SmoothingMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WarpMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WrapMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Font))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontFamily))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.DrawImageAbort))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.EnumerateMetafileProc))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.GraphicsUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Icon))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.IDeviceContext))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image.GetThumbnailImageAbort))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ImageAnimator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.BitmapData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorAdjustType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorChannelFlag))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMapType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrixFlag))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorPalette))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfPlusRecordType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Encoder))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameters))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameterValueType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderValue))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.FrameDimension))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageAttributes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecInfo))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageLockMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Metafile))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileFrameUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetaHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PaletteFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PixelFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PlayRecordCallback))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PropertyItem))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.WmfPlaceableFileHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pen))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pens))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Duplex))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.InvalidPrinterException))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Margins))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PageSettings))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSize))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSource))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSourceKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPageInfo))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintAction))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintDocument))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolution))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolutionKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSizeCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSourceCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.StringCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnitConvert))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintRange))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.StandardPrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Region))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RotateFlipType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SolidBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringDigitSubstitute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormatFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringTrimming))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemBrushes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemColors))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemFonts))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemIcons))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemPens))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.FontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.GenericFontFamilies))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.HotkeyPrefix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.InstalledFontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.PrivateFontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.TextRenderingHint))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.TextureBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ToolboxBitmapAttribute))]
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Memory")]
|
||||
[assembly: AssemblyDescription ("System.Memory")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Memory")]
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("4.0.1.0")]
|
||||
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
@@ -0,0 +1,24 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Memory
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Memory.dll
|
||||
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MemoryExtensions))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Memory<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlyMemory<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlySpan<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Span<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MemoryMarshal))]
|
||||
|
||||
// TODO: we don't have these types yet
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.BuffersExtensions))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IBufferWriter<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IMemoryOwner<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IPinnable))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SequenceMarshal))]
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// Copyright (C) 2018 Microsoft Corporation
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Threading.Tasks.Extensions")]
|
||||
[assembly: AssemblyDescription ("System.Threading.Tasks.Extensions")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Threading.Tasks.Extensions")]
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("4.2.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
|
||||
<ProjectGuid>{F1D7CE36-B18B-48F0-B42A-7556448F98BA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1616,1699</NoWarn>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
<NoConfig>True</NoConfig>
|
||||
<AssemblyName>System.Threading.Tasks.Extensions</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
<AssemblyOriginatorKeyFile>../../Open.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
|
||||
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;WIN_PLATFORM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
|
||||
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
|
||||
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_REMOTING;DISABLE_COM;FEATURE_NO_BSD_SOCKETS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<!-- TRACE is set only for Debug configuration, so inherit from platform-specific value -->
|
||||
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="TypeForwarders.cs" />
|
||||
</ItemGroup>
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<Reference Include="nunitlite">
|
||||
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<!-- @ALL_REFERENCES@ -->
|
||||
<!-- @ALL_RESOURCES@ -->
|
||||
</Project>
|
||||
@@ -0,0 +1,24 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Threading.Tasks.Extensions
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Threading.Tasks.Extensions.dll
|
||||
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
AssemblyInfo.cs
|
||||
TypeForwarders.cs
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (C) 2018 Microsoft Corporation
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncMethodBuilderAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter<>))]
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask<>))]
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.IValueTaskSource))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.ValueTaskSourceStatus))]
|
||||
|
||||
@@ -90,8 +90,8 @@ unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
wasm_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
|
||||
wasm_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
|
||||
mobile_only_SUBDIRS = System.Security.Cryptography.Pkcs \
|
||||
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
|
||||
mobile_only_SUBDIRS = System.Security.Cryptography.Pkcs System.Threading.Tasks.Extensions \
|
||||
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy System.Drawing.Common
|
||||
|
||||
mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl
|
||||
|
||||
|
||||
@@ -19,6 +19,12 @@ endif
|
||||
TEST_MCS_FLAGS =
|
||||
TEST_LIB_REFS = System.Core
|
||||
|
||||
ifndef NO_PROCESS_START
|
||||
REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
|
||||
TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
|
||||
endif
|
||||
|
||||
|
||||
LIB_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
|
||||
|
||||
BUILT_SOURCES = $(PROFILE)-parser.cs
|
||||
|
||||
@@ -804,7 +804,7 @@ namespace Mono.Data.Sqlite
|
||||
int enc;
|
||||
IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);
|
||||
|
||||
if (p != null) seq.Name = UTF8ToString(p, len);
|
||||
if (p != IntPtr.Zero) seq.Name = UTF8ToString(p, len);
|
||||
seq.Type = (CollationTypeEnum)type;
|
||||
seq._func = func;
|
||||
seq.Encoding = (CollationEncodingEnum)enc;
|
||||
|
||||
@@ -57,13 +57,35 @@ namespace System.Net.Http
|
||||
public HttpRequestMessage Request;
|
||||
public CancellationTokenRegistration CancellationTokenRegistration;
|
||||
public CFContentStream ContentStream;
|
||||
public bool StreamCanBeDisposed;
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
CancellationTokenRegistration.Dispose ();
|
||||
if (ContentStream != null) {
|
||||
ContentStream.Close ();
|
||||
}
|
||||
if (ContentStream != null) {
|
||||
// The Close method of the CFContentStream blocks as you can see:
|
||||
// public void Close ()
|
||||
// {
|
||||
// data_read_event.WaitOne (); // make sure there's no pending data
|
||||
//
|
||||
// data_mutex.WaitOne ();
|
||||
// data = null;
|
||||
// this.http_stream.ErrorEvent -= HandleErrorEvent;
|
||||
// data_mutex.ReleaseMutex ();
|
||||
//
|
||||
// data_event.Set ();
|
||||
// }
|
||||
// This means. that when we want to ignore the data of the content, which happens
|
||||
// in the first request of a redirect, if we want to close, ignoring the content
|
||||
// we will have a deadlock.
|
||||
// Dispose will clean all the data, without waiting for the read, which by design in the
|
||||
// CFContentStream, blocks the thread. This happens ONLY after the first request that gets
|
||||
// a redirect status code. All other cases should call close.
|
||||
if (StreamCanBeDisposed)
|
||||
ContentStream.Dispose ();
|
||||
else
|
||||
ContentStream.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,6 +195,11 @@ namespace System.Net.Http
|
||||
}
|
||||
|
||||
protected internal override async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
return await SendAsync (request, cancellationToken, true).ConfigureAwait (false);
|
||||
}
|
||||
|
||||
internal async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken, bool isFirstRequest)
|
||||
{
|
||||
sentRequest = true;
|
||||
|
||||
@@ -194,7 +221,8 @@ namespace System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
stream.ShouldAutoredirect = allowAutoRedirect;
|
||||
if (!isFirstRequest && allowAutoRedirect)
|
||||
stream.ShouldAutoredirect = allowAutoRedirect;
|
||||
stream.HasBytesAvailableEvent += HandleHasBytesAvailableEvent;
|
||||
stream.ErrorEvent += HandleErrorEvent;
|
||||
stream.ClosedEvent += HandleClosedEvent;
|
||||
@@ -234,9 +262,31 @@ namespace System.Net.Http
|
||||
CloseStream (stream);
|
||||
});
|
||||
|
||||
if (isFirstRequest) {
|
||||
var initialRequest = await response.Task;
|
||||
var status = initialRequest.StatusCode;
|
||||
if (IsRedirect (status) && allowAutoRedirect) {
|
||||
bucket.StreamCanBeDisposed = true;
|
||||
// remove headers in a redirect for Authentication.
|
||||
request.Headers.Authorization = null;
|
||||
return await SendAsync (request, cancellationToken, false).ConfigureAwait (false);
|
||||
}
|
||||
return initialRequest;
|
||||
}
|
||||
return await response.Task;
|
||||
}
|
||||
|
||||
// Decide if we redirect or not, similar to what is done in the managed handler
|
||||
// https://github.com/mono/mono/blob/eca15996c7163f331c9f2cd0a17b63e8f92b1d55/mcs/class/referencesource/System/net/System/Net/HttpWebRequest.cs#L5681
|
||||
static bool IsRedirect (HttpStatusCode status)
|
||||
{
|
||||
return status == HttpStatusCode.Ambiguous || // 300
|
||||
status == HttpStatusCode.Moved || // 301
|
||||
status == HttpStatusCode.Redirect || // 302
|
||||
status == HttpStatusCode.RedirectMethod || // 303
|
||||
status == HttpStatusCode.RedirectKeepVerb; // 307
|
||||
}
|
||||
|
||||
void HandleErrorEvent (object sender, CFStream.StreamEventArgs e)
|
||||
{
|
||||
var stream = (CFHTTPStream)sender;
|
||||
|
||||
@@ -769,7 +769,7 @@ namespace MonoTests.System.Net.Http
|
||||
client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
|
||||
Assert.Fail ("#1");
|
||||
} catch (AggregateException e) {
|
||||
Assert.AreEqual (typeof (ProtocolViolationException), e.InnerException.GetType (), "#2");
|
||||
Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
|
||||
}
|
||||
Assert.IsNull (failed, "#102");
|
||||
} finally {
|
||||
@@ -1461,7 +1461,7 @@ namespace MonoTests.System.Net.Http
|
||||
HttpListener CreateListener (Action<HttpListenerContext> contextAssert, int port)
|
||||
{
|
||||
var l = new HttpListener ();
|
||||
l.Prefixes.Add (string.Format ("http://+:{0}/", port));
|
||||
l.Prefixes.Add (string.Format ("http://*:{0}/", port));
|
||||
l.Start ();
|
||||
AddListenerContext(l, contextAssert);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ include ../../build/rules.make
|
||||
LIBRARY = System.Numerics.dll
|
||||
LIB_REFS = System
|
||||
KEYFILE = ../ecma.pub
|
||||
LIB_MCS_FLAGS = /unsafe
|
||||
LIB_MCS_FLAGS = /unsafe -nowarn:436
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
XTEST_LIB_REFS = System Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Core System.Numerics.Vectors Microsoft.CSharp
|
||||
XTEST_LIB_FLAGS = -unsafe
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlSerializableWriter.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlWriterDelegator.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XPathQueryGenerator.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Text/Base64Encoding.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Text/BinHexEncoding.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Text/SurrogateChar.cs
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ExportOptions.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ImportOptions.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaImporter.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractExporter.cs
|
||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractImporter.cs
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Diagnostics;
|
||||
|
||||
namespace System.Runtime.Serialization {
|
||||
|
||||
internal static class DiagnosticUtility {
|
||||
internal static partial class DiagnosticUtility {
|
||||
internal static bool ShouldTraceError = true;
|
||||
internal static readonly bool ShouldTraceWarning = false;
|
||||
internal static readonly bool ShouldTraceInformation = false;
|
||||
|
||||
@@ -308,5 +308,19 @@ public const string XmlMaxStringContentLengthExceeded = @"XML max string content
|
||||
public const string XmlObjectAssignedToIncompatibleInterface = @"Object of type '{0}' is assigned to an incompatible interface '{1}'.";
|
||||
|
||||
#endregion
|
||||
|
||||
// CoreFX
|
||||
public const string PlatformNotSupported_SchemaImporter = "The implementation of the function requires System.Runtime.Serialization.SchemaImporter which is not supported on this platform.";
|
||||
public const string PlatformNotSupported_IDataContractSurrogate = "The implementation of the function requires System.Runtime.Serialization.IDataContractSurrogate which is not supported on this platform.";
|
||||
|
||||
internal static string Format(string resourceFormats)
|
||||
{
|
||||
return resourceFormats;
|
||||
}
|
||||
|
||||
internal static string Format(string resourceFormat, object p1)
|
||||
{
|
||||
return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
|
||||
namespace System.Runtime.Serialization
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using System.Xml.Serialization;
|
||||
using System.Runtime.Serialization.Diagnostics;
|
||||
|
||||
class SchemaExporter
|
||||
{
|
||||
internal static void GetXmlTypeInfo(Type type, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
|
||||
{
|
||||
if (IsSpecialXmlType(type, out stableName, out xsdType, out hasRoot))
|
||||
return;
|
||||
XmlSchemaSet schemas = new XmlSchemaSet();
|
||||
schemas.XmlResolver = null;
|
||||
InvokeSchemaProviderMethod(type, schemas, out stableName, out xsdType, out hasRoot);
|
||||
if (stableName.Name == null || stableName.Name.Length == 0)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidXmlDataContractName, DataContract.GetClrTypeFullName(type))));
|
||||
}
|
||||
|
||||
internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
|
||||
{
|
||||
xsdType = null;
|
||||
hasRoot = true;
|
||||
if (type == Globals.TypeOfXmlElement || type == Globals.TypeOfXmlNodeArray)
|
||||
{
|
||||
string name = null;
|
||||
if (type == Globals.TypeOfXmlElement)
|
||||
{
|
||||
xsdType = CreateAnyElementType();
|
||||
name = "XmlElement";
|
||||
hasRoot = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
xsdType = CreateAnyType();
|
||||
name = "ArrayOfXmlNode";
|
||||
hasRoot = true;
|
||||
}
|
||||
typeName = new XmlQualifiedName(name, DataContract.GetDefaultStableNamespace(type));
|
||||
return true;
|
||||
}
|
||||
typeName = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
|
||||
{
|
||||
xsdType = null;
|
||||
hasRoot = true;
|
||||
object[] attrs = clrType.GetCustomAttributes(Globals.TypeOfXmlSchemaProviderAttribute, false);
|
||||
if (attrs == null || attrs.Length == 0)
|
||||
{
|
||||
stableName = DataContract.GetDefaultStableName(clrType);
|
||||
return false;
|
||||
}
|
||||
|
||||
XmlSchemaProviderAttribute provider = (XmlSchemaProviderAttribute)attrs[0];
|
||||
if (provider.IsAny)
|
||||
{
|
||||
xsdType = CreateAnyElementType();
|
||||
hasRoot = false;
|
||||
}
|
||||
string methodName = provider.MethodName;
|
||||
if (methodName == null || methodName.Length == 0)
|
||||
{
|
||||
if (!provider.IsAny)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidGetSchemaMethod, DataContract.GetClrTypeFullName(clrType))));
|
||||
stableName = DataContract.GetDefaultStableName(clrType);
|
||||
}
|
||||
else
|
||||
{
|
||||
MethodInfo getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, null, new Type[] { typeof(XmlSchemaSet) }, null);
|
||||
if (getMethod == null)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName)));
|
||||
|
||||
if (!(Globals.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)) && !(Globals.TypeOfXmlSchemaType.IsAssignableFrom(getMethod.ReturnType)))
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType))));
|
||||
|
||||
object typeInfo = getMethod.Invoke(null, new object[] { schemas });
|
||||
|
||||
if (provider.IsAny)
|
||||
{
|
||||
if (typeInfo != null)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidNonNullReturnValueByIsAny, DataContract.GetClrTypeFullName(clrType), methodName)));
|
||||
stableName = DataContract.GetDefaultStableName(clrType);
|
||||
}
|
||||
else if (typeInfo == null)
|
||||
{
|
||||
xsdType = CreateAnyElementType();
|
||||
hasRoot = false;
|
||||
stableName = DataContract.GetDefaultStableName(clrType);
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlSchemaType providerXsdType = typeInfo as XmlSchemaType;
|
||||
if (providerXsdType != null)
|
||||
{
|
||||
string typeName = providerXsdType.Name;
|
||||
string typeNs = null;
|
||||
if (typeName == null || typeName.Length == 0)
|
||||
{
|
||||
DataContract.GetDefaultStableName(DataContract.GetClrTypeFullName(clrType), out typeName, out typeNs);
|
||||
stableName = new XmlQualifiedName(typeName, typeNs);
|
||||
providerXsdType.Annotation = GetSchemaAnnotation(ExportActualType(stableName, new XmlDocument()));
|
||||
xsdType = providerXsdType;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (XmlSchema schema in schemas.Schemas())
|
||||
{
|
||||
foreach (XmlSchemaObject schemaItem in schema.Items)
|
||||
{
|
||||
if ((object)schemaItem == (object)providerXsdType)
|
||||
{
|
||||
typeNs = schema.TargetNamespace;
|
||||
if (typeNs == null)
|
||||
typeNs = String.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (typeNs != null)
|
||||
break;
|
||||
}
|
||||
if (typeNs == null)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingSchemaType, typeName, DataContract.GetClrTypeFullName(clrType))));
|
||||
stableName = new XmlQualifiedName(typeName, typeNs);
|
||||
}
|
||||
}
|
||||
else
|
||||
stableName = (XmlQualifiedName)typeInfo;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static XmlSchemaComplexType CreateAnyElementType()
|
||||
{
|
||||
XmlSchemaComplexType anyElementType = new XmlSchemaComplexType();
|
||||
anyElementType.IsMixed = false;
|
||||
anyElementType.Particle = new XmlSchemaSequence();
|
||||
XmlSchemaAny any = new XmlSchemaAny();
|
||||
any.MinOccurs = 0;
|
||||
any.ProcessContents = XmlSchemaContentProcessing.Lax;
|
||||
((XmlSchemaSequence)anyElementType.Particle).Items.Add(any);
|
||||
return anyElementType;
|
||||
}
|
||||
|
||||
static XmlSchemaAnnotation GetSchemaAnnotation(params XmlNode[] nodes)
|
||||
{
|
||||
if (nodes == null || nodes.Length == 0)
|
||||
return null;
|
||||
bool hasAnnotation = false;
|
||||
for (int i = 0; i < nodes.Length; i++)
|
||||
if (nodes[i] != null)
|
||||
{
|
||||
hasAnnotation = true;
|
||||
break;
|
||||
}
|
||||
if (!hasAnnotation)
|
||||
return null;
|
||||
|
||||
XmlSchemaAnnotation annotation = new XmlSchemaAnnotation();
|
||||
XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
|
||||
annotation.Items.Add(appInfo);
|
||||
appInfo.Markup = nodes;
|
||||
return annotation;
|
||||
}
|
||||
|
||||
static XmlSchemaComplexType CreateAnyType()
|
||||
{
|
||||
XmlSchemaComplexType anyType = new XmlSchemaComplexType();
|
||||
anyType.IsMixed = true;
|
||||
anyType.Particle = new XmlSchemaSequence();
|
||||
XmlSchemaAny any = new XmlSchemaAny();
|
||||
any.MinOccurs = 0;
|
||||
any.MaxOccurs = Decimal.MaxValue;
|
||||
any.ProcessContents = XmlSchemaContentProcessing.Lax;
|
||||
((XmlSchemaSequence)anyType.Particle).Items.Add(any);
|
||||
anyType.AnyAttribute = new XmlSchemaAnyAttribute();
|
||||
return anyType;
|
||||
}
|
||||
|
||||
static XmlElement ExportActualType(XmlQualifiedName typeName, XmlDocument xmlDoc)
|
||||
{
|
||||
XmlElement actualTypeElement = xmlDoc.CreateElement(ActualTypeAnnotationName.Name, ActualTypeAnnotationName.Namespace);
|
||||
|
||||
XmlAttribute nameAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNameAttribute);
|
||||
nameAttribute.Value = typeName.Name;
|
||||
actualTypeElement.Attributes.Append(nameAttribute);
|
||||
|
||||
XmlAttribute nsAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNamespaceAttribute);
|
||||
nsAttribute.Value = typeName.Namespace;
|
||||
actualTypeElement.Attributes.Append(nsAttribute);
|
||||
|
||||
return actualTypeElement;
|
||||
}
|
||||
|
||||
static XmlQualifiedName actualTypeAnnotationName;
|
||||
internal static XmlQualifiedName ActualTypeAnnotationName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (actualTypeAnnotationName == null)
|
||||
actualTypeAnnotationName = new XmlQualifiedName(Globals.ActualTypeLocalName, Globals.SerializationNamespace);
|
||||
return actualTypeAnnotationName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
//
|
||||
// XsdDataContractExporter_mobile.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alexander Köplinger <[email protected]>
|
||||
//
|
||||
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
|
||||
namespace System.Runtime.Serialization
|
||||
{
|
||||
public class XsdDataContractExporter
|
||||
{
|
||||
public XsdDataContractExporter () { throw new NotImplementedException (); }
|
||||
public XsdDataContractExporter (XmlSchemaSet schemas) { throw new NotImplementedException (); }
|
||||
public ExportOptions Options { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
public XmlSchemaSet Schemas { get { throw new NotImplementedException (); } }
|
||||
public bool CanExport (ICollection<Assembly> assemblies) { throw new NotImplementedException ();}
|
||||
public bool CanExport (ICollection<Type> types) { throw new NotImplementedException (); }
|
||||
public bool CanExport (Type type) { throw new NotImplementedException (); }
|
||||
public void Export (ICollection<Assembly> assemblies) { throw new NotImplementedException (); }
|
||||
public void Export (ICollection<Type> types) { throw new NotImplementedException (); }
|
||||
public void Export (Type type) { throw new NotImplementedException (); }
|
||||
public XmlQualifiedName GetRootElementName (Type type) { throw new NotImplementedException (); }
|
||||
public XmlSchemaType GetSchemaType (Type type) { throw new NotImplementedException (); }
|
||||
public XmlQualifiedName GetSchemaTypeName (Type type) { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Runtime.Serialization
|
||||
{
|
||||
partial class DiagnosticUtility
|
||||
{
|
||||
internal static bool IsFatal(Exception exception)
|
||||
{
|
||||
while (exception != null)
|
||||
{
|
||||
// These exceptions aren't themselves fatal, but since the CLR uses them to wrap other exceptions,
|
||||
// we want to check to see whether they've been used to wrap a fatal exception. If so, then they
|
||||
// count as fatal.
|
||||
if (exception is TypeInitializationException)
|
||||
{
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
#include System.Runtime.Serialization.dll.sources
|
||||
#include ReferenceSource.common.sources
|
||||
|
||||
ReferenceSources/SchemaExporter_mobile.cs
|
||||
ReferenceSources/XsdDataContractExporter_mobile.cs
|
||||
ReferenceSources/SimplifiedCodeTypeReference.cs
|
||||
|
||||
corefx/DiagnosticUtility.cs
|
||||
|
||||
../../../external/corefx/src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XsdDataContractExporter.cs
|
||||
@@ -1,5 +1,4 @@
|
||||
../../test-helpers/NunitHelpers.cs
|
||||
System.ServiceProcess/ServiceBaseTest.cs
|
||||
System.ServiceProcess/ServiceControllerTest.cs
|
||||
System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs
|
||||
System.ServiceProcess/ServiceControllerPermissionTest.cs
|
||||
@@ -937,6 +937,7 @@ namespace System.Windows.Forms
|
||||
if (tabs != null && tabs.Count > 0) {
|
||||
foreach (PropertyTab tab in tabs) {
|
||||
PropertyToolBarButton button = new PropertyToolBarButton (tab);
|
||||
button.Click += new EventHandler (toolbarbutton_clicked);
|
||||
toolbar.Items.Add (button);
|
||||
if (tab.Bitmap != null) {
|
||||
tab.Bitmap.MakeTransparent ();
|
||||
@@ -986,7 +987,7 @@ namespace System.Windows.Forms
|
||||
scopes.Clear ();
|
||||
IList currentIntersection = (i == 0 ? (IList)tabAttribute.TabClasses : (IList)intersection);
|
||||
for (int j=0; j < currentIntersection.Count; j++) {
|
||||
if ((Type)intersection[j] == tabAttribute.TabClasses[j]) {
|
||||
if ((Type)currentIntersection[j] == tabAttribute.TabClasses[j]) {
|
||||
new_intersection.Add (tabAttribute.TabClasses[j]);
|
||||
scopes.Add (tabAttribute.TabScopes[j]);
|
||||
}
|
||||
@@ -1410,8 +1411,10 @@ namespace System.Windows.Forms
|
||||
toRemove.Add (i);
|
||||
}
|
||||
foreach (int indexToRemove in toRemove) {
|
||||
property_tabs.RemoveAt (indexToRemove);
|
||||
property_tabs_scopes.RemoveAt (indexToRemove);
|
||||
if (property_tabs.Count > indexToRemove)
|
||||
property_tabs.RemoveAt (indexToRemove);
|
||||
if (property_tabs_scopes.Count > indexToRemove)
|
||||
property_tabs_scopes.RemoveAt (indexToRemove);
|
||||
}
|
||||
property_grid.RefreshToolbar (this);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ using NUnit.Framework;
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using Network = System.Net;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Schema;
|
||||
using System.Collections.Generic;
|
||||
@@ -94,7 +93,7 @@ namespace MonoTests.System.Xml.Schema
|
||||
{
|
||||
// Create a resolver with default credentials.
|
||||
XmlUrlResolver resolver = new XmlUrlResolver ();
|
||||
resolver.Credentials = Network.CredentialCache.DefaultCredentials;
|
||||
resolver.Credentials = global::System.Net.CredentialCache.DefaultCredentials;
|
||||
// Set the reader settings object to use the resolver.
|
||||
XmlReaderSettings settings = new XmlReaderSettings ();
|
||||
settings.XmlResolver = resolver;
|
||||
|
||||
@@ -801,7 +801,7 @@ namespace System.Diagnostics
|
||||
if (startInfo.RedirectStandardOutput) {
|
||||
MonoIO.Close (stdout_write, out error);
|
||||
|
||||
Encoding stdoutEncoding = startInfo.StandardOutputEncoding ?? Console.Out.Encoding;
|
||||
Encoding stdoutEncoding = startInfo.StandardOutputEncoding ?? Console.OutputEncoding;
|
||||
|
||||
standardOutput = new StreamReader (new FileStream (stdout_read, FileAccess.Read, true, 8192), stdoutEncoding, true);
|
||||
}
|
||||
@@ -809,7 +809,7 @@ namespace System.Diagnostics
|
||||
if (startInfo.RedirectStandardError) {
|
||||
MonoIO.Close (stderr_write, out error);
|
||||
|
||||
Encoding stderrEncoding = startInfo.StandardErrorEncoding ?? Console.Out.Encoding;
|
||||
Encoding stderrEncoding = startInfo.StandardErrorEncoding ?? Console.OutputEncoding;
|
||||
|
||||
standardError = new StreamReader (new FileStream (stderr_read, FileAccess.Read, true, 8192), stderrEncoding, true);
|
||||
}
|
||||
|
||||
@@ -380,7 +380,12 @@ namespace System.IO.Compression
|
||||
GC.SuppressFinalize (this);
|
||||
|
||||
io_buffer = null;
|
||||
|
||||
} else {
|
||||
// When we are in the finalizer we don't want to access the underlying stream anymore
|
||||
base_stream = Stream.Null;
|
||||
}
|
||||
|
||||
if (z_stream != null) {
|
||||
z_stream.Dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -105,16 +105,16 @@ namespace System.IO {
|
||||
var result = new C ();
|
||||
|
||||
result.Changed += (object o, FileSystemEventArgs args) =>
|
||||
{ ProxyDispatch (o, FileAction.Modified, args); };
|
||||
Task.Run (() => ProxyDispatch (o, FileAction.Modified, args));
|
||||
result.Created += (object o, FileSystemEventArgs args) =>
|
||||
{ ProxyDispatch (o, FileAction.Added, args); };
|
||||
Task.Run (() => ProxyDispatch (o, FileAction.Added, args));
|
||||
result.Deleted += (object o, FileSystemEventArgs args) =>
|
||||
{ ProxyDispatch (o, FileAction.Removed, args); };
|
||||
Task.Run (() => ProxyDispatch (o, FileAction.Removed, args));
|
||||
result.Renamed += (object o, RenamedEventArgs args) =>
|
||||
{ ProxyDispatch (o, FileAction.RenamedNewName, args); };
|
||||
Task.Run (() => ProxyDispatch (o, FileAction.RenamedNewName, args));
|
||||
|
||||
result.Error += (object o, ErrorEventArgs args) =>
|
||||
{ ProxyDispatchError (handle, args); };
|
||||
Task.Run (() => ProxyDispatchError (handle, args));
|
||||
|
||||
Operation (map_op: (in_map, out_map, event_map, _) => {
|
||||
in_map.Add (handle, result);
|
||||
|
||||
@@ -37,6 +37,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.IO {
|
||||
[DefaultEvent("Changed")]
|
||||
@@ -114,7 +115,7 @@ namespace System.IO {
|
||||
void InitWatcher ()
|
||||
{
|
||||
lock (lockobj) {
|
||||
if (watcher != null)
|
||||
if (watcher_handle != null)
|
||||
return;
|
||||
|
||||
string managed = Environment.GetEnvironmentVariable ("MONO_MANAGED_WATCHER");
|
||||
@@ -510,17 +511,17 @@ namespace System.IO {
|
||||
case FileAction.Added:
|
||||
lastData.Name = filename;
|
||||
lastData.ChangeType = WatcherChangeTypes.Created;
|
||||
OnCreated (new FileSystemEventArgs (WatcherChangeTypes.Created, path, filename));
|
||||
Task.Run (() => OnCreated (new FileSystemEventArgs (WatcherChangeTypes.Created, path, filename)));
|
||||
break;
|
||||
case FileAction.Removed:
|
||||
lastData.Name = filename;
|
||||
lastData.ChangeType = WatcherChangeTypes.Deleted;
|
||||
OnDeleted (new FileSystemEventArgs (WatcherChangeTypes.Deleted, path, filename));
|
||||
Task.Run (() => OnDeleted (new FileSystemEventArgs (WatcherChangeTypes.Deleted, path, filename)));
|
||||
break;
|
||||
case FileAction.Modified:
|
||||
lastData.Name = filename;
|
||||
lastData.ChangeType = WatcherChangeTypes.Changed;
|
||||
OnChanged (new FileSystemEventArgs (WatcherChangeTypes.Changed, path, filename));
|
||||
Task.Run (() => OnChanged (new FileSystemEventArgs (WatcherChangeTypes.Changed, path, filename)));
|
||||
break;
|
||||
case FileAction.RenamedOldName:
|
||||
if (renamed != null) {
|
||||
@@ -536,7 +537,8 @@ namespace System.IO {
|
||||
if (renamed == null) {
|
||||
renamed = new RenamedEventArgs (WatcherChangeTypes.Renamed, path, "", filename);
|
||||
}
|
||||
OnRenamed (renamed);
|
||||
var renamed_ref = renamed;
|
||||
Task.Run (() => OnRenamed (renamed_ref));
|
||||
renamed = null;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1046,6 +1046,10 @@ namespace System.Net.Sockets
|
||||
sockares.EndPoint = remoteEP = sockares.socket.RemapIPEndPoint (ep);
|
||||
}
|
||||
|
||||
if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily)) {
|
||||
throw new ArgumentException(SR.net_invalidAddressList);
|
||||
}
|
||||
|
||||
int error = 0;
|
||||
|
||||
if (sockares.socket.connect_in_progress) {
|
||||
|
||||
@@ -434,7 +434,6 @@ namespace System.Net
|
||||
}
|
||||
|
||||
public string Host {
|
||||
|
||||
get {
|
||||
Uri uri = hostUri ?? Address;
|
||||
return (hostUri == null || !hostHasPort) && Address.IsDefaultPort ?
|
||||
@@ -828,7 +827,7 @@ namespace System.Net
|
||||
WebOperation SendRequest (bool redirecting, BufferOffsetSize writeBuffer, CancellationToken cancellationToken)
|
||||
{
|
||||
lock (locker) {
|
||||
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} redirecting={redirecting}");
|
||||
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} actualUri={actualUri} redirecting={redirecting}");
|
||||
|
||||
WebOperation operation;
|
||||
if (!redirecting) {
|
||||
@@ -858,22 +857,21 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" ||
|
||||
method == "TRACE");
|
||||
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" || method == "TRACE");
|
||||
if (method == null || !send)
|
||||
throw new ProtocolViolationException ("Cannot send data when method is: " + method);
|
||||
throw new ProtocolViolationException (SR.net_nouploadonget);
|
||||
|
||||
if (contentLength == -1 && !sendChunked && !allowBuffering && KeepAlive)
|
||||
throw new ProtocolViolationException ("Content-Length not set");
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
|
||||
throw new ProtocolViolationException ("SendChunked should be true.");
|
||||
throw new InvalidOperationException (SR.net_needchunked);
|
||||
|
||||
WebOperation operation;
|
||||
lock (locker) {
|
||||
if (getResponseCalled)
|
||||
throw new InvalidOperationException ("The operation cannot be performed once the request has been submitted.");
|
||||
throw new InvalidOperationException (SR.net_reqsubmitted);
|
||||
|
||||
operation = currentOperation;
|
||||
if (operation == null) {
|
||||
@@ -900,7 +898,7 @@ namespace System.Net
|
||||
try {
|
||||
return TaskToApm.End<Stream> (asyncResult);
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,7 +907,7 @@ namespace System.Net
|
||||
try {
|
||||
return GetRequestStreamAsync ().Result;
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -925,34 +923,37 @@ namespace System.Net
|
||||
}
|
||||
|
||||
internal static Task<T> RunWithTimeout<T> (
|
||||
Func<CancellationToken, Task<T>> func, int timeout, Action abort)
|
||||
Func<CancellationToken, Task<T>> func, int timeout, Action abort,
|
||||
Func<bool> aborted, CancellationToken cancellationToken)
|
||||
{
|
||||
var cts = CancellationTokenSource.CreateLinkedTokenSource (cancellationToken);
|
||||
// Call `func` here to propagate any potential exception that it
|
||||
// might throw to our caller rather than returning a faulted task.
|
||||
var cts = new CancellationTokenSource ();
|
||||
var workerTask = func (cts.Token);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, abort, cts);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, abort, aborted, cts);
|
||||
}
|
||||
|
||||
static async Task<T> RunWithTimeoutWorker<T> (
|
||||
Task<T> workerTask, int timeout, Action abort,
|
||||
Task<T> workerTask, int timeout, Action abort, Func<bool> aborted,
|
||||
CancellationTokenSource cts)
|
||||
{
|
||||
try {
|
||||
var timeoutTask = Task.Delay (timeout);
|
||||
var ret = await Task.WhenAny (workerTask, timeoutTask).ConfigureAwait (false);
|
||||
if (ret == timeoutTask) {
|
||||
try {
|
||||
cts.Cancel ();
|
||||
abort ();
|
||||
} catch {
|
||||
// Ignore; we report the timeout.
|
||||
}
|
||||
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
|
||||
if (await ServicePointScheduler.WaitAsync (workerTask, timeout).ConfigureAwait (false))
|
||||
return workerTask.Result;
|
||||
try {
|
||||
cts.Cancel ();
|
||||
abort ();
|
||||
} catch {
|
||||
// Ignore; we report the timeout.
|
||||
}
|
||||
return workerTask.Result;
|
||||
#pragma warning disable 4014
|
||||
// Make sure the workerTask's Exception is actually observed.
|
||||
// Fixes https://github.com/mono/mono/issues/10488.
|
||||
workerTask.ContinueWith (t => t.Exception?.GetHashCode (), TaskContinuationOptions.OnlyOnFaulted);
|
||||
#pragma warning restore 4014
|
||||
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
|
||||
} catch (Exception ex) {
|
||||
throw FlattenException (ex);
|
||||
throw GetWebException (ex, aborted ());
|
||||
} finally {
|
||||
cts.Dispose ();
|
||||
}
|
||||
@@ -960,7 +961,11 @@ namespace System.Net
|
||||
|
||||
Task<T> RunWithTimeout<T> (Func<CancellationToken, Task<T>> func)
|
||||
{
|
||||
return RunWithTimeout (func, timeout, Abort);
|
||||
// Call `func` here to propagate any potential exception that it
|
||||
// might throw to our caller rather than returning a faulted task.
|
||||
var cts = new CancellationTokenSource ();
|
||||
var workerTask = func (cts.Token);
|
||||
return RunWithTimeoutWorker (workerTask, timeout, Abort, () => Aborted, cts);
|
||||
}
|
||||
|
||||
async Task<HttpWebResponse> MyGetResponseAsync (CancellationToken cancellationToken)
|
||||
@@ -968,13 +973,6 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
if (method == null)
|
||||
throw new ProtocolViolationException ("Method is null.");
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
|
||||
throw new ProtocolViolationException ("SendChunked should be true.");
|
||||
|
||||
var completion = new WebCompletionSource ();
|
||||
WebOperation operation;
|
||||
lock (locker) {
|
||||
@@ -1010,14 +1008,14 @@ namespace System.Net
|
||||
try {
|
||||
cancellationToken.ThrowIfCancellationRequested ();
|
||||
|
||||
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} {auth_state.NtlmAuthState}");
|
||||
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} Op={operation?.ID} {auth_state.NtlmAuthState}");
|
||||
|
||||
writeStream = await operation.GetRequestStreamInternal ();
|
||||
await writeStream.WriteRequestAsync (cancellationToken).ConfigureAwait (false);
|
||||
|
||||
stream = await operation.GetResponseStream ();
|
||||
|
||||
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} - {stream?.Headers != null}");
|
||||
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} Op={operation?.ID} - {stream?.Headers != null}");
|
||||
|
||||
(response, redirect, mustReadAll, writeBuffer, ntlm) = await GetResponseFromData (
|
||||
stream, cancellationToken).ConfigureAwait (false);
|
||||
@@ -1025,7 +1023,7 @@ namespace System.Net
|
||||
throwMe = GetWebException (e);
|
||||
}
|
||||
|
||||
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
|
||||
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} Op={operation?.ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
|
||||
|
||||
lock (locker) {
|
||||
if (throwMe != null) {
|
||||
@@ -1148,13 +1146,18 @@ namespace System.Net
|
||||
}
|
||||
|
||||
WebException GetWebException (Exception e)
|
||||
{
|
||||
return GetWebException (e, Aborted);
|
||||
}
|
||||
|
||||
static WebException GetWebException (Exception e, bool aborted)
|
||||
{
|
||||
e = FlattenException (e);
|
||||
if (e is WebException wexc) {
|
||||
if (!Aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
|
||||
if (!aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
|
||||
return wexc;
|
||||
}
|
||||
if (Aborted || e is OperationCanceledException || e is ObjectDisposedException)
|
||||
if (aborted || e is OperationCanceledException || e is ObjectDisposedException)
|
||||
return CreateRequestAbortedException ();
|
||||
return new WebException (e.Message, e, WebExceptionStatus.UnknownError, null);
|
||||
}
|
||||
@@ -1169,6 +1172,20 @@ namespace System.Net
|
||||
if (Aborted)
|
||||
throw CreateRequestAbortedException ();
|
||||
|
||||
string transferEncoding = TransferEncoding;
|
||||
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "") {
|
||||
/*
|
||||
* The only way we could get here without already catching this in the
|
||||
* `TransferEncoding` property settor is via HttpClient, which does not
|
||||
* do strict checking on all headers.
|
||||
*
|
||||
* We can remove this check again after switching to the CoreFX version
|
||||
* of HttpClient.
|
||||
*
|
||||
*/
|
||||
throw new InvalidOperationException (SR.net_needchunked);
|
||||
}
|
||||
|
||||
return TaskToApm.Begin (RunWithTimeout (MyGetResponseAsync), callback, state);
|
||||
}
|
||||
|
||||
@@ -1180,7 +1197,7 @@ namespace System.Net
|
||||
try {
|
||||
return TaskToApm.End<HttpWebResponse> (asyncResult);
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1198,7 +1215,7 @@ namespace System.Net
|
||||
try {
|
||||
return GetResponseAsync ().Result;
|
||||
} catch (Exception e) {
|
||||
throw FlattenException (e);
|
||||
throw GetWebException (e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -336,7 +336,6 @@ namespace System.Net
|
||||
|
||||
// Is there anything in the queue?
|
||||
var next = group.GetNextOperation ();
|
||||
Debug ($"{me} no pending operations.");
|
||||
if (next == null)
|
||||
return false;
|
||||
|
||||
@@ -442,6 +441,19 @@ namespace System.Net
|
||||
Interlocked.Decrement (ref currentConnections);
|
||||
}
|
||||
|
||||
public static async Task<bool> WaitAsync (Task workerTask, int millisecondTimeout)
|
||||
{
|
||||
var cts = new CancellationTokenSource ();
|
||||
try {
|
||||
var timeoutTask = Task.Delay (millisecondTimeout, cts.Token);
|
||||
var ret = await Task.WhenAny (workerTask, timeoutTask).ConfigureAwait (false);
|
||||
return ret != timeoutTask;
|
||||
} finally {
|
||||
cts.Cancel ();
|
||||
cts.Dispose ();
|
||||
}
|
||||
}
|
||||
|
||||
class ConnectionGroup
|
||||
{
|
||||
public ServicePointScheduler Scheduler {
|
||||
@@ -568,9 +580,9 @@ namespace System.Net
|
||||
|
||||
public (WebConnection connection, bool created) CreateOrReuseConnection (WebOperation operation, bool force)
|
||||
{
|
||||
Scheduler.Debug ($"CREATE OR REUSE: group={ID} OP={operation.ID} force={force}");
|
||||
Scheduler.Debug ($"CREATE OR REUSE: group={ID} Op={operation.ID} force={force}");
|
||||
var connection = FindIdleConnection (operation);
|
||||
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} OP={operation.ID} force={force} - connection={connection?.ID}");
|
||||
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} Op={operation.ID} force={force} - connection={connection?.ID}");
|
||||
if (connection != null)
|
||||
return (connection, false);
|
||||
|
||||
@@ -600,11 +612,9 @@ namespace System.Net
|
||||
return m_tcs.Task.Wait (millisecondTimeout);
|
||||
}
|
||||
|
||||
public async Task<bool> WaitAsync (int millisecondTimeout)
|
||||
public Task<bool> WaitAsync (int millisecondTimeout)
|
||||
{
|
||||
var timeoutTask = Task.Delay (millisecondTimeout);
|
||||
var ret = await Task.WhenAny (m_tcs.Task, timeoutTask).ConfigureAwait (false);
|
||||
return ret != timeoutTask;
|
||||
return ServicePointScheduler.WaitAsync (m_tcs.Task, millisecondTimeout);
|
||||
}
|
||||
|
||||
public void Set ()
|
||||
|
||||
@@ -371,9 +371,10 @@ namespace System.Net
|
||||
|
||||
async Task WriteChunkTrailer ()
|
||||
{
|
||||
using (var cts = new CancellationTokenSource ()) {
|
||||
var cts = new CancellationTokenSource ();
|
||||
try {
|
||||
cts.CancelAfter (WriteTimeout);
|
||||
var timeoutTask = Task.Delay (WriteTimeout);
|
||||
var timeoutTask = Task.Delay (WriteTimeout, cts.Token);
|
||||
while (true) {
|
||||
var completion = new WebCompletionSource ();
|
||||
var oldCompletion = Interlocked.CompareExchange (ref pendingWrite, completion, null);
|
||||
@@ -385,13 +386,13 @@ namespace System.Net
|
||||
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
|
||||
}
|
||||
|
||||
try {
|
||||
await WriteChunkTrailer_inner (cts.Token).ConfigureAwait (false);
|
||||
} catch {
|
||||
// Intentionally eating exceptions.
|
||||
} finally {
|
||||
pendingWrite = null;
|
||||
}
|
||||
await WriteChunkTrailer_inner (cts.Token).ConfigureAwait (false);
|
||||
} catch {
|
||||
// Intentionally eating exceptions.
|
||||
} finally {
|
||||
pendingWrite = null;
|
||||
cts.Cancel ();
|
||||
cts.Dispose ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace System.Net
|
||||
ReadTimeout, () => {
|
||||
Operation.Abort ();
|
||||
InnerStream.Dispose ();
|
||||
}).ConfigureAwait (false);
|
||||
}, () => Operation.Aborted, cancellationToken).ConfigureAwait (false);
|
||||
} catch (Exception e) {
|
||||
throwMe = GetReadException (WebExceptionStatus.ReceiveFailure, e, "ReadAsync");
|
||||
}
|
||||
@@ -404,22 +404,28 @@ namespace System.Net
|
||||
return;
|
||||
}
|
||||
|
||||
var timeoutTask = Task.Delay (ReadTimeout);
|
||||
var completion = new WebCompletionSource ();
|
||||
while (true) {
|
||||
/*
|
||||
* 'currentRead' is set by ReadAsync().
|
||||
*/
|
||||
cancellationToken.ThrowIfCancellationRequested ();
|
||||
var oldCompletion = Interlocked.CompareExchange (ref pendingRead, completion, null);
|
||||
if (oldCompletion == null)
|
||||
break;
|
||||
var timeoutCts = new CancellationTokenSource ();
|
||||
try {
|
||||
var timeoutTask = Task.Delay (ReadTimeout, timeoutCts.Token);
|
||||
while (true) {
|
||||
/*
|
||||
* 'currentRead' is set by ReadAsync().
|
||||
*/
|
||||
cancellationToken.ThrowIfCancellationRequested ();
|
||||
var oldCompletion = Interlocked.CompareExchange (ref pendingRead, completion, null);
|
||||
if (oldCompletion == null)
|
||||
break;
|
||||
|
||||
// ReadAsync() is in progress.
|
||||
var oldReadTask = oldCompletion.WaitForCompletion ();
|
||||
var anyTask = await Task.WhenAny (oldReadTask, timeoutTask).ConfigureAwait (false);
|
||||
if (anyTask == timeoutTask)
|
||||
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
|
||||
// ReadAsync() is in progress.
|
||||
var oldReadTask = oldCompletion.WaitForCompletion ();
|
||||
var anyTask = await Task.WhenAny (oldReadTask, timeoutTask).ConfigureAwait (false);
|
||||
if (anyTask == timeoutTask)
|
||||
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
|
||||
}
|
||||
} finally {
|
||||
timeoutCts.Cancel ();
|
||||
timeoutCts.Dispose ();
|
||||
}
|
||||
|
||||
WebConnection.Debug ($"{ME} READ ALL ASYNC #1");
|
||||
@@ -652,7 +658,7 @@ namespace System.Net
|
||||
else
|
||||
StatusDescription = string.Empty;
|
||||
|
||||
if (pos >= buffer.Size)
|
||||
if (pos >= buffer.Offset)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ System/RemoteExecutorTests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Net/SslProtocolSupport.cs
|
||||
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/*.cs:TlsAlertsMatchWindowsInterop.cs
|
||||
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/System/Security/Authentication/ExtendedProtection/*.cs
|
||||
../../../external/corefx/src/System.Net.Security/tests/UnitTests/Fakes/*.cs:FakeSslState.cs,FakeLazyAsyncResult.cs
|
||||
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/Fakes/*.cs:FakeSslState.cs,FakeLazyAsyncResult.cs
|
||||
../../../external/corefx/src/Common/src/System/Net/Logging/NetEventSource.Common.cs
|
||||
../../../external/corefx/src/Common/src/System/Net/InternalException.cs
|
||||
../../../external/corefx/src/System.Net.Security/src/System/Net/Security/TlsAlertMessage.cs
|
||||
@@ -56,7 +56,7 @@ System/RemoteExecutorTests.cs
|
||||
#../../../external/corefx/src/System.Net.Ping/tests/FunctionalTests/*.cs
|
||||
|
||||
# System.Net.WebSockets
|
||||
../../../external/corefx/src/System.Net.WebSockets/tests/*.cs
|
||||
#../../../external/corefx/src/System.Net.WebSockets/tests/*.cs
|
||||
|
||||
# System.Net.WebProxy
|
||||
#../../../external/corefx/src/System.Net.WebProxy/tests/*.cs
|
||||
|
||||
@@ -254,12 +254,11 @@ namespace MonoTests.System.Net.Sockets
|
||||
{
|
||||
Socket srv = CreateServer (NetworkHelpers.FindFreePort ());
|
||||
ClientSocket clnt = new ClientSocket (srv.LocalEndPoint);
|
||||
Thread th = new Thread (new ThreadStart (clnt.ConnectSleepClose));
|
||||
Socket acc = null;
|
||||
try {
|
||||
th.Start ();
|
||||
acc = srv.Accept ();
|
||||
clnt.Connect ();
|
||||
clnt.Write ();
|
||||
acc = srv.Accept ();
|
||||
ArrayList list = new ArrayList ();
|
||||
ArrayList empty = new ArrayList ();
|
||||
list.Add (acc);
|
||||
@@ -279,6 +278,7 @@ namespace MonoTests.System.Net.Sockets
|
||||
if (acc != null)
|
||||
acc.Close ();
|
||||
srv.Close ();
|
||||
clnt.Close ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,10 +300,13 @@ namespace MonoTests.System.Net.Sockets
|
||||
sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
}
|
||||
|
||||
public void ConnectSleepClose ()
|
||||
public void Connect ()
|
||||
{
|
||||
sock.Connect (ep);
|
||||
Thread.Sleep (2000);
|
||||
}
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
sock.Close ();
|
||||
}
|
||||
|
||||
|
||||
@@ -3457,6 +3457,7 @@ namespace MonoTests.System.Net
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
|
||||
// Bug6737
|
||||
// This test is supposed to fail prior to .NET 4.0
|
||||
public void Post_EmptyRequestStream ()
|
||||
|
||||
@@ -1221,6 +1221,7 @@ namespace MonoTests.System.Net
|
||||
|
||||
[Test]
|
||||
[Category ("StaticLinkedAotNotWorking")] // Native MPH loading issues
|
||||
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
|
||||
@@ -1685,10 +1685,12 @@ namespace MonoTests.System.Net
|
||||
// We throw a PlatformNotSupportedException deeper, which is caught and re-thrown as WebException
|
||||
[ExpectedException (typeof (WebException))]
|
||||
#endif
|
||||
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
|
||||
[Category ("InetAccess")]
|
||||
public void GetWebRequestOverriding ()
|
||||
{
|
||||
GetWebRequestOverridingTestClass testObject = new GetWebRequestOverridingTestClass ();
|
||||
testObject.DownloadData ("http://www.mono-project.com");
|
||||
testObject.DownloadData ("http://www.example.com");
|
||||
|
||||
Assert.IsTrue (testObject.overridedCodeRan, "Overrided code wasn't called");
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace MonoTests.System.Net
|
||||
WebClient wc = new WebClient ();
|
||||
string filename = Path.GetTempFileName ();
|
||||
|
||||
var task = wc.DownloadFileTaskAsync ("http://www.mono-project.com/", filename);
|
||||
var task = wc.DownloadFileTaskAsync ("http://www.example.com/", filename);
|
||||
Assert.IsTrue (task.Wait (15000));
|
||||
Assert.IsTrue (task.IsCompleted);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !MOBILE
|
||||
#if MONO_FEATURE_CAS
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace MonoTests.System.Threading {
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if MONODROID
|
||||
[Ignore("https://github.com/mono/mono/issues/8349")]
|
||||
#endif
|
||||
public void WaitHandle_WaitOne_SynchronizationContext ()
|
||||
{
|
||||
var e = new ManualResetEvent(false);
|
||||
|
||||
@@ -75,6 +75,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: InternalsVisibleTo ("System, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
|
||||
[assembly: InternalsVisibleTo ("System.Core, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
|
||||
[assembly: InternalsVisibleTo ("System.Numerics, PublicKey=00000000000000000400000000000000")]
|
||||
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
<type fullname="System.Exception" preserve="fields">
|
||||
<!-- used in mini-exceptions.c (if trace is enabled) -->
|
||||
<method name="get_Message" />
|
||||
<method name="FixRemotingException" feature="remoting" />
|
||||
</type>
|
||||
|
||||
<!-- exception.c (mono_get_exception_execution_engine) -->
|
||||
@@ -229,6 +230,9 @@
|
||||
<method signature="System.Void .ctor(System.String)" />
|
||||
</type>
|
||||
|
||||
<!-- reflection.c mono_get_reflection_missing_object -->
|
||||
<type fullname="System.Missing" preserve="fields" />
|
||||
|
||||
<type fullname="System.MarshalByRefObject" preserve="fields" feature="remoting" />
|
||||
|
||||
<type fullname="System.MethodAccessException">
|
||||
|
||||
@@ -98,7 +98,7 @@ endif
|
||||
COREFX_FLAGS := -d:FEATURE_PORTABLE_SPAN
|
||||
|
||||
WARNING_ABOUT_DISABLED_WARNING=1635
|
||||
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) $(COREFX_FLAGS)
|
||||
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,3019,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) $(COREFX_FLAGS)
|
||||
DEFAULT_REFERENCES =
|
||||
|
||||
TEST_LIB_REFS = System.Core System
|
||||
@@ -116,6 +116,11 @@ endif
|
||||
TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe \
|
||||
-define:MONO_DATACONVERTER_STATIC_METHODS $(TEST_RESX_RESOURCES:%=-resource:%) -resource:LinkerDescriptor/mscorlib_test.xml,$(test_lib:.dll=.xml)
|
||||
|
||||
ifeq ($(PROFILE),net_4_x)
|
||||
LIB_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
|
||||
TEST_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
|
||||
endif
|
||||
|
||||
|
||||
CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
|
||||
ifdef CC_PROFILE
|
||||
|
||||
@@ -81,22 +81,68 @@ namespace Mono {
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern string ExceptionToState_internal (Exception exc, out ulong portable_hash, out ulong unportable_hash);
|
||||
|
||||
static Tuple<String, ulong, ulong>
|
||||
ExceptionToState (Exception exc)
|
||||
{
|
||||
ulong portable_hash;
|
||||
ulong unportable_hash;
|
||||
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
|
||||
|
||||
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
|
||||
}
|
||||
|
||||
|
||||
#if !MOBILE
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void DisableMicrosoftTelemetry (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
|
||||
static extern void DisableMicrosoftTelemetry ();
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath);
|
||||
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str)
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
|
||||
|
||||
static void SendMicrosoftTelemetry (string payload_str, ulong portable_hash, ulong unportable_hash)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
|
||||
using (var payload_chars = RuntimeMarshal.MarshalString (payload_str))
|
||||
{
|
||||
SendMicrosoftTelemetry_internal (payload_chars.Value, portable_hash, unportable_hash);
|
||||
}
|
||||
} else {
|
||||
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
|
||||
}
|
||||
}
|
||||
|
||||
// Usage:
|
||||
//
|
||||
// catch (Exception exc) {
|
||||
// var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
// var m = monoType.GetMethod("SendExceptionToTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
// m.Invoke(null, new object[] { exc });
|
||||
// }
|
||||
static void SendExceptionToTelemetry (Exception exc)
|
||||
{
|
||||
ulong portable_hash;
|
||||
ulong unportable_hash;
|
||||
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
|
||||
SendMicrosoftTelemetry (payload_str, portable_hash, unportable_hash);
|
||||
}
|
||||
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
|
||||
using (var appBundleID_chars = RuntimeMarshal.MarshalString (appBundleID_str))
|
||||
using (var appSignature_chars = RuntimeMarshal.MarshalString (appSignature_str))
|
||||
using (var appVersion_chars = RuntimeMarshal.MarshalString (appVersion_str))
|
||||
using (var merpGUIPath_chars = RuntimeMarshal.MarshalString (merpGUIPath_str))
|
||||
using (var eventType_chars = RuntimeMarshal.MarshalString (eventType_str))
|
||||
using (var appPath_chars = RuntimeMarshal.MarshalString (appPath_str))
|
||||
{
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value);
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, eventType_chars.Value, appPath_chars.Value);
|
||||
}
|
||||
} else {
|
||||
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace System
|
||||
|
||||
public static readonly String Empty;
|
||||
|
||||
public unsafe static implicit operator ReadOnlySpan<char> (String value)
|
||||
internal unsafe static ReadOnlySpan<char> ToReadOnlySpan (String value)
|
||||
{
|
||||
if (value == null)
|
||||
return default;
|
||||
@@ -87,6 +87,13 @@ namespace System
|
||||
return -1;
|
||||
}
|
||||
|
||||
[CLSCompliant(false)]
|
||||
public static String Concat(Object arg0, Object arg1, Object arg2, Object arg3, __arglist)
|
||||
{
|
||||
// Added to maintain backward compatibility, see https://github.com/mono/mono/issues/9996
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
internal unsafe int IndexOfUncheckedIgnoreCase (string value, int startIndex, int count)
|
||||
{
|
||||
int valueLen = value.Length;
|
||||
|
||||
@@ -6,6 +6,8 @@ using System.Text;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Mono;
|
||||
|
||||
namespace System.IO {
|
||||
|
||||
class LogcatTextWriter : TextWriter {
|
||||
@@ -74,8 +76,8 @@ namespace System.IO {
|
||||
}
|
||||
}
|
||||
|
||||
fixed (byte *b_message = Encoding.UTF8.GetBytes(message + '\0')) {
|
||||
Log (b_message);
|
||||
using (SafeStringMarshal str = new SafeStringMarshal(message)) {
|
||||
Log ((byte*) str.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace System.Reflection.Emit {
|
||||
|
||||
CreateDynMethod ();
|
||||
|
||||
deleg = Delegate.CreateDelegate (delegateType, this);
|
||||
deleg = Delegate.CreateDelegate (delegateType, null, this);
|
||||
return deleg;
|
||||
}
|
||||
|
||||
|
||||
+37
-12
@@ -30,7 +30,7 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if FULL_AOT_RUNTIME
|
||||
#if !FEATURE_CRYPTO_CONFIGURABLE
|
||||
|
||||
// This is a special version of CryptoConfig that is not configurable and
|
||||
// every "choice" is statiscally compiled. As long as CreateFromName is not
|
||||
@@ -38,17 +38,13 @@
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Security.Cryptography {
|
||||
|
||||
[ComVisible (true)]
|
||||
public partial class CryptoConfig {
|
||||
|
||||
public static void AddAlgorithm (Type algorithm, params string[] names)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public static void AddOID (string oid, params string[] names)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
@@ -61,12 +57,12 @@ namespace System.Security.Cryptography {
|
||||
return CreateFromName (name, null);
|
||||
}
|
||||
|
||||
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
|
||||
public static object CreateFromName (string name, params object[] args)
|
||||
{
|
||||
if (name == null)
|
||||
throw new ArgumentNullException ("name");
|
||||
|
||||
// TODO: These ignore args
|
||||
switch (name.ToLowerInvariant ()) {
|
||||
case "system.security.cryptography.dsacryptoserviceprovider":
|
||||
case "system.security.cryptography.dsa":
|
||||
@@ -156,8 +152,8 @@ namespace System.Security.Cryptography {
|
||||
case "system.security.cryptography.hashalgorithm":
|
||||
case "system.security.cryptography.sha1":
|
||||
case "system.security.cryptography.sha1cryptoserviceprovider":
|
||||
case "system.security.cryptography.sha1cng":
|
||||
case "sha1":
|
||||
case "system.security.cryptography.sha1cng":
|
||||
case "sha":
|
||||
case "http://www.w3.org/2000/09/xmldsig#sha1":
|
||||
return new SHA1CryptoServiceProvider ();
|
||||
@@ -193,23 +189,47 @@ namespace System.Security.Cryptography {
|
||||
case "tripledes":
|
||||
case "3des":
|
||||
return new TripleDESCryptoServiceProvider ();
|
||||
|
||||
// These are not yet linker friendly
|
||||
case "x509chain":
|
||||
name = "System.Security.Cryptography.X509Certificates.X509Chain, System";
|
||||
break;
|
||||
case "2.5.29.15":
|
||||
name = "System.Security.Cryptography.X509Certificates.X509KeyUsageExtension, System";
|
||||
break;
|
||||
case "2.5.29.19":
|
||||
name = "System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension, System";
|
||||
break;
|
||||
case "2.5.29.14":
|
||||
name = "System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension, System";
|
||||
break;
|
||||
case "2.5.29.37":
|
||||
name = "System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension, System";
|
||||
break;
|
||||
case "aes":
|
||||
#if FULL_AOT_DESKTOP // TODO: why is this special cased? we could use AesManaged like other full AOT profiles
|
||||
name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core";
|
||||
#else
|
||||
#if MONOTOUCH || XAMMAC
|
||||
name = "System.Security.Cryptography.AesManaged, System.Core";
|
||||
#else
|
||||
name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
lock (lockObject) {
|
||||
Type algoClass = null;
|
||||
if (algorithms?.TryGetValue (name, out algoClass) == true) {
|
||||
try {
|
||||
return Activator.CreateInstance (algoClass, args);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// last resort, the request type might be available (if care is taken for the type not to be linked
|
||||
// away) and that can allow some 3rd party code to work (e.g. extra algorithms) and make a few more
|
||||
// unit tests happy
|
||||
return Activator.CreateInstance (Type.GetType (name));
|
||||
return Activator.CreateInstance (Type.GetType (name), args);
|
||||
}
|
||||
catch {
|
||||
// method doesn't throw any exception
|
||||
@@ -272,6 +292,11 @@ namespace System.Security.Cryptography {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static void Initialize ()
|
||||
{
|
||||
algorithms = new Dictionary<string, Type> (StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,43 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Security.Cryptography {
|
||||
|
||||
public partial class CryptoConfig {
|
||||
public partial class CryptoConfig
|
||||
{
|
||||
static readonly object lockObject = new object ();
|
||||
static Dictionary<string,Type> algorithms;
|
||||
|
||||
public static void AddAlgorithm (Type algorithm, params string[] names)
|
||||
{
|
||||
if (algorithm == null)
|
||||
throw new ArgumentNullException (nameof (algorithm));
|
||||
if (!algorithm.IsVisible)
|
||||
throw new ArgumentException ("Algorithms added to CryptoConfig must be accessable from outside their assembly.", nameof (algorithm));
|
||||
if (names == null)
|
||||
throw new ArgumentNullException (nameof (names));
|
||||
|
||||
var algorithmNames = new string [names.Length];
|
||||
Array.Copy (names, algorithmNames, algorithmNames.Length);
|
||||
|
||||
foreach (string name in algorithmNames) {
|
||||
if (string.IsNullOrEmpty (name)) {
|
||||
throw new ArgumentException ("CryptoConfig cannot add a mapping for a null or empty name.");
|
||||
}
|
||||
}
|
||||
|
||||
lock (lockObject) {
|
||||
if (algorithms == null) {
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
foreach (string name in algorithmNames) {
|
||||
algorithms [name] = algorithm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] EncodeOID (string str)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
#if FEATURE_CRYPTO_CONFIGURABLE
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -50,8 +50,6 @@ namespace System.Security.Cryptography {
|
||||
[ComVisible (true)]
|
||||
public partial class CryptoConfig {
|
||||
|
||||
static private object lockObject;
|
||||
static private Dictionary<string,Type> algorithms;
|
||||
static private Dictionary<string,string> unresolved_algorithms;
|
||||
static private Dictionary<string,string> oids;
|
||||
|
||||
@@ -281,12 +279,6 @@ public partial class CryptoConfig {
|
||||
// SHA512 provider
|
||||
const string nameSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider";
|
||||
const string defaultSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider" + system_core_assembly;
|
||||
static CryptoConfig ()
|
||||
{
|
||||
// lock(this) is bad
|
||||
// http://msdn.microsoft.com/library/en-us/dnaskdr/html/askgui06032003.asp?frame=true
|
||||
lockObject = new object ();
|
||||
}
|
||||
|
||||
private static void Initialize ()
|
||||
{
|
||||
@@ -562,20 +554,6 @@ public partial class CryptoConfig {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void AddAlgorithm (Type algorithm, params string[] names)
|
||||
{
|
||||
if (algorithm == null)
|
||||
throw new ArgumentNullException ("algorithm");
|
||||
if (names == null)
|
||||
throw new ArgumentNullException ("names");
|
||||
|
||||
foreach (string name in names) {
|
||||
if (String.IsNullOrWhiteSpace (name))
|
||||
throw new ArithmeticException ("names");
|
||||
algorithms [name] = algorithm;
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddOID (string oid, params string[] names)
|
||||
{
|
||||
if (oid == null)
|
||||
|
||||
@@ -55,7 +55,9 @@ namespace System.Threading
|
||||
static int WaitOneNative (SafeHandle waitableSafeHandle, uint millisecondsTimeout, bool hasThreadAffinity, bool exitContext)
|
||||
{
|
||||
bool release = false;
|
||||
#if !MONODROID
|
||||
var context = SynchronizationContext.Current;
|
||||
#endif
|
||||
try {
|
||||
waitableSafeHandle.DangerousAddRef (ref release);
|
||||
|
||||
@@ -64,6 +66,7 @@ namespace System.Threading
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
|
||||
#if !MONODROID
|
||||
// HACK: Documentation (and public posts by experts like Joe Duffy) suggests that
|
||||
// users must first call SetWaitNotificationRequired to flag that a given synchronization
|
||||
// context overrides .Wait. Because invoking the Wait method is somewhat expensive, we use
|
||||
@@ -79,7 +82,9 @@ namespace System.Threading
|
||||
false,
|
||||
(int)millisecondsTimeout
|
||||
);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
unsafe {
|
||||
IntPtr handle = waitableSafeHandle.DangerousGetHandle ();
|
||||
return Wait_internal (&handle, 1, false, (int)millisecondsTimeout);
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace System {
|
||||
offset++;
|
||||
|
||||
offset += ((int) number) * intOffset;
|
||||
return GetInteger (buffer, offset);
|
||||
return GetInt16 (buffer, offset);
|
||||
}
|
||||
|
||||
public string Get (TermInfoStrings tstr)
|
||||
@@ -222,27 +222,6 @@ namespace System {
|
||||
return (short) (uno + dos * 256);
|
||||
}
|
||||
|
||||
int GetInt32 (byte [] buffer, int offset)
|
||||
{
|
||||
int b1 = (int) buffer [offset];
|
||||
int b2 = (int) buffer [offset + 1];
|
||||
int b3 = (int) buffer [offset + 2];
|
||||
int b4 = (int) buffer [offset + 3];
|
||||
if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
|
||||
return -1;
|
||||
|
||||
return b1 + b2 << 8 + b3 << 16 + b4 << 24;
|
||||
}
|
||||
|
||||
int GetInteger (byte [] buffer, int offset)
|
||||
{
|
||||
if (intOffset == 2)
|
||||
return GetInt16 (buffer, offset);
|
||||
else
|
||||
// intOffset == 4
|
||||
return GetInt32 (buffer, offset);
|
||||
}
|
||||
|
||||
string GetString (byte [] buffer, int offset)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
@@ -266,11 +266,12 @@ namespace System
|
||||
}
|
||||
}
|
||||
#if LIBC
|
||||
const string DefaultTimeZoneDirectory = "/usr/share/zoneinfo";
|
||||
static string timeZoneDirectory;
|
||||
static string TimeZoneDirectory {
|
||||
get {
|
||||
if (timeZoneDirectory == null)
|
||||
timeZoneDirectory = "/usr/share/zoneinfo";
|
||||
timeZoneDirectory = readlink (DefaultTimeZoneDirectory) ?? DefaultTimeZoneDirectory;
|
||||
return timeZoneDirectory;
|
||||
}
|
||||
set {
|
||||
|
||||
@@ -1286,6 +1286,35 @@ namespace MonoTests.System.IO
|
||||
}
|
||||
}
|
||||
|
||||
/* regression test from https://github.com/xamarin/xamarin-macios/issues/3929 */
|
||||
[Test]
|
||||
public void LastWriteTimeSubMsCopy ()
|
||||
{
|
||||
string path = tmpFolder + Path.DirectorySeparatorChar + "lastWriteTimeSubMs";
|
||||
if (File.Exists (path))
|
||||
File.Delete (path);
|
||||
|
||||
string path_copy = tmpFolder + Path.DirectorySeparatorChar + "LastWriteTimeSubMs_copy";
|
||||
if (File.Exists (path_copy))
|
||||
File.Delete (path_copy);
|
||||
|
||||
try {
|
||||
var fmt = "HH:mm:ss:fffffff";
|
||||
for (var i = 0; i < 200; i++) {
|
||||
File.WriteAllText (path, "");
|
||||
var untouched = File.GetLastWriteTimeUtc (path);
|
||||
File.Copy (path, path_copy);
|
||||
var copy_touched = File.GetLastWriteTimeUtc (path_copy);
|
||||
|
||||
Assert.IsTrue (copy_touched >= untouched, $"Iteration #{i} failed, untouched: {untouched.ToString (fmt)} copy_touched: {copy_touched.ToString (fmt)}");
|
||||
File.Delete (path_copy);
|
||||
}
|
||||
} finally {
|
||||
DeleteFile (path);
|
||||
DeleteFile (path_copy);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetCreationTime_Path_Null ()
|
||||
{
|
||||
|
||||
@@ -744,6 +744,55 @@ namespace MonoTests.System.Reflection.Emit
|
||||
Assert.AreEqual (typeof (TypedRefTarget), TypedReference.GetTargetType (tr));
|
||||
}
|
||||
#endif
|
||||
|
||||
static Action GenerateProblematicMethod (bool add_extra, bool mismatch = false, bool use_vts = false)
|
||||
{
|
||||
Type this_type = typeof(object);
|
||||
Type bound_type = typeof(object);
|
||||
if (mismatch) {
|
||||
this_type = typeof (string);
|
||||
bound_type = typeof (DynamicMethodTest);
|
||||
} else if (use_vts) {
|
||||
this_type = typeof (int);
|
||||
bound_type = typeof (long);
|
||||
}
|
||||
|
||||
Type[] args;
|
||||
if (add_extra)
|
||||
args = new[] { this_type };
|
||||
else
|
||||
args = new Type [0];
|
||||
|
||||
var mb = new DynamicMethod("Peek", null, args, bound_type, true);
|
||||
var il = mb.GetILGenerator ();
|
||||
il.Emit(OpCodes.Ret);
|
||||
return (Action) mb.CreateDelegate(typeof(Action));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExtraArgGetsIgnored ()
|
||||
{
|
||||
GenerateProblematicMethod (true) ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExactNumberOfArgsWork ()
|
||||
{
|
||||
GenerateProblematicMethod (false) ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExtraArgWithMismatchedTypes ()
|
||||
{
|
||||
GenerateProblematicMethod (true, mismatch: true) ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
public void ExtraArgWithValueType ()
|
||||
{
|
||||
GenerateProblematicMethod (true, use_vts: true) ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
#if !MONOTOUCH && !FULL_AOT_RUNTIME
|
||||
@@ -890,6 +891,60 @@ namespace MonoTests.System.Reflection
|
||||
}
|
||||
}
|
||||
|
||||
static void EnsureMethodExists (Type type, string name, params Type[] parameterTypes)
|
||||
{
|
||||
var method = type.GetTypeInfo ().GetDeclaredMethods (name)
|
||||
.SingleOrDefault (m => m.GetParameters ().Select (p => p.ParameterType).SequenceEqual (parameterTypes));
|
||||
Assert.IsNotNull (method, $"{type}.{name}");
|
||||
}
|
||||
|
||||
public void EnsureEntityFrameworkMethodsExist ()
|
||||
{
|
||||
// EntityFramework6 relies on the following methods
|
||||
// see https://github.com/aspnet/EntityFramework6/blob/master/src/EntityFramework/Core/Objects/ELinq/MethodCallTranslator.cs#L846
|
||||
// also https://github.com/mono/mono/pull/10452
|
||||
EnsureMethodExists (typeof (Math), "Ceiling", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Math), "Ceiling", typeof (double));
|
||||
EnsureMethodExists (typeof (Math), "Floor", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Math), "Floor", typeof (double));
|
||||
EnsureMethodExists (typeof (Math), "Round", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Math), "Round", typeof (double));
|
||||
EnsureMethodExists (typeof (Math), "Round", typeof (decimal), typeof (int));
|
||||
EnsureMethodExists (typeof (Math), "Round", typeof (double), typeof (int));
|
||||
EnsureMethodExists (typeof (Decimal), "Floor", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Decimal), "Ceiling", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Decimal), "Round", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Decimal), "Round", typeof (decimal), typeof (int));
|
||||
EnsureMethodExists (typeof (String), "Replace", typeof (String), typeof (String));
|
||||
EnsureMethodExists (typeof (String), "ToLower");
|
||||
EnsureMethodExists (typeof (String), "ToUpper");
|
||||
EnsureMethodExists (typeof (String), "Trim");
|
||||
EnsureMethodExists (typeof (Math), "Truncate", typeof (decimal));
|
||||
EnsureMethodExists (typeof (Math), "Truncate", typeof (double));
|
||||
EnsureMethodExists (typeof (Math), "Pow", typeof (double), typeof (double));
|
||||
EnsureMethodExists (typeof (Guid), "NewGuid");
|
||||
EnsureMethodExists (typeof (String), "Contains", typeof (string));
|
||||
EnsureMethodExists (typeof (String), "IndexOf", typeof (string));
|
||||
EnsureMethodExists (typeof (String), "StartsWith", typeof (string));
|
||||
EnsureMethodExists (typeof (String), "EndsWith", typeof (string));
|
||||
EnsureMethodExists (typeof (String), "Substring", typeof (int));
|
||||
EnsureMethodExists (typeof (String), "Substring", typeof (int), typeof (int));
|
||||
EnsureMethodExists (typeof (String), "Remove", typeof (int));
|
||||
EnsureMethodExists (typeof (String), "Remove", typeof (int), typeof (int));
|
||||
EnsureMethodExists (typeof (String), "IsNullOrEmpty", typeof (string));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string), typeof (string));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string), typeof (string), typeof (string));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object), typeof (object));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object), typeof (object), typeof (object));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (object[]));
|
||||
EnsureMethodExists (typeof (String), "Concat", typeof (string[]));
|
||||
EnsureMethodExists (typeof (String), "Trim", typeof (Char[]));
|
||||
EnsureMethodExists (typeof (String), "TrimStart", typeof (Char[]));
|
||||
EnsureMethodExists (typeof (String), "TrimEnd", typeof (Char[]));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLocalVariableTypes ()
|
||||
{
|
||||
|
||||
@@ -37,6 +37,10 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
[TestFixture]
|
||||
public class CryptoConfigTest {
|
||||
|
||||
public class FakeAlgorithm
|
||||
{
|
||||
}
|
||||
|
||||
void CreateFromName (string name, string objectname)
|
||||
{
|
||||
object o = CryptoConfig.CreateFromName (name);
|
||||
@@ -137,20 +141,9 @@ public class CryptoConfigTest {
|
||||
// additional names (URL) used for XMLDSIG (System.Security.Cryptography.Xml)
|
||||
// URL taken from http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
|
||||
[Test]
|
||||
#if MOBILE
|
||||
[Ignore ("System.Security.dll is not part of Moonlight, MonoTouch and Mono for Android")]
|
||||
#endif
|
||||
public void CreateFromURL ()
|
||||
{
|
||||
// URL used in SignatureMethod element
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.RSAPKCS1SHA256SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.RSAPKCS1SHA384SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.RSAPKCS1SHA512SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "System.Security.Cryptography.HMACSHA1");
|
||||
// URL used in DigestMethod element
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
|
||||
#if FEATURE_CRYPTO_CONFIGURABLE
|
||||
// URL used in Canonicalization or Transform elements
|
||||
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315", "System.Security.Cryptography.Xml.XmlDsigC14NTransform");
|
||||
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments", "System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform");
|
||||
@@ -171,6 +164,17 @@ public class CryptoConfigTest {
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/DSAKeyValue", "System.Security.Cryptography.Xml.DSAKeyValue");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/RSAKeyValue", "System.Security.Cryptography.Xml.RSAKeyValue");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig# RetrievalMethod", "System.Security.Cryptography.Xml.KeyInfoRetrievalMethod");
|
||||
#endif
|
||||
// URL used in SignatureMethod element
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.RSAPKCS1SHA256SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.RSAPKCS1SHA384SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.RSAPKCS1SHA512SignatureDescription");
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "System.Security.Cryptography.HMACSHA1");
|
||||
// URL used in DigestMethod element
|
||||
CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
|
||||
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha256", "System.Security.Cryptography.SHA256Managed");
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha384", null);
|
||||
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha512", "System.Security.Cryptography.SHA512Managed");
|
||||
@@ -402,6 +406,14 @@ public class CryptoConfigTest {
|
||||
CryptoConfig cc = new CryptoConfig ();
|
||||
Assert.AreEqual ("System.Security.Cryptography.CryptoConfig", cc.ToString ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddAlgorithm ()
|
||||
{
|
||||
CryptoConfig.AddAlgorithm (typeof (FakeAlgorithm), "test");
|
||||
Assert.IsNotNull (CryptoConfig.CreateFromName ("test"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -309,17 +309,16 @@ public class SignatureDescriptionTest {
|
||||
[Test]
|
||||
public void RSASignatureDescription ()
|
||||
{
|
||||
// TODO: this would be cleaner with NUnit TestCase'es but they're NUnit 2.5+ :(
|
||||
#if FULL_AOT_RUNTIME || MONOTOUCH || MONODROID || XAMMAC || XAMMAC_4_5
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1CryptoServiceProvider");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Managed");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Managed");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Managed");
|
||||
#else
|
||||
#if FEATURE_CRYPTO_CONFIGURABLE
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1Cng");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Cng");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Cng");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Cng");
|
||||
#else
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1CryptoServiceProvider");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Managed");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Managed");
|
||||
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Managed");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -339,7 +339,6 @@ namespace MonoTests.System.Threading.Tasks
|
||||
bool result = false;
|
||||
|
||||
Func<int, int> func = (i) => {
|
||||
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread);
|
||||
result = true; return i + 3;
|
||||
};
|
||||
|
||||
@@ -445,14 +444,12 @@ namespace MonoTests.System.Threading.Tasks
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("MacNotWorking")] // Randomly fails - https://bugzilla.xamarin.com/show_bug.cgi?id=51255
|
||||
public void FromAsync_Completed ()
|
||||
{
|
||||
var completed = new CompletedAsyncResult ();
|
||||
bool? valid = null;
|
||||
|
||||
Action<IAsyncResult> end = l => {
|
||||
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#2");
|
||||
valid = l == completed;
|
||||
};
|
||||
Task task = factory.FromAsync (completed, end);
|
||||
@@ -557,7 +554,6 @@ namespace MonoTests.System.Threading.Tasks
|
||||
factory = new TaskFactory (scheduler);
|
||||
|
||||
Task task = factory.FromAsync (result, l => {
|
||||
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread, "#6");
|
||||
called = true;
|
||||
}, TaskCreationOptions.AttachedToParent);
|
||||
|
||||
@@ -582,8 +578,6 @@ namespace MonoTests.System.Threading.Tasks
|
||||
if ((TaskCreationOptions) c != TaskCreationOptions.AttachedToParent)
|
||||
Assert.Fail ("#11");
|
||||
|
||||
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#12");
|
||||
|
||||
called2 = true;
|
||||
var ar = Task.CompletedTask;
|
||||
b.Invoke (ar);
|
||||
|
||||
@@ -10,13 +10,17 @@ namespace MonoTests.System.Threading.Tasks
|
||||
{
|
||||
[TestFixture]
|
||||
public class ThreadPrincipalTests
|
||||
{
|
||||
{
|
||||
|
||||
#if !MONOTOUCH // Uses LogicalCallContext
|
||||
[Test]
|
||||
public void PrincipalFlowsToAsyncTask ()
|
||||
{
|
||||
var t = _PrincipalFlowsToAsyncTask();
|
||||
t.GetAwaiter().GetResult();
|
||||
/* run in different thread to work around problems on platforms
|
||||
* where SynchronizationContext is set (e.g. Xamarin.iOS) */
|
||||
Assert.IsTrue (Task.Run (async () => await _PrincipalFlowsToAsyncTask ()).Wait (5000));
|
||||
}
|
||||
#endif
|
||||
|
||||
public async Task _PrincipalFlowsToAsyncTask ()
|
||||
{
|
||||
|
||||
@@ -124,8 +124,8 @@ namespace MonoTests.System
|
||||
} catch (DllNotFoundException e) {
|
||||
return;
|
||||
}
|
||||
#if !MONOTOUCH && !XAMMAC && !XAMMAC_4_5
|
||||
// this assumption is incorrect for iOS, tvO, watchOS and OSX
|
||||
#if !MONOTOUCH && !XAMMAC
|
||||
// this assumption is incorrect for the TimeZoneInfo.MonoTouch.cs implementation (iOS, tvOS, watchOS and XamMac Modern)
|
||||
Assert.IsTrue (TimeZoneInfo.Local.Id != "Local", "Local timezone id should not be \"Local\"");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5,17 +5,17 @@ namespace System.IO
|
||||
{
|
||||
partial class Stream
|
||||
{
|
||||
public virtual int Read (Span<byte> destination)
|
||||
internal virtual int Read (Span<byte> destination)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual void Write (ReadOnlySpan<byte> source)
|
||||
internal virtual void Write (ReadOnlySpan<byte> source)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
|
||||
internal virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
if (destination.TryGetArray (out ArraySegment<byte> array))
|
||||
return new ValueTask<int> (ReadAsync (array.Array, array.Offset, array.Count, cancellationToken));
|
||||
@@ -23,7 +23,7 @@ namespace System.IO
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
|
||||
internal virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;FEATURE_PORTABLE_SPAN;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS</DefineConstants>
|
||||
<DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;FEATURE_PORTABLE_SPAN;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS;FEATURE_CRYPTO_CONFIGURABLE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../class/lib/monodroid</OutputPath>
|
||||
@@ -1543,7 +1543,7 @@
|
||||
<Compile Include="System.Security.Cryptography\CryptoAPITransform.cs" />
|
||||
<Compile Include="System.Security.Cryptography\CryptoConfig.common.cs" />
|
||||
<Compile Include="System.Security.Cryptography\CryptoConfig.cs" />
|
||||
<Compile Include="System.Security.Cryptography\CryptoConfig.fullaot.cs" />
|
||||
<Compile Include="System.Security.Cryptography\CryptoConfig.Mobile.cs" />
|
||||
<Compile Include="System.Security.Cryptography\CspKeyContainerInfo.cs" />
|
||||
<Compile Include="System.Security.Cryptography\DESCryptoServiceProvider.cs" />
|
||||
<Compile Include="System.Security.Cryptography\DSACryptoServiceProvider.cs" />
|
||||
|
||||
@@ -685,7 +685,7 @@ System.Security.AccessControl/SystemAcl.cs
|
||||
System.Security.Cryptography/CryptoAPITransform.cs
|
||||
System.Security.Cryptography/CryptoConfig.cs
|
||||
System.Security.Cryptography/CryptoConfig.common.cs
|
||||
System.Security.Cryptography/CryptoConfig.fullaot.cs
|
||||
System.Security.Cryptography/CryptoConfig.Mobile.cs
|
||||
System.Security.Cryptography/CspKeyContainerInfo.cs
|
||||
System.Security.Cryptography/DESCryptoServiceProvider.cs
|
||||
System.Security.Cryptography/DSACryptoServiceProvider.cs
|
||||
@@ -1626,6 +1626,18 @@ corert/RuntimeAugments.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/ValueListBuilder.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/shared/System/Diagnostics/Debug.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/Sources/IValueTaskSource.cs
|
||||
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
|
||||
#../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/ValueTask.cs
|
||||
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
|
||||
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
|
||||
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
|
||||
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
|
||||
|
||||
../../../external/corert/src/System.Private.CoreLib/src/Internal/Runtime/Augments/AsyncCausalityTracer.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/src/Internal/Runtime/Augments/TaskTraceCallbacks.cs
|
||||
@@ -1740,8 +1752,8 @@ corefx/MemoryExtensions.cs
|
||||
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ContentType.cs
|
||||
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyStorageFlags.cs
|
||||
|
||||
../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
|
||||
../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
|
||||
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
|
||||
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
|
||||
|
||||
../../../external/corefx/src/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/*.cs
|
||||
|
||||
|
||||
@@ -181,12 +181,12 @@
|
||||
../../../external/corefx/src/System.Threading/tests/*.cs:MutexTests.cs,SemaphoreTests.cs,InterlockedTests.netcoreapp.cs,EventWaitHandleTests.cs,XunitAssemblyAttributes.cs,ReaderWriterLockTests.cs,SynchronizationContextTests.cs,ExecutionContextTests.cs,HostExecutionContextManagerTests.cs,EtwTests.cs
|
||||
|
||||
# System.Memory
|
||||
../../../external/corefx/src/System.Memory/tests/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Binary/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Memory/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Span/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Binary/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Memory/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Span/*.cs
|
||||
|
||||
# System.Collections
|
||||
../../../external/corefx/src/Common/tests/System/Collections/CollectionAsserts.cs
|
||||
@@ -208,7 +208,7 @@
|
||||
../../../external/corefx/src/Common/tests/System/EnumTypes.cs
|
||||
../../../external/corefx/src/Common/tests/System/ObjectCloner.cs
|
||||
../../../external/corefx/src/Common/tests/System/Diagnostics/DebuggerAttributes.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs:SortedSet.TreeSubSet.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Stack/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedList/*.cs
|
||||
@@ -219,7 +219,7 @@
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Comparers/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Comparers/*.cs:Comparers.Generic.cs
|
||||
../../../external/corefx/src/System.Collections/tests/BitArray/*.cs:BitArray_GetSetTests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/*.cs
|
||||
|
||||
@@ -240,3 +240,4 @@
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/HybridDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/OrderedDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/*.cs:StringCollectionTests.cs
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include testing_aot_full_corlib_test.dll.exclude.sources
|
||||
@@ -0,0 +1 @@
|
||||
#include corlib_test.dll.sources
|
||||
+1
-1
@@ -13,7 +13,7 @@ namespace System.Runtime.Serialization
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Diagnostics;
|
||||
using System.ServiceModel.Diagnostics;
|
||||
// using System.ServiceModel.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
|
||||
@@ -476,7 +476,7 @@ namespace System {
|
||||
|
||||
#if MONO
|
||||
// Converts a Span into an int
|
||||
public static int ToInt32(ReadOnlySpan<byte> value)
|
||||
internal static int ToInt32(ReadOnlySpan<byte> value)
|
||||
{
|
||||
if (value.Length < sizeof(int))
|
||||
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.value);
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace System {
|
||||
///#endif // #if GENERICS_WORK
|
||||
|
||||
#if MONO
|
||||
public bool TryFormat(Span<char> destination, out int charsWritten, System.ReadOnlySpan<char> format = default, System.IFormatProvider provider = null)
|
||||
internal bool TryFormat(Span<char> destination, out int charsWritten, System.ReadOnlySpan<char> format = default, System.IFormatProvider provider = null)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
+6
-1
@@ -710,7 +710,10 @@ namespace System.Runtime.CompilerServices
|
||||
/// <param name="result">The result for which we need a task.</param>
|
||||
/// <returns>The completed task containing the result.</returns>
|
||||
[SecuritySafeCritical] // for JitHelpers.UnsafeCast
|
||||
private Task<TResult> GetTaskForResult(TResult result)
|
||||
#if MONO
|
||||
internal static
|
||||
#endif
|
||||
Task<TResult> GetTaskForResult(TResult result)
|
||||
{
|
||||
Contract.Ensures(
|
||||
EqualityComparer<TResult>.Default.Equals(result, Contract.Result<Task<TResult>>().Result),
|
||||
@@ -775,7 +778,9 @@ namespace System.Runtime.CompilerServices
|
||||
(typeof(TResult) == typeof(Byte) && default(Byte) == (Byte)(object)result) ||
|
||||
(typeof(TResult) == typeof(SByte) && default(SByte) == (SByte)(object)result) ||
|
||||
(typeof(TResult) == typeof(Char) && default(Char) == (Char)(object)result) ||
|
||||
#if !MONO
|
||||
(typeof(TResult) == typeof(Decimal) && default(Decimal) == (Decimal)(object)result) ||
|
||||
#endif
|
||||
(typeof(TResult) == typeof(Int64) && default(Int64) == (Int64)(object)result) ||
|
||||
(typeof(TResult) == typeof(UInt64) && default(UInt64) == (UInt64)(object)result) ||
|
||||
(typeof(TResult) == typeof(Int16) && default(Int16) == (Int16)(object)result) ||
|
||||
|
||||
@@ -1360,7 +1360,7 @@ namespace System.Text
|
||||
}
|
||||
|
||||
#if MONO
|
||||
public unsafe string GetString(ReadOnlySpan<byte> bytes)
|
||||
internal unsafe string GetString(ReadOnlySpan<byte> bytes)
|
||||
{
|
||||
fixed (byte* bytesPtr = &bytes.DangerousGetPinnableReference())
|
||||
{
|
||||
|
||||
@@ -566,7 +566,10 @@ namespace System {
|
||||
exceptions,
|
||||
exception,
|
||||
action,
|
||||
comparison
|
||||
comparison,
|
||||
state,
|
||||
task,
|
||||
source
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Diagnostics
|
||||
{
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2'
|
||||
// Line: 7
|
||||
// Compiler options: -langversion:7.2
|
||||
|
||||
class C
|
||||
{
|
||||
private string S2 { get; private protected set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// CS1013: Invalid number
|
||||
// Line : 6
|
||||
|
||||
class X
|
||||
{
|
||||
static int i = 0x0_;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// CS1061: Type `int' does not contain a definition for `__0' and no extension method `__0' of type `int' could be found. Are you missing an assembly reference?
|
||||
// Line: 8
|
||||
|
||||
static class C
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
int c = 0.__0;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
|
||||
// Line: 4
|
||||
|
||||
protected interface IFoo {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
|
||||
// Line: 4
|
||||
|
||||
protected internal enum E {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
|
||||
// Line:
|
||||
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
|
||||
// Line: 4
|
||||
|
||||
private class X {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// CS1644: Feature `digit separators' cannot be used because it is not part of the C# 6.0 language specification
|
||||
// Line: 9
|
||||
// Compiler options: -langversion:6
|
||||
|
||||
class X
|
||||
{
|
||||
int Test ()
|
||||
{
|
||||
var i = 1_0;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 253 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user