mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
122
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4a000eea4 | ||
|
|
c19f604e21 | ||
|
|
248a487e73 | ||
|
|
0ccf503f0a | ||
|
|
adcd62248d | ||
|
|
487dacce79 | ||
|
|
6a8ca2252b | ||
|
|
384db9e890 | ||
|
|
7236dadd32 | ||
|
|
4c9e28b80a | ||
|
|
090e25ec2d | ||
|
|
47424e34ae | ||
|
|
59a1eade7c | ||
|
|
36e89d52d1 | ||
|
|
3acab49ce7 | ||
|
|
07fee8a91d | ||
|
|
22afdb80e1 | ||
|
|
95101b19fc | ||
|
|
14a3add47f | ||
|
|
11bf192d1a | ||
|
|
c9036e7555 | ||
|
|
33ca3d33e1 | ||
|
|
458d80002d | ||
|
|
52674e238a | ||
|
|
ff6294d231 | ||
|
|
675f1eb321 | ||
|
|
e20956305e | ||
|
|
5470386775 | ||
|
|
6f24832646 | ||
|
|
400fb9c2cb | ||
|
|
61eb2be2e1 | ||
|
|
b3b412c22c | ||
|
|
9719635e58 | ||
|
|
ffdffa54f2 | ||
|
|
a1a4bcc49d | ||
|
|
7ffcaaf59a | ||
|
|
720767a9ff | ||
|
|
1587c49f5f | ||
|
|
14b736e942 | ||
|
|
04b9e5cb8f | ||
|
|
1669812689 | ||
|
|
b55d8f9700 | ||
|
|
0f8aac3c62 | ||
|
|
57b6c8775b | ||
|
|
5c87445310 | ||
|
|
cfba7c550f | ||
|
|
47bca852c1 | ||
|
|
5db64e27e9 | ||
|
|
d6f3de3c4c | ||
|
|
7fd24a40bb | ||
|
|
83a898d25b | ||
|
|
c8e19bec68 | ||
|
|
e7b98d3587 | ||
|
|
0beb9611df | ||
|
|
a74416d950 | ||
|
|
3891fe97d2 | ||
|
|
2ff93e4c76 | ||
|
|
56f397bef3 | ||
|
|
60f081c077 | ||
|
|
f46d5fda1d | ||
|
|
ed7432d988 | ||
|
|
06673e723e | ||
|
|
df3837eb7d | ||
|
|
aa9227f7c8 | ||
|
|
970d695718 | ||
|
|
6bf2c17f34 | ||
|
|
9f5e38229e | ||
|
|
de359d4930 | ||
|
|
e19914fe69 | ||
|
|
ac1a12f997 | ||
|
|
47199fede8 | ||
|
|
f8266639ea | ||
|
|
ba69304049 | ||
|
|
5562065e73 | ||
|
|
84221f04b5 | ||
|
|
61a103f371 | ||
|
|
afcafb6c5e | ||
|
|
c454cb92eb | ||
|
|
e76fb5dbf9 | ||
|
|
6dc5295ed0 | ||
|
|
b0e7a1e4f9 | ||
|
|
15a8c2a7fa | ||
|
|
d0f27ce4fe | ||
|
|
ea50ca48ba | ||
|
|
1310043953 | ||
|
|
2eca6a1e37 | ||
|
|
7bc25cef6d | ||
|
|
d2539babf4 | ||
|
|
b637c1db67 | ||
|
|
7e65a73d4d | ||
|
|
96fa4e8c6f | ||
|
|
57c6b81b96 | ||
|
|
64ad646066 | ||
|
|
97bf0a1bcc | ||
|
|
0dc19600d1 | ||
|
|
e391861c01 | ||
|
|
9cefdf59ad | ||
|
|
a93e4712ec | ||
|
|
943a2760ec | ||
|
|
1fe3d7eda6 | ||
|
|
51bc81919f | ||
|
|
620d7cf84d | ||
|
|
f96ba075a1 | ||
|
|
88dde8b763 | ||
|
|
a1e16d3273 | ||
|
|
6d9c1359ec | ||
|
|
7d88d4d502 | ||
|
|
fb67916c0f | ||
|
|
079acc2fb8 | ||
|
|
3ddcbda8b6 | ||
|
|
acc8c0c696 | ||
|
|
256eda8c7f | ||
|
|
0e05bda235 | ||
|
|
3142396c3c | ||
|
|
8ae9708e87 | ||
|
|
97dd6cf04c | ||
|
|
93c18d6fd1 | ||
|
|
d6d74e819f | ||
|
|
a65b7af6d5 | ||
|
|
a778c46362 | ||
|
|
ef422d9cb7 | ||
|
|
cd2e0e8f7a |
No files matched your search
@@ -3,6 +3,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
SUBDIRS = @MONO_SUBDIRS@
|
||||
noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@
|
||||
DIST_SUBDIRS = $(SUBDIRS) m4 netcore netcore/corerun
|
||||
|
||||
if !ENABLE_NETCORE
|
||||
@@ -93,6 +94,11 @@ mcs-do-compiler-tests:
|
||||
bootstrap-world: compiler-tests
|
||||
$(MAKE) install
|
||||
|
||||
install:
|
||||
for mydir in $(filter-out $(noinst_SUBDIRS),$(SUBDIRS)); do \
|
||||
(cd $${mydir} && ${MAKE} install) \
|
||||
done
|
||||
|
||||
update-csproj:
|
||||
-rm msvc/scripts/order
|
||||
-rm msvc/scripts/order.xml
|
||||
|
||||
+11
-4
@@ -63,7 +63,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
MONO_CORLIB_VERSION=97b07b51-46d8-4084-b48e-77aa5c192654
|
||||
MONO_CORLIB_VERSION=3bf09a16-d684-401b-ae3c-2015596b0194
|
||||
|
||||
#
|
||||
# Put a quoted #define in config.h.
|
||||
@@ -609,6 +609,7 @@ AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
AC_PROG_CC
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
AC_PROG_CXX
|
||||
AM_PATH_PYTHON
|
||||
AM_PROG_AS
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
@@ -5152,8 +5153,12 @@ AC_SEARCH_LIBS(dlopen, dl)
|
||||
#
|
||||
export_link_flags=--export-dynamic
|
||||
case $host_os in
|
||||
mingw*|cygwin*)
|
||||
mingw*|cygwin*)
|
||||
export_link_flags=--export-all-symbols
|
||||
;;
|
||||
*-*-darwin*)
|
||||
export_link_flags=--export_dynamic
|
||||
;;
|
||||
esac
|
||||
AX_APPEND_LINK_FLAGS([-Wl,$export_link_flags -Wl,-Bsymbolic -bsymbolic -Wl,-z,now -Wl,-bind_at_load])
|
||||
|
||||
@@ -6061,8 +6066,8 @@ fi
|
||||
AC_SUBST(mono_runtime)
|
||||
AC_SUBST(mono_runtime_wrapper)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/VBCSCompiler.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -6277,9 +6282,11 @@ else
|
||||
fi
|
||||
|
||||
MONO_SUBDIRS="po $mono_subdirs_libgc llvm mono $mono_subdirs_ikvm_native $mono_subdirs_support data runtime scripts man samples $mono_subdirs_tools $mono_subdirs_docs msvc acceptance-tests"
|
||||
MONO_NOINST_SUBDIRS="$mono_subdirs_libgc"
|
||||
fi
|
||||
|
||||
AC_SUBST(MONO_SUBDIRS)
|
||||
AC_SUBST(MONO_NOINST_SUBDIRS)
|
||||
|
||||
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
|
||||
AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 7581be7b86...c58c68d3c0.
Vendored
+1
-1
Submodule external/cecil updated: a6a7f5c0f4...8021f3fbe7.
Vendored
+1
-1
Submodule external/corefx updated: f3815a9401...94e8ec61f6.
Vendored
+1
-1
Submodule external/linker updated: 4279148ff2...ad43969434.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: 419b2452de...27c352d6ed.
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"tools": {
|
||||
"dotnet": "5.0.100-alpha1-014854"
|
||||
"dotnet": "5.0.100-alpha1-015772"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19608.1",
|
||||
|
||||
+56
-41
@@ -89,26 +89,32 @@ endif
|
||||
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
|
||||
test_lib_output = $(test_lib_dir)/$(test_lib)
|
||||
|
||||
test_sourcefile_base_excludes = $(test_lib).exclude.sources
|
||||
test_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_test$(ASSEMBLY_EXT)
|
||||
test_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).response
|
||||
test_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).makefrag
|
||||
|
||||
test_pdb = $(test_lib:.dll=.pdb)
|
||||
test_flags = $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
|
||||
ifndef NO_BUILD
|
||||
test_flags += -r:$(the_assembly)
|
||||
test_assembly_dep = $(the_assembly)
|
||||
endif
|
||||
tests_CLEAN_FILES += $(test_lib_output) $(test_lib_output:$(ASSEMBLY_EXT)=.pdb)
|
||||
|
||||
tests_CLEAN_FILES += $(test_lib_output) $(test_response) $(test_makefrag)
|
||||
|
||||
xtest_sourcefile_base = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
xtest_sourcefile_base_excludes_full = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.exclude.sources)
|
||||
xtest_sourcefile_base_excludes = $(xtest_sourcefile_base_excludes_full:_%=%)
|
||||
|
||||
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
|
||||
xtest_lib_output = $(test_lib_dir)/$(xunit_test_lib)
|
||||
|
||||
xtest_response = $(depsdir)/$(xunit_test_lib).response
|
||||
xtest_makefrag = $(depsdir)/$(xunit_test_lib).makefrag
|
||||
xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
xtest_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_xtest$(ASSEMBLY_EXT)
|
||||
xtest_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(xtest_library).response
|
||||
xtest_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(xtest_library).makefrag
|
||||
xtest_flags = $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
|
||||
ifndef NO_BUILD
|
||||
xtest_flags += -r:$(the_assembly)
|
||||
xtest_assembly_dep = $(the_assembly)
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard $(xtest_sourcefile_base)),)
|
||||
xtest_sourcefile_base = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
@@ -140,6 +146,10 @@ test_assemblies :=
|
||||
ifdef HAVE_CS_TESTS
|
||||
test_assemblies += $(test_lib_output)
|
||||
|
||||
ifdef TEST_SPLIT_ASSEMBLIES
|
||||
test_assemblies += $(test_lib_output:.dll=.part1.dll) $(test_lib_output:.dll=.part2.dll)
|
||||
endif
|
||||
|
||||
check: run-test
|
||||
test-local: $(test_assemblies) $(test_lib_dir)/nunit-excludes.txt
|
||||
run-test-local: run-test-lib
|
||||
@@ -262,44 +272,34 @@ endif
|
||||
TEST_FILES =
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
TEST_FILES += `sed -e '/^$$/d' -e 's,^../,,' -e '/^\#.*$$/d' -et -e 's,^,Test/,' $(test_sourcefile_base)`
|
||||
endif
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
TEST_FILES += `sed -e '/^$$/d' -e 's,^../,,' -e '/^\#.*$$/d' -et -e 's,^,Test/,' $(test_sourcefile_base)`
|
||||
|
||||
$(test_lib_dir):
|
||||
mkdir -p $@
|
||||
|
||||
test_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_test$(ASSEMBLY_EXT)
|
||||
|
||||
test_sourcefile = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).sources
|
||||
$(test_sourcefile): $(test_sourcefile_base) $(wildcard *_test.dll.sources) $(wildcard *_test.dll.exclude.sources) $(depsdir)/.stamp
|
||||
$(GENSOURCES) --basedir:./Test --strict --platformsdir:$(topdir)/build "$@" "$(test_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
|
||||
test_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).response
|
||||
$(test_response): $(test_sourcefile) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(PLATFORM_CHANGE_SEPARATOR_CMD) <$(test_sourcefile) >$@
|
||||
|
||||
test_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).makefrag
|
||||
$(test_makefrag): $(test_sourcefile) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(build_lib): ,' $< >$@
|
||||
@if test ! -f $(test_sourcefile).makefrag; then :; else \
|
||||
cat $(test_sourcefile).makefrag >> $@ ; \
|
||||
echo '$@: $(test_sourcefile).makefrag' >> $@; \
|
||||
echo '$(test_sourcefile).makefrag:' >> $@; fi
|
||||
|
||||
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_output).nunitlite.config | $(test_lib_dir)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
|
||||
|
||||
tests_CLEAN_FILES += $(test_sourcefile) $(test_response) $(test_makefrag)
|
||||
ifdef TEST_SPLIT_ASSEMBLIES
|
||||
$(test_lib_output:.dll=.part1.dll): $(test_lib_output) $(test_response).part1
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response).part1
|
||||
|
||||
$(test_lib_output:.dll=.part2.dll): $(test_lib_output) $(test_response).part2
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response).part2
|
||||
|
||||
tests_CLEAN_FILES += $(test_response).part1 $(test_response).part2
|
||||
endif
|
||||
|
||||
$(test_response): $(test_sourcefile_base) $(wildcard *_test.dll.sources) $(wildcard *_test.dll.exclude.sources) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(GENSOURCES) --basedir:./Test --strict --platformsdir:$(topdir)/build "$@" "$(test_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
|
||||
$(test_makefrag): $(test_response)
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(test_lib_output) $(test_lib_output:.dll=.part1.dll) $(test_lib_output:.dll=.part2.dll): ,' $< >$@
|
||||
|
||||
-include $(test_makefrag)
|
||||
|
||||
build-test-lib: $(test_lib_output)
|
||||
@echo Building testing lib
|
||||
|
||||
endif
|
||||
|
||||
@@ -336,8 +336,15 @@ ifdef COVERAGE
|
||||
XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/coverage_xunit_$(ASSEMBLY).xml
|
||||
endif
|
||||
|
||||
xtest_assemblies += $(xtest_lib_output)
|
||||
|
||||
ifdef XTEST_SPLIT_ASSEMBLIES
|
||||
xtest_assemblies += $(xtest_lib_output:.dll=.part1.dll) $(xtest_lib_output:.dll=.part2.dll)
|
||||
endif
|
||||
|
||||
|
||||
check: run-xunit-test-local
|
||||
xunit-test-local: $(xtest_lib_output) $(test_lib_dir)/xunit-excludes.txt $(test_lib_dir)/Xunit.NetCore.Extensions.dll $(test_lib_dir)/xunit.execution.dotnet.dll
|
||||
xunit-test-local: $(xtest_assemblies) $(test_lib_dir)/xunit-excludes.txt $(test_lib_dir)/Xunit.NetCore.Extensions.dll $(test_lib_dir)/xunit.execution.dotnet.dll
|
||||
run-xunit-test-local: run-xunit-test-lib
|
||||
|
||||
$(test_lib_dir)/xunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
|
||||
@@ -360,19 +367,27 @@ run-xunit-test-lib: xunit-test-local
|
||||
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../external/corefx/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs | $(test_lib_dir)
|
||||
$(TEST_COMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll $< -out:$@
|
||||
|
||||
$(xtest_lib_output): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
|
||||
$(xtest_lib_output): $(xtest_assembly_dep) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
|
||||
|
||||
xtest_response_preprocessed = $(xtest_response)_preprocessed
|
||||
ifdef XTEST_SPLIT_ASSEMBLIES
|
||||
$(xtest_lib_output:.dll=.part1.dll): $(xtest_lib_output) $(xtest_response).part1
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response).part1 $(xunit_src)
|
||||
|
||||
$(xtest_lib_output:.dll=.part2.dll): $(xtest_lib_output) $(xtest_response).part2
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response).part2 $(xunit_src)
|
||||
|
||||
xtests_CLEAN_FILES += $(xtest_response).part1 $(xtest_response).part2
|
||||
endif
|
||||
|
||||
# This handles .excludes/.sources pairs, as well as resolving the
|
||||
# includes that occur in .sources files
|
||||
$(xtest_response): $(xtest_sourcefile_base) $(wildcard *xtest.dll.sources) $(wildcard $(xtest_sourcefile_base_excludes))
|
||||
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(xtest_sourcefile_base)" "$(xtest_sourcefile_base_excludes)"
|
||||
# includes that occur in .sources files. It also handles splitting test assemblies into multiple parts.
|
||||
$(xtest_response): $(xtest_sourcefile_base) $(wildcard *_xtest.dll.sources) $(wildcard *_xtest.dll.exclude.sources) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(xtest_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
|
||||
$(xtest_makefrag): $(xtest_response)
|
||||
$(xtest_makefrag): $(xtest_response) $(xtest_response_parts)
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(xtest_lib_output): ,' $< >$@
|
||||
@sed 's,^,$(xtest_lib_output) $(xtest_lib_output:.dll=.part1.dll) $(xtest_lib_output:.dll=.part2.dll): ,' $< >$@
|
||||
|
||||
-include $(xtest_makefrag)
|
||||
|
||||
|
||||
@@ -27,14 +27,28 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsSigner))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Builder))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12CertBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Info))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12KeyBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContents))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SecretBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
|
||||
@@ -42,10 +56,15 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampToken))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignedCms))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Xml.X509IssuerSerial))]
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
#if !CECIL && !MOBILE
|
||||
ModuleBuilder mb;
|
||||
delegate Guid GetGuidFunc (ModuleBuilder mb);
|
||||
GetGuidFunc get_guid_func;
|
||||
|
||||
public SymbolWriterImpl (ModuleBuilder mb)
|
||||
{
|
||||
@@ -62,16 +60,7 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
MethodInfo mi = typeof (ModuleBuilder).GetMethod (
|
||||
"Mono_GetGuid",
|
||||
BindingFlags.Static | BindingFlags.NonPublic);
|
||||
if (mi == null)
|
||||
return;
|
||||
|
||||
get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
|
||||
typeof (GetGuidFunc), mi);
|
||||
|
||||
msw.WriteSymbolFile (get_guid_func (mb));
|
||||
msw.WriteSymbolFile (mb.ModuleVersionId);
|
||||
}
|
||||
#else
|
||||
Guid guid;
|
||||
|
||||
@@ -558,6 +558,10 @@ public class Tests : TestsBase, ITest2
|
||||
runtime_invoke_hybrid_exceptions();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length > 0 && args [0] == "new_thread_hybrid_exception") {
|
||||
new_thread_hybrid_exception();
|
||||
return 0;
|
||||
}
|
||||
assembly_load ();
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
@@ -2222,12 +2226,27 @@ public class Tests : TestsBase, ITest2
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void runtime_invoke_hybrid_exceptions () {
|
||||
Type rtType = Type.GetType("RuntimeInvokeWithThrowClass");
|
||||
ConstructorInfo rtConstructor = rtType.GetConstructor(Type.EmptyTypes);
|
||||
object rtObject = rtConstructor.Invoke(new object[] { });
|
||||
MethodInfo rtMethod = rtType.GetMethod("RuntimeInvokeThrowMethod");
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
ConstructorInfo rtConstructor = rtType.GetConstructor(Type.EmptyTypes);
|
||||
object rtObject = rtConstructor.Invoke(new object[] { });
|
||||
MethodInfo rtMethod = rtType.GetMethod("RuntimeInvokeThrowMethod");
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void new_thread_hybrid_exception() {
|
||||
try
|
||||
{
|
||||
Thread thread = new Thread(new_thread_hybrid_exception2);
|
||||
thread.Start();
|
||||
}
|
||||
catch (Exception sockEx)
|
||||
{
|
||||
}
|
||||
}
|
||||
public static void new_thread_hybrid_exception2()
|
||||
{
|
||||
throw new Exception("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SentinelClass : MarshalByRefObject {
|
||||
|
||||
@@ -5151,6 +5151,19 @@ public class DebuggerTests
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestNewThreadHybridSuspendException () {
|
||||
TearDown ();
|
||||
Start (dtest_app_path, "new_thread_hybrid_exception", forceExit: true);
|
||||
var req2 = vm.CreateExceptionRequest (null, false, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
var ev = GetNextEvent ();
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAsyncDebugGenerics () {
|
||||
|
||||
@@ -5658,21 +5658,30 @@ namespace PEAPI {
|
||||
char[] name;
|
||||
Hashtable htable = new Hashtable();
|
||||
Hashtable btable = new Hashtable (new ByteArrayHashCodeProvider (), new ByteArrayComparer ());
|
||||
bool addInitByte = false;
|
||||
bool initByteAdded = false;
|
||||
|
||||
internal MetaDataStream(char[] name, bool addInitByte) : base(new MemoryStream())
|
||||
{
|
||||
if (addInitByte) { Write((byte)0); size = 1; }
|
||||
this.addInitByte = addInitByte;
|
||||
this.name = name;
|
||||
sizeOfHeader = StreamHeaderSize + (uint)name.Length;
|
||||
}
|
||||
|
||||
internal MetaDataStream(char[] name, System.Text.Encoding enc, bool addInitByte) : base(new MemoryStream(),enc)
|
||||
{
|
||||
if (addInitByte) { Write((byte)0); size = 1; }
|
||||
this.addInitByte = addInitByte;
|
||||
this.name = name;
|
||||
sizeOfHeader = StreamHeaderSize + (uint)name.Length;
|
||||
}
|
||||
|
||||
void AddInitByte () {
|
||||
if (addInitByte && !initByteAdded) {
|
||||
Write((byte)0);
|
||||
size += 1;
|
||||
initByteAdded = true;
|
||||
}
|
||||
}
|
||||
public uint Start {
|
||||
get { return start; }
|
||||
set { start = value; }
|
||||
@@ -5706,6 +5715,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(string str, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
Object val = htable[str];
|
||||
uint index = 0;
|
||||
if (val == null) {
|
||||
@@ -5723,6 +5733,7 @@ namespace PEAPI {
|
||||
}
|
||||
internal uint Add (byte[] str, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
Object val = btable [str];
|
||||
uint index = 0;
|
||||
if (val == null) {
|
||||
@@ -5740,6 +5751,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(Guid guid, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
byte [] b = guid.ToByteArray ();
|
||||
if (prependSize) CompressNum ((uint) b.Length);
|
||||
Write(guid.ToByteArray());
|
||||
@@ -5749,6 +5761,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(byte[] blob)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
CompressNum((uint)blob.Length);
|
||||
Write(blob);
|
||||
@@ -5758,6 +5771,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(byte val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (1);
|
||||
Write(val);
|
||||
@@ -5767,6 +5781,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(sbyte val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (1);
|
||||
Write(val);
|
||||
@@ -5776,6 +5791,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(ushort val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (2);
|
||||
Write(val);
|
||||
@@ -5785,6 +5801,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(short val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (2);
|
||||
Write(val);
|
||||
@@ -5794,6 +5811,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(uint val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write(val);
|
||||
@@ -5803,6 +5821,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(int val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write (val);
|
||||
@@ -5812,6 +5831,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(ulong val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
@@ -5821,6 +5841,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(long val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
@@ -5830,6 +5851,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(float val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write(val);
|
||||
@@ -5839,6 +5861,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(double val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
|
||||
@@ -62,4 +62,6 @@ XTEST_LIB_REFS = System Facades/System.Threading.Tasks Microsoft.CSharp Facades/
|
||||
XTEST_LIB_FLAGS = -unsafe -d:FEATURE_COMPILE
|
||||
XTEST_RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Collections.Immutable/src/Resources/Strings.resx
|
||||
|
||||
XTEST_SPLIT_ASSEMBLIES := $(filter monotouch%, $(PROFILE))
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -3,12 +3,10 @@
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs
|
||||
../../../external/corefx/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs
|
||||
|
||||
# System.Linq
|
||||
# TODO: ../../../external/corefx/src/System.Linq/tests/*.cs
|
||||
|
||||
# System.Linq.Queryable
|
||||
../../../external/corefx/src/System.Linq.Queryable/tests/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/Linq/SkipTakeData.cs
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
# System.Linq.Expressions
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/Array/*.cs:NewArrayBoundsTests.cs,ArrayAccessTests.cs,ArrayIndexTests.cs
|
||||
@@ -56,7 +54,19 @@
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/Unary/IncDecAssign/*.cs
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/*.cs:StackSpillerTests.cs,ReadOnlyCollectionBuilderTests.cs
|
||||
|
||||
# System.Linq.Expressions
|
||||
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
# System.Linq
|
||||
# TODO: ../../../external/corefx/src/System.Linq/tests/*.cs
|
||||
|
||||
# System.Linq.Queryable
|
||||
../../../external/corefx/src/System.Linq.Queryable/tests/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/Linq/SkipTakeData.cs
|
||||
|
||||
# System.Linq.Parallel
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/Combinatorial/*.cs
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/Helpers/*.cs
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/QueryOperators/*.cs:DefaultIfEmptyTests.cs,SingleSingleOrDefaultTests.cs
|
||||
|
||||
@@ -2,16 +2,15 @@ thisdir = class/System.Net.Http/FunctionalTests
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
ASSEMBLY = System.Net.Http.FunctionalTests
|
||||
LIBRARY = System.Net.Http.FunctionalTests.dll
|
||||
NO_BUILD = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks System.Net.Http
|
||||
USE_XTEST_REMOTE_EXECUTOR = YES
|
||||
|
||||
XTEST_LIB_FLAGS = /resource:../../System/Test/TestData/testservereku.contoso.com.pfx
|
||||
|
||||
the_assembly = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/System.Net.Http.dll
|
||||
|
||||
include ../../../build/tests.make
|
||||
include ../../../build/library.make
|
||||
|
||||
TEST_RUNTIME := MONO_URI_DOTNETRELATIVEORABSOLUTE=true $(TEST_RUNTIME)
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -2,15 +2,15 @@ thisdir = class/System.Net.Http/UnitTests
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
ASSEMBLY = System.Net.Http.UnitTests
|
||||
LIBRARY = System.Net.Http.UnitTests.dll
|
||||
NO_BUILD = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
||||
USE_XTEST_REMOTE_EXECUTOR = YES
|
||||
XTEST_MCS_FLAGS = -nowarn:436
|
||||
|
||||
include ../../../build/tests.make
|
||||
|
||||
xtest_flags = $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
include ../../../build/library.make
|
||||
|
||||
clean-local:
|
||||
-rm -f $(tests_CLEAN_FILES) $(CLEAN_FILES)
|
||||
|
||||
Whitespace-only changes.
+115
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Enables the creation of PKCS#12 PFX data values. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12Builder {
|
||||
/// <summary>Gets a value that indicates whether the PFX data has been sealed.</summary>
|
||||
/// <returns>A value that indicates whether the PFX data has been sealed.</returns>
|
||||
public bool IsSealed {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a byte array.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="passwordBytes">The byte array to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
||||
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, byte[] passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a span.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="passwordBytes">The byte span to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
||||
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a span.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="password">The span to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<char> password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a string.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="password">The string to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, string password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX without encrypting them.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsUnencrypted (Pkcs12SafeContents safeContents) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Encodes the contents of a sealed PFX and returns it as a byte array.</summary>
|
||||
/// <returns>A byte array representing the encoded form of the PFX.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a span.</summary>
|
||||
/// <param name="password">The password to use as a key for computing the MAC.</param>
|
||||
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
|
||||
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithMac (ReadOnlySpan<char> password, HashAlgorithmName hashAlgorithm, int iterationCount) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a string.</summary>
|
||||
/// <param name="password">The password to use as a key for computing the MAC.</param>
|
||||
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
|
||||
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithMac (string password, HashAlgorithmName hashAlgorithm, int iterationCount) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX from further changes without applying tamper-protection.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithoutIntegrity () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to encode the contents of a sealed PFX into a provided buffer.</summary>
|
||||
/// <param name="destination">The byte span to receive the PKCS#12 PFX data.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the PKCS#12 CertBag. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12CertBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets the uninterpreted certificate contents of the CertSafeBag.</summary>
|
||||
/// <returns>The uninterpreted certificate contents of the CertSafeBag.</returns>
|
||||
public ReadOnlyMemory<byte> EncodedCertificate {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the content type of the encoded certificate value is the X.509 public key certificate content type.</summary>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the content type is the X.509 public key certificate content type (1.2.840.113549.1.9.22.1); otherwise, <see langword="false" />.</returns>
|
||||
public bool IsX509Certificate {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> class using the specified certificate type and encoding.</summary>
|
||||
/// <param name="certificateType">The Object Identifier (OID) for the certificate type.</param>
|
||||
/// <param name="encodedCertificate">The encoded certificate value.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="certificateType" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encodedCertificate" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
public Pkcs12CertBag (Oid certificateType, ReadOnlyMemory<byte> encodedCertificate)
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the contents of the CertBag interpreted as an X.509 public key certificate.</summary>
|
||||
/// <returns>A certificate decoded from the contents of the CertBag.</returns>
|
||||
/// <exception cref="">The content type is not the X.509 public key certificate content type.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents were not valid for the X.509 certificate content type.</exception>
|
||||
public X509Certificate2 GetCertificate () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the Object Identifier (OID) which identifies the content type of the encoded certificte value.</summary>
|
||||
/// <returns>The Object Identifier (OID) which identifies the content type of the encoded certificate value.</returns>
|
||||
public Oid GetCertificateType () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the kind of encryption associated with a PKCS#12 SafeContents value.</summary>
|
||||
public enum Pkcs12ConfidentialityMode {
|
||||
/// <summary>The SafeContents value is not encrypted.</summary>
|
||||
None = 1,
|
||||
/// <summary>The SafeContents value is encrypted with a password.</summary>
|
||||
Password = 2,
|
||||
/// <summary>The SafeContents value is encrypted using public key cryptography.</summary>
|
||||
PublicKey = 3,
|
||||
/// <summary>The kind of encryption applied to the SafeContents is unknown or could not be determined.</summary>
|
||||
Unknown = 0
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the data from PKCS#12 PFX contents. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12Info {
|
||||
/// <summary>Gets a read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</summary>
|
||||
/// <returns>A read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</returns>
|
||||
public ReadOnlyCollection<Pkcs12SafeContents> AuthenticatedSafe {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</summary>
|
||||
/// <returns>One of the enumeration members that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</returns>
|
||||
public Pkcs12IntegrityMode IntegrityMode {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Pkcs12Info () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Reads the provided data as a PKCS#12 PFX and returns an object view of the contents.</summary>
|
||||
/// <param name="encodedBytes">The data to interpret as a PKCS#12 PFX.</param>
|
||||
/// <param name="bytesConsumed">When this method returns, contains a value that indicates the number of bytes from <paramref name="encodedBytes" /> which were read by this method. This parameter is treated as uninitialized.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="encodedBytes" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <returns>An object view of the PKCS#12 PFX decoded from the input.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents of the <paramref name="encodedBytes" /> parameter were not successfully decoded as a PKCS#12 PFX.</exception>
|
||||
public static Pkcs12Info Decode (ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="System.ReadOnlySpan{System.Char}" />.</summary>
|
||||
/// <param name="password">The password to use to attempt to verify integrity.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
|
||||
public bool VerifyMac (ReadOnlySpan<char> password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="T:System.String" />.</summary>
|
||||
/// <param name="password">The password to use to attempt to verify integrity.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
|
||||
public bool VerifyMac (string password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the type of anti-tampering applied to a PKCS#12 PFX value.</summary>
|
||||
public enum Pkcs12IntegrityMode {
|
||||
/// <summary>The PKCS#12 PFX value is not protected from tampering.</summary>
|
||||
None = 1,
|
||||
/// <summary>The PKCS#12 PFX value is protected from tampering with a Message Authentication Code (MAC) keyed with a password.</summary>
|
||||
Password = 2,
|
||||
/// <summary>The PKCS#12 PFX value is protected from tampering with a digital signature using public key cryptography.</summary>
|
||||
PublicKey = 3,
|
||||
/// <summary>The type of anti-tampering applied to the PKCS#12 PFX is unknown or could not be determined.</summary>
|
||||
Unknown = 0
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the KeyBag from PKCS#12, a container whose contents are a PKCS#8 PrivateKeyInfo. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12KeyBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets a memory value containing the PKCS#8 PrivateKeyInfo value transported by this bag.</summary>
|
||||
/// <returns>A memory value containing the PKCS#8 PrivateKeyInfo value transported by this bag.</returns>
|
||||
public ReadOnlyMemory<byte> Pkcs8PrivateKey {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12KeyBag" /> from an existing encoded PKCS#8 PrivateKeyInfo value.</summary>
|
||||
/// <param name="pkcs8PrivateKey">A BER-encoded PKCS#8 PrivateKeyInfo value.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="pkcs8PrivateKey" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="pkcs8privateKey" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
public Pkcs12KeyBag (ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false)
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Defines the core behavior of a SafeBag value from the PKCS#12 specification and provides a base for derived classes.</summary>
|
||||
public abstract class Pkcs12SafeBag {
|
||||
/// <summary>Gets the modifiable collection of attributes to encode with the SafeBag value.</summary>
|
||||
/// <returns>The modifiable collection of attributes to encode with the SafeBag value.</returns>
|
||||
public CryptographicAttributeObjectCollection Attributes {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the ASN.1 BER encoding of the contents of this SafeBag.</summary>
|
||||
/// <returns>The ASN.1 BER encoding of the contents of this SafeBag.</returns>
|
||||
public ReadOnlyMemory<byte> EncodedBagValue {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Called from constructors in derived classes to initialize the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SafeBag" /> class.</summary>
|
||||
/// <param name="bagIdValue">The Object Identifier (OID), in dotted decimal form, indicating the data type of this SafeBag.</param>
|
||||
/// <param name="encodedBagValue">The ASN.1 BER encoded value of the SafeBag contents.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="encodedBagValue" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="bagIdValue" /> parameter is <see langword="null" /> or the empty string.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encodedBagValue" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
protected Pkcs12SafeBag (string bagIdValue, ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = false) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Encodes the SafeBag value and returns it as a byte array.</summary>
|
||||
/// <returns>A byte array representing the encoded form of the SafeBag.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The object identifier value passed to the constructor was invalid.</exception>
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the Object Identifier (OID) identifying the content type of this SafeBag.</summary>
|
||||
/// <returns>The Object Identifier (OID) identifying the content type of this SafeBag.</returns>
|
||||
public Oid GetBagId () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to encode the SafeBag value into a provided buffer.</summary>
|
||||
/// <param name="destination">The byte span to receive the encoded SafeBag value.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The object identifier value passed to the constructor was invalid.</exception>
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents a PKCS#12 SafeContents value. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12SafeContents {
|
||||
/// <summary>Gets a value that indicates the type of encryption applied to the contents.</summary>
|
||||
/// <returns>One of the enumeration values that indicates the type of encryption applied to the contents. The default value is <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.None" />.</returns>
|
||||
public Pkcs12ConfidentialityMode ConfidentialityMode {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether this instance in a read-only state.</summary>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if this value is in a read-only state; otherwise, <see langword="false" />. The default value is <see langword="false" />.</returns>
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a certificate to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> and returns the newly created bag instance.</summary>
|
||||
/// <param name="certificate">The certificate to add.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="certificate" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="certificate" /> parameter is in an invalid state.</exception>
|
||||
public Pkcs12CertBag AddCertificate (X509Certificate2 certificate) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12KeyBag" /> and returns the newly created bag instance.</summary>
|
||||
/// <param name="key">The asymmetric private key to add.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
|
||||
public Pkcs12KeyBag AddKeyUnencrypted (AsymmetricAlgorithm key) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds a nested SafeContents to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag" /> and returns the newly created bag instance.</summary>
|
||||
/// <param name="safeContents">The nested contents to add to the SafeContents.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter is encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
public Pkcs12SafeContentsBag AddNestedContents (Pkcs12SafeContents safeContents) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds a SafeBag to the SafeContents.</summary>
|
||||
/// <param name="safeBag">The SafeBag value to add.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeBag" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
public void AddSafeBag (Pkcs12SafeBag safeBag) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SecretBag" /> and returns the newly created bag instance.</summary>
|
||||
/// <param name="secretType">The Object Identifier (OID) which identifies the data type of the secret value.</param>
|
||||
/// <param name="secretValue">The BER-encoded value representing the secret to add.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="secretType" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="secretValue" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
public Pkcs12SecretBag AddSecret (Oid secretType, ReadOnlyMemory<byte> secretValue) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a byte-based password in an array and returns the newly created bag instance.</summary>
|
||||
/// <param name="key">The asymmetric private key to add.</param>
|
||||
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
|
||||
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, byte[] passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a byte-based password in a span and returns the newly created bag instance.</summary>
|
||||
/// <param name="key">The asymmetric private key to add.</param>
|
||||
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
|
||||
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a character-based password in a span and returns the newly created bag instance.</summary>
|
||||
/// <param name="key">The asymmetric private key to add.</param>
|
||||
/// <param name="password">The password to use when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
|
||||
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, ReadOnlySpan<char> password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a character-based password in a string and returns the newly created bag instance.</summary>
|
||||
/// <param name="key">The asymmetric private key to add.</param>
|
||||
/// <param name="password">The password to use when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>The bag instance which was added to the SafeContents.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
|
||||
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, string password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the contents of this SafeContents value using a byte-based password from an array.</summary>
|
||||
/// <param name="passwordBytes">The bytes to use as a password for decrypting the encrypted contents.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
|
||||
/// -or-
|
||||
/// The contents were not successfully decrypted.</exception>
|
||||
public void Decrypt (byte[] passwordBytes) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the contents of this SafeContents value using a byte-based password from a span.</summary>
|
||||
/// <param name="passwordBytes">The bytes to use as a password for decrypting the encrypted contents.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
|
||||
/// -or-
|
||||
/// The contents were not successfully decrypted.</exception>
|
||||
public void Decrypt (ReadOnlySpan<byte> passwordBytes) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the contents of this SafeContents value using a character-based password from a span.</summary>
|
||||
/// <param name="password">The password to use for decrypting the encrypted contents.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
|
||||
/// -or-
|
||||
/// The contents were not successfully decrypted.</exception>
|
||||
public void Decrypt (ReadOnlySpan<char> password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the contents of this SafeContents value using a character-based password from a string.</summary>
|
||||
/// <param name="password">The password to use for decrypting the encrypted contents.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
|
||||
/// -or-
|
||||
/// The contents were not successfully decrypted.</exception>
|
||||
public void Decrypt (string password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets an enumerable representation of the SafeBag values contained within the SafeContents.</summary>
|
||||
/// <returns>An enumerable representation of the SafeBag values contained within the SafeContents.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The contents are encrypted.</exception>
|
||||
public IEnumerable<Pkcs12SafeBag> GetBags () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the SafeContentsBag from PKCS#12, a container whose contents are a PKCS#12 SafeContents value. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12SafeContentsBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets the SafeContents value contained within this bag.</summary>
|
||||
/// <returns>The SafeContents value contained within this bag.</returns>
|
||||
public Pkcs12SafeContents SafeContents {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Pkcs12SafeContentsBag ()
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the SecretBag from PKCS#12, a container whose contents are arbitrary data with a type identifier. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12SecretBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets a memory value containing the BER-encoded contents of the bag.</summary>
|
||||
/// <returns>A memory value containing the BER-encoded contents of the bag.</returns>
|
||||
public ReadOnlyMemory<byte> SecretValue {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Pkcs12SecretBag ()
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the Object Identifier (OID) which identifies the data type of the secret value.</summary>
|
||||
/// <returns>The Object Identifier (OID) which identifies the data type of the secret value.</returns>
|
||||
public Oid GetSecretType () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the ShroudedKeyBag from PKCS#12, a container whose contents are a PKCS#8 EncryptedPrivateKeyInfo. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12ShroudedKeyBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets a memory value containing the PKCS#8 EncryptedPrivateKeyInfo value transported by this bag.</summary>
|
||||
/// <returns>A memory value containing the PKCS#8 EncryptedPrivateKeyInfo value transported by this bag.</returns>
|
||||
public ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from an existing encoded PKCS#8 EncryptedPrivateKeyInfo value.</summary>
|
||||
/// <param name="encryptedPkcs8PrivateKey">A BER-encoded PKCS#8 EncryptedPrivateKeyInfo value.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="encryptedPkcs8PrivateKey" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encryptedPkcs8privateKey" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
public Pkcs12ShroudedKeyBag (ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = false)
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Enables the inspection of and creation of PKCS#8 PrivateKeyInfo and EncryptedPrivateKeyInfo values. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs8PrivateKeyInfo {
|
||||
/// <summary>Gets the Object Identifier (OID) value identifying the algorithm this key is for.</summary>
|
||||
/// <returns>The Object Identifier (OID) value identifying the algorithm this key is for.</returns>
|
||||
public Oid AlgorithmId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a memory value containing the BER-encoded algorithm parameters associated with this key.</summary>
|
||||
/// <returns>A memory value containing the BER-encoded algorithm parameters associated with this key, or <see langword="null" /> if no parameters were present.</returns>
|
||||
public ReadOnlyMemory<byte>? AlgorithmParameters {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the modifiable collection of attributes for this private key.</summary>
|
||||
/// <returns>The modifiable collection of attributes to encode with the private key.</returns>
|
||||
public CryptographicAttributeObjectCollection Attributes {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a memory value that represents the algorithm-specific encoded private key.</summary>
|
||||
/// <returns>A memory value that represents the algorithm-specific encoded private key.</returns>
|
||||
public ReadOnlyMemory<byte> PrivateKeyBytes {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo" /> class.</summary>
|
||||
/// <param name="algorithmId">The Object Identifier (OID) identifying the asymmetric algorithm this key is for.</param>
|
||||
/// <param name="algorithmParameters">The BER-encoded algorithm parameters associated with this key, or <see langword="null" /> to omit algorithm parameters when encoding.</param>
|
||||
/// <param name="privateKey">The algorithm-specific encoded private key.</param>
|
||||
/// <param name="skipCopies">
|
||||
/// <see langword="true" /> to store <paramref name="algorithmParameters" /> and <paramref name="privateKey" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="algorithmId" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="algorithmParameters" /> parameter is not <see langword="null" />, empty, or a single BER-encoded value.</exception>
|
||||
public Pkcs8PrivateKeyInfo (Oid algorithmId, ReadOnlyMemory<byte>? algorithmParameters, ReadOnlyMemory<byte> privateKey, bool skipCopies = false) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Exports a specified key as a PKCS#8 PrivateKeyInfo and returns its decoded interpretation.</summary>
|
||||
/// <param name="privateKey">The private key to represent in a PKCS#8 PrivateKeyInfo.</param>
|
||||
/// <returns>The decoded interpretation of the exported PKCS#8 PrivateKeyInfo.</returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="privateKey" /> parameter is <see langword="null" />.</exception>
|
||||
public static Pkcs8PrivateKeyInfo Create (AsymmetricAlgorithm privateKey) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Reads the provided data as a PKCS#8 PrivateKeyInfo and returns an object view of the contents.</summary>
|
||||
/// <param name="source">The data to interpret as a PKCS#8 PrivateKeyInfo value.</param>
|
||||
/// <param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="source" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <returns>An object view of the contents decoded as a PKCS#8 PrivateKeyInfo.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents of the <paramref name="source" /> parameter were not successfully decoded as a PKCS#8 PrivateKeyInfo.</exception>
|
||||
public static Pkcs8PrivateKeyInfo Decode (ReadOnlyMemory<byte> source, out int bytesRead, bool skipCopy = false) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the provided data using the provided byte-based password and decodes the output into an object view of the PKCS#8 PrivateKeyInfo.</summary>
|
||||
/// <param name="passwordBytes">The bytes to use as a password when decrypting the key material.</param>
|
||||
/// <param name="source">The data to read as a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
|
||||
/// <param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>An object view of the contents decrypted decoded as a PKCS#8 PrivateKeyInfo.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
|
||||
/// -or-
|
||||
/// The contents of <paramref name="source" /> indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires <see cref="T:System.Char" />-based passwords.
|
||||
/// -or-
|
||||
/// The contents of <paramref name="source" /> do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.</exception>
|
||||
public static Pkcs8PrivateKeyInfo DecryptAndDecode (ReadOnlySpan<byte> passwordBytes, ReadOnlyMemory<byte> source, out int bytesRead) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Decrypts the provided data using the provided character-based password and decodes the output into an object view of the PKCS#8 PrivateKeyInfo.</summary>
|
||||
/// <param name="password">The password to use when decrypting the key material.</param>
|
||||
/// <param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
|
||||
/// <param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>An object view of the contents decrypted decoded as a PKCS#8 PrivateKeyInfo.</returns>
|
||||
public static Pkcs8PrivateKeyInfo DecryptAndDecode (ReadOnlySpan<char> password, ReadOnlyMemory<byte> source, out int bytesRead) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Encodes the property data of this instance as a PKCS#8 PrivateKeyInfo and returns the encoding as a byte array.</summary>
|
||||
/// <returns>A byte array representing the encoded form of the PKCS#8 PrivateKeyInfo.</returns>
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Produces a PKCS#8 EncryptedPrivateKeyInfo from the property contents of this object after encrypting with the specified byte-based password and encryption parameters.</summary>
|
||||
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>A byte array containing the encoded form of the PKCS#8 EncryptedPrivateKeyInfo.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
||||
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
|
||||
public byte[] Encrypt (ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Produces a PKCS#8 EncryptedPrivateKeyInfo from the property contents of this object after encrypting with the specified character-based password and encryption parameters.</summary>
|
||||
/// <param name="password">The password to use when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <returns>A byte array containing the encoded form of the PKCS#8 EncryptedPrivateKeyInfo.</returns>
|
||||
public byte[] Encrypt (ReadOnlySpan<char> password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to encode the property data of this instance as a PKCS#8 PrivateKeyInfo, writing the results into a provided buffer.</summary>
|
||||
/// <param name="destination">The byte span to receive the PKCS#8 PrivateKeyInfo data.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to produce a PKCS#8 EncryptedPrivateKeyInfo from the property contents of this object after encrypting with the specified byte-based password and encryption parameters, writing the results into a provided buffer.</summary>
|
||||
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
public bool TryEncrypt (ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to produce a PKCS#8 EncryptedPrivateKeyInfo from the property contents of this object after encrypting with the specified character-based password and encryption parameters, writing the result into a provided buffer.</summary>
|
||||
/// <param name="password">The password to use when encrypting the key material.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
|
||||
/// <param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
public bool TryEncrypt (ReadOnlySpan<char> password, PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the LocalKeyId attribute from PKCS#9.</summary>
|
||||
public sealed class Pkcs9LocalKeyId : Pkcs9AttributeObject {
|
||||
/// <summary>Gets a memory value containing the key identifier from this attribute.</summary>
|
||||
/// <returns>A memory value containing the key identifier from this attribute.</returns>
|
||||
public ReadOnlyMemory<byte> KeyId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId" /> class with an empty key identifier value.</summary>
|
||||
public Pkcs9LocalKeyId () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId" /> class with a key identifier specified by a byte array.</summary>
|
||||
/// <param name="keyId">A byte array containing the key identifier.</param>
|
||||
public Pkcs9LocalKeyId (byte[] keyId) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId" /> class with a key identifier specified by a byte span.</summary>
|
||||
/// <param name="keyId">A byte array containing the key identifier.</param>
|
||||
public Pkcs9LocalKeyId (ReadOnlySpan<byte> keyId) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
public sealed class Rfc3161TimestampRequest {
|
||||
public bool HasExtensions {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public Oid HashAlgorithmId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public Oid RequestedPolicyId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool RequestSignerCertificate {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int Version {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Rfc3161TimestampRequest () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="data" />
|
||||
/// <param name="hashAlgorithm" />
|
||||
/// <param name="requestedPolicyId" />
|
||||
/// <param name="nonce" />
|
||||
/// <param name="requestSignerCertificates" />
|
||||
/// <param name="extensions" />
|
||||
public static Rfc3161TimestampRequest CreateFromData (ReadOnlySpan<byte> data, HashAlgorithmName hashAlgorithm, Oid requestedPolicyId = null, ReadOnlyMemory<byte>? nonce = default(ReadOnlyMemory<byte>?), bool requestSignerCertificates = false, X509ExtensionCollection extensions = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="hash" />
|
||||
/// <param name="hashAlgorithm" />
|
||||
/// <param name="requestedPolicyId" />
|
||||
/// <param name="nonce" />
|
||||
/// <param name="requestSignerCertificates" />
|
||||
/// <param name="extensions" />
|
||||
public static Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, HashAlgorithmName hashAlgorithm, Oid requestedPolicyId = null, ReadOnlyMemory<byte>? nonce = default(ReadOnlyMemory<byte>?), bool requestSignerCertificates = false, X509ExtensionCollection extensions = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Create a timestamp request using a pre-computed hash value.</summary>
|
||||
/// <param name="hash">The pre-computed hash value to be timestamped.</param>
|
||||
/// <param name="hashAlgorithmId">The Object Identifier (OID) for the hash algorithm that produced <paramref name="hash" />.</param>
|
||||
/// <param name="requestedPolicyId">The Object Identifier (OID) for a timestamp policy the Timestamp Authority (TSA) should use, or <see langword="null" /> to express no preference.</param>
|
||||
/// <param name="nonce">An optional nonce (number used once) to uniquely identify this request to pair it with the response. The value is interpreted as an unsigned big-endian integer and may be normalized to the encoding format.</param>
|
||||
/// <param name="requestSignerCertificates">
|
||||
/// <see langword="true" /> to indicate the Timestamp Authority (TSA) must include the signing certificate in the issued timestamp token; otherwise, <see langword="false" />.</param>
|
||||
/// <param name="extensions">RFC3161 extensions to present with the request.</param>
|
||||
/// <returns>An <see cref="T:System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest" /> representing the chosen values.</returns>
|
||||
public static Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, Oid hashAlgorithmId, Oid requestedPolicyId = null, ReadOnlyMemory<byte>? nonce = default(ReadOnlyMemory<byte>?), bool requestSignerCertificates = false, X509ExtensionCollection extensions = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="signerInfo" />
|
||||
/// <param name="hashAlgorithm" />
|
||||
/// <param name="requestedPolicyId" />
|
||||
/// <param name="nonce" />
|
||||
/// <param name="requestSignerCertificates" />
|
||||
/// <param name="extensions" />
|
||||
public static Rfc3161TimestampRequest CreateFromSignerInfo (SignerInfo signerInfo, HashAlgorithmName hashAlgorithm, Oid requestedPolicyId = null, ReadOnlyMemory<byte>? nonce = default(ReadOnlyMemory<byte>?), bool requestSignerCertificates = false, X509ExtensionCollection extensions = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public X509ExtensionCollection GetExtensions () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte> GetMessageHash () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte>? GetNonce () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="responseBytes" />
|
||||
/// <param name="bytesConsumed" />
|
||||
public Rfc3161TimestampToken ProcessResponse (ReadOnlyMemory<byte> responseBytes, out int bytesConsumed) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="encodedBytes" />
|
||||
/// <param name="request" />
|
||||
/// <param name="bytesConsumed" />
|
||||
public static bool TryDecode (ReadOnlyMemory<byte> encodedBytes, out Rfc3161TimestampRequest request, out int bytesConsumed) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="destination" />
|
||||
/// <param name="bytesWritten" />
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
public sealed class Rfc3161TimestampToken {
|
||||
public Rfc3161TimestampTokenInfo TokenInfo {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Rfc3161TimestampToken () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets a Signed Cryptographic Message Syntax (CMS) representation of the RFC3161 timestamp token.</summary>
|
||||
/// <returns>The <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> representation of the <see cref="T:System.Security.Cryptography.Pkcs.Rfc3161TimestampToken" />.</returns>
|
||||
public SignedCms AsSignedCms () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="encodedBytes" />
|
||||
/// <param name="token" />
|
||||
/// <param name="bytesConsumed" />
|
||||
public static bool TryDecode (ReadOnlyMemory<byte> encodedBytes, out Rfc3161TimestampToken token, out int bytesConsumed) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="data" />
|
||||
/// <param name="signerCertificate" />
|
||||
/// <param name="extraCandidates" />
|
||||
public bool VerifySignatureForData (ReadOnlySpan<byte> data, out X509Certificate2 signerCertificate, X509Certificate2Collection extraCandidates = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="hash" />
|
||||
/// <param name="hashAlgorithm" />
|
||||
/// <param name="signerCertificate" />
|
||||
/// <param name="extraCandidates" />
|
||||
public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, HashAlgorithmName hashAlgorithm, out X509Certificate2 signerCertificate, X509Certificate2Collection extraCandidates = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="hash" />
|
||||
/// <param name="hashAlgorithmId" />
|
||||
/// <param name="signerCertificate" />
|
||||
/// <param name="extraCandidates" />
|
||||
public bool VerifySignatureForHash (ReadOnlySpan<byte> hash, Oid hashAlgorithmId, out X509Certificate2 signerCertificate, X509Certificate2Collection extraCandidates = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="signerInfo" />
|
||||
/// <param name="signerCertificate" />
|
||||
/// <param name="extraCandidates" />
|
||||
public bool VerifySignatureForSignerInfo (SignerInfo signerInfo, out X509Certificate2 signerCertificate, X509Certificate2Collection extraCandidates = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
public sealed class Rfc3161TimestampTokenInfo {
|
||||
public long? AccuracyInMicroseconds {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasExtensions {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public Oid HashAlgorithmId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOrdering {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public Oid PolicyId {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public DateTimeOffset Timestamp {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int Version {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <param name="policyId" />
|
||||
/// <param name="hashAlgorithmId" />
|
||||
/// <param name="messageHash" />
|
||||
/// <param name="serialNumber" />
|
||||
/// <param name="timestamp" />
|
||||
/// <param name="accuracyInMicroseconds" />
|
||||
/// <param name="isOrdering" />
|
||||
/// <param name="nonce" />
|
||||
/// <param name="timestampAuthorityName" />
|
||||
/// <param name="extensions" />
|
||||
public Rfc3161TimestampTokenInfo (Oid policyId, Oid hashAlgorithmId, ReadOnlyMemory<byte> messageHash, ReadOnlyMemory<byte> serialNumber, DateTimeOffset timestamp, long? accuracyInMicroseconds = default(long?), bool isOrdering = false, ReadOnlyMemory<byte>? nonce = default(ReadOnlyMemory<byte>?), ReadOnlyMemory<byte>? timestampAuthorityName = default(ReadOnlyMemory<byte>?), X509ExtensionCollection extensions = null) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public X509ExtensionCollection GetExtensions () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte> GetMessageHash () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte>? GetNonce () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte> GetSerialNumber () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ReadOnlyMemory<byte>? GetTimestampAuthorityName () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="encodedBytes" />
|
||||
/// <param name="timestampTokenInfo" />
|
||||
/// <param name="bytesConsumed" />
|
||||
public static bool TryDecode (ReadOnlyMemory<byte> encodedBytes, out Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <param name="destination" />
|
||||
/// <param name="bytesWritten" />
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,6 +211,22 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.ProtectedData\src\System\Security\Cryptography\DataProtectionScope.cs" />
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\EnvelopedCms.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12Builder.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12CertBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12ConfidentialityMode.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12Info.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12IntegrityMode.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12KeyBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12SafeBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12SafeContents.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12SafeContentsBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12SecretBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs12ShroudedKeyBag.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs8PrivateKeyInfo.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Pkcs9LocalKeyId.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Rfc3161TimestampRequest.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Rfc3161TimestampToken.NotSupported.cs" />
|
||||
<Compile Include="System.Security.Cryptography.Pkcs\Rfc3161TimestampTokenInfo.NotSupported.cs" />
|
||||
<Compile Include="corefx\SR.cs" />
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
|
||||
@@ -99,5 +99,25 @@ System.Security.Cryptography.Pkcs/EnvelopedCms.cs
|
||||
../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfoCollection.cs
|
||||
../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfoEnumerator.cs
|
||||
|
||||
|
||||
# System.Security.Cryptography.Pkcs NotSupported
|
||||
System.Security.Cryptography.Pkcs/Pkcs12Builder.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12CertBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12ConfidentialityMode.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12Info.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12IntegrityMode.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12KeyBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12SafeBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12SafeContents.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12SafeContentsBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12SecretBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs12ShroudedKeyBag.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs8PrivateKeyInfo.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Pkcs9LocalKeyId.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Rfc3161TimestampRequest.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Rfc3161TimestampToken.NotSupported.cs
|
||||
System.Security.Cryptography.Pkcs/Rfc3161TimestampTokenInfo.NotSupported.cs
|
||||
|
||||
|
||||
# System.Security.Cryptography.Xml
|
||||
../../../external/corefx/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Xml/X509IssuerSerial.cs
|
||||
@@ -9,4 +9,7 @@ partial class SR
|
||||
public const string SynchronizedCollectionWrongType1 = "A value of type '{0}' cannot be added to the generic collection, because the collection has been parameterized with a different type.";
|
||||
public const string SynchronizedCollectionWrongTypeNull = "A null value cannot be added to the generic collection, because the collection has been parameterized with a value type.";
|
||||
public const string ValueMustBeInRange = "The value of this argument must fall within the range {0} to {1}.";
|
||||
public const string XmlLangAttributeMissing = "Required xml:lang attribute value is missing.";
|
||||
public const string InvalidXmlQualifiedName = "Expected XML qualified name, found '{0}'";
|
||||
public const string UnboundPrefixInQName = "Unbound prefix used in qualified name '{0}'.";
|
||||
}
|
||||
@@ -40,8 +40,9 @@ namespace System.ServiceModel.Channels
|
||||
public static MessageFault CreateFault (Message message, int maxBufferSize)
|
||||
{
|
||||
try {
|
||||
if (message.Version.Envelope == EnvelopeVersion.Soap11)
|
||||
return CreateFault11 (message, maxBufferSize);
|
||||
if (message.Version.Envelope == EnvelopeVersion.Soap11) {
|
||||
return CreateFault11 (message, maxBufferSize);
|
||||
}
|
||||
else // common to None and SOAP12
|
||||
return CreateFault12 (message, maxBufferSize);
|
||||
} catch (XmlException ex) {
|
||||
@@ -55,14 +56,14 @@ namespace System.ServiceModel.Channels
|
||||
FaultReason fr = null;
|
||||
string actor = null;
|
||||
XmlDictionaryReader r = message.GetReaderAtBodyContents ();
|
||||
|
||||
r.ReadStartElement ("Fault", message.Version.Envelope.Namespace);
|
||||
fc = ReadFaultCode11 (r, maxBufferSize);
|
||||
|
||||
r.MoveToContent ();
|
||||
|
||||
while (r.NodeType != XmlNodeType.EndElement) {
|
||||
switch (r.LocalName) {
|
||||
case "faultcode":
|
||||
fc = ReadFaultCode11 (r);
|
||||
break;
|
||||
switch (r.LocalName) {
|
||||
case "faultstring":
|
||||
fr = new FaultReason (r.ReadElementContentAsString());
|
||||
break;
|
||||
@@ -128,26 +129,27 @@ namespace System.ServiceModel.Channels
|
||||
return new SimpleMessageFault (fc, fr, false, null, null, null, node);
|
||||
}
|
||||
|
||||
static FaultCode ReadFaultCode11 (XmlDictionaryReader r)
|
||||
// In reference source for soap 1.1, the fault code value is not strictly enforced as per the
|
||||
// Namespaces in XML spec.
|
||||
//
|
||||
// Additionally, the fault sub code is not looked for:
|
||||
//
|
||||
// See: https://referencesource.microsoft.com/#System.ServiceModel/System/ServiceModel/Channels/MessageFault.cs,f23a5298fd999b2d
|
||||
//
|
||||
static FaultCode ReadFaultCode11 (XmlDictionaryReader reader, int maxBufferSize)
|
||||
{
|
||||
FaultCode subcode = null;
|
||||
XmlQualifiedName value = XmlQualifiedName.Empty;
|
||||
FaultCode code;
|
||||
string ns;
|
||||
string name;
|
||||
|
||||
if (r.IsEmptyElement)
|
||||
throw new ArgumentException ("Fault Code is mandatory in SOAP fault message.");
|
||||
reader.ReadStartElement ("faultcode", "");
|
||||
|
||||
XmlUtil.ReadContentAsQName (reader, out name, out ns);
|
||||
code = new FaultCode (name, ns);
|
||||
|
||||
r.ReadStartElement ("faultcode");
|
||||
r.MoveToContent ();
|
||||
while (r.NodeType != XmlNodeType.EndElement) {
|
||||
if (r.NodeType == XmlNodeType.Element)
|
||||
subcode = ReadFaultCode11 (r);
|
||||
else
|
||||
value = (XmlQualifiedName) r.ReadContentAs (typeof (XmlQualifiedName), r as IXmlNamespaceResolver);
|
||||
r.MoveToContent ();
|
||||
}
|
||||
r.ReadEndElement ();
|
||||
|
||||
return new FaultCode (value.Name, value.Namespace, subcode);
|
||||
reader.ReadEndElement ();
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
static FaultCode ReadFaultCode12 (XmlDictionaryReader r, string ns)
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<Compile Include="..\referencesource\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs" />
|
||||
<Compile Include="..\referencesource\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs" />
|
||||
<Compile Include="..\referencesource\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs" />
|
||||
<Compile Include="..\referencesource\System.ServiceModel\System\ServiceModel\XmlUtil.cs" />
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="Mono.CodeGeneration\CodeAdd.cs" />
|
||||
<Compile Include="Mono.CodeGeneration\CodeAnd.cs" />
|
||||
|
||||
@@ -912,4 +912,5 @@ System.ServiceModel.Configuration/HttpBindingBaseElement.cs
|
||||
System.ServiceModel.Configuration/BasicHttpsBindingElement.cs
|
||||
System.ServiceModel.Configuration/BasicHttpsSecurityElement.cs
|
||||
System.ServiceModel.Configuration/BasicHttpsBindingCollectionElement.cs
|
||||
../referencesource/System.ServiceModel/System/ServiceModel/XmlUtil.cs
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<s:Body>
|
||||
<s:Fault>
|
||||
<faultcode>s:1</faultcode>
|
||||
<faultstring xml:lang="en-US">String is empty.</faultstring>
|
||||
</s:Fault>
|
||||
</s:Body>
|
||||
</s:Envelope>
|
||||
@@ -22,6 +22,15 @@ namespace MonoTests.System.ServiceModel.Channels
|
||||
MessageFault.CreateFault (msg, 0x10000);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CreateFaultWithNumberCode ()
|
||||
{
|
||||
var msgVersion = MessageVersion.CreateVersion (EnvelopeVersion.Soap11, AddressingVersion.None);
|
||||
|
||||
var msg = Message.CreateMessage (XmlReader.Create (new StreamReader (TestResourceHelper.GetFullPathOfResource ("Test/Resources/soap-fault-number.xml"))), 0x10000, msgVersion);
|
||||
MessageFault.CreateFault (msg, 0x10000);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CreateFaultMessageVersionNone ()
|
||||
{
|
||||
|
||||
@@ -296,3 +296,4 @@ System.ServiceModel.Security.Tokens/SecurityTokenReferenceStyle.cs
|
||||
System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
|
||||
System.ServiceModel.Security.Tokens/SupportingTokenParameters.cs
|
||||
System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
|
||||
../referencesource/System.ServiceModel/System/ServiceModel/XmlUtil.cs
|
||||
@@ -1099,6 +1099,8 @@ namespace System.Windows.Forms {
|
||||
XplatUI.SetOwner(this.window.Handle, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
// UIA Framework: Raises internal event
|
||||
OnUIAOwnerChanged ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3202,6 +3204,7 @@ namespace System.Windows.Forms {
|
||||
static object UIAMenuChangedEvent = new object ();
|
||||
static object UIATopMostChangedEvent = new object ();
|
||||
static object UIAWindowStateChangedEvent = new object ();
|
||||
static object UIAOwnerChangedEvent = new object ();
|
||||
|
||||
internal event EventHandler UIAMenuChanged {
|
||||
add { Events.AddHandler (UIAMenuChangedEvent, value); }
|
||||
@@ -3218,6 +3221,11 @@ namespace System.Windows.Forms {
|
||||
remove { Events.RemoveHandler (UIAWindowStateChangedEvent, value); }
|
||||
}
|
||||
|
||||
internal event EventHandler UIAOwnerChanged {
|
||||
add { Events.AddHandler (UIAOwnerChangedEvent, value); }
|
||||
remove { Events.RemoveHandler (UIAOwnerChangedEvent, value); }
|
||||
}
|
||||
|
||||
internal void OnUIAMenuChanged (EventArgs e)
|
||||
{
|
||||
EventHandler eh = (EventHandler) Events [UIAMenuChangedEvent];
|
||||
@@ -3238,6 +3246,13 @@ namespace System.Windows.Forms {
|
||||
if (eh != null)
|
||||
eh (this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
internal void OnUIAOwnerChanged ()
|
||||
{
|
||||
EventHandler eh = (EventHandler) Events [UIAOwnerChangedEvent];
|
||||
if (eh != null)
|
||||
eh (this, EventArgs.Empty);
|
||||
}
|
||||
#endregion // UIA Framework Events
|
||||
#endregion // Events
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace Mono.Net.Security
|
||||
}
|
||||
|
||||
SslStream sslStream;
|
||||
readonly object sslStreamLock = new object ();
|
||||
|
||||
internal SslStream SslStream {
|
||||
get { return sslStream; }
|
||||
@@ -157,9 +158,11 @@ namespace Mono.Net.Security
|
||||
}
|
||||
|
||||
void CloseSslStream () {
|
||||
if (sslStream != null) {
|
||||
sslStream.Dispose ();
|
||||
sslStream = null;
|
||||
lock (sslStreamLock) {
|
||||
if (sslStream != null) {
|
||||
sslStream.Dispose ();
|
||||
sslStream = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,13 +54,13 @@ namespace System.Net.NetworkInformation {
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static bool ParseRouteInfo_internal(string iface, out string[] gw_addr_list);
|
||||
private extern static bool ParseRouteInfo_icall (string iface, out string[] gw_addr_list);
|
||||
|
||||
public override GatewayIPAddressInformationCollection GatewayAddresses {
|
||||
get {
|
||||
var gateways = new IPAddressCollection ();
|
||||
string[] gw_addrlist;
|
||||
if (!ParseRouteInfo_internal (this.iface.Name.ToString(), out gw_addrlist))
|
||||
if (!ParseRouteInfo_icall (this.iface.Name.ToString(), out gw_addrlist))
|
||||
return new GatewayIPAddressInformationCollection ();
|
||||
|
||||
for(int i=0; i<gw_addrlist.Length; i++) {
|
||||
|
||||
@@ -46,13 +46,13 @@ namespace System.Net.NetworkInformation {
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static bool ParseRouteInfo_internal(string iface, out string[] gw_addr_list);
|
||||
private extern static bool ParseRouteInfo_icall (string iface, out string[] gw_addr_list);
|
||||
|
||||
public override GatewayIPAddressInformationCollection GatewayAddresses {
|
||||
get {
|
||||
var gateways = new IPAddressCollection ();
|
||||
string[] gw_addrlist;
|
||||
if (!ParseRouteInfo_internal (this.iface.Name.ToString(), out gw_addrlist))
|
||||
if (!ParseRouteInfo_icall (this.iface.Name.ToString(), out gw_addrlist))
|
||||
return new GatewayIPAddressInformationCollection ();
|
||||
|
||||
for(int i=0; i<gw_addrlist.Length; i++) {
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace System.Net.Sockets {
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
Socket.Blocking_internal (handle, false, out error);
|
||||
Socket.Blocking_icall (handle, false, out error);
|
||||
#if FULL_AOT_DESKTOP
|
||||
/* It's only for platforms that do not have working syscall abort mechanism, like WatchOS and TvOS */
|
||||
Socket.Shutdown_internal (handle, SocketShutdown.Both, out error);
|
||||
Socket.Shutdown_icall (handle, SocketShutdown.Both, out error);
|
||||
#endif
|
||||
|
||||
if (blocking_threads != null) {
|
||||
@@ -93,7 +93,7 @@ namespace System.Net.Sockets {
|
||||
}
|
||||
}
|
||||
|
||||
Socket.Close_internal (handle, out error);
|
||||
Socket.Close_icall (handle, out error);
|
||||
|
||||
return error == 0;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace System.Net.Sockets
|
||||
const string TIMEOUT_EXCEPTION_MSG = "A connection attempt failed because the connected party did not properly respond" +
|
||||
"after a period of time, or established connection failed because connected host has failed to respond";
|
||||
|
||||
/* true if we called Close_internal */
|
||||
/* true if we called Close_icall */
|
||||
bool is_closed;
|
||||
|
||||
bool is_listening;
|
||||
@@ -163,7 +163,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Creates a new system socket, returning the handle */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern IntPtr Socket_internal (AddressFamily family, SocketType type, ProtocolType proto, out int error);
|
||||
extern static IntPtr Socket_icall (AddressFamily family, SocketType type, ProtocolType proto, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return Available_internal (safeHandle.DangerousGetHandle (), out error);
|
||||
return Available_icall (safeHandle.DangerousGetHandle (), out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -197,7 +197,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Returns the amount of data waiting to be read on socket */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static int Available_internal (IntPtr socket, out int error);
|
||||
extern static int Available_icall (IntPtr socket, out int error);
|
||||
|
||||
// FIXME: import from referencesource
|
||||
public bool EnableBroadcast {
|
||||
@@ -296,7 +296,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return LocalEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error);
|
||||
return LocalEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -305,7 +305,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Returns the local endpoint details in addr and port */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static SocketAddress LocalEndPoint_internal (IntPtr socket, int family, out int error);
|
||||
extern static SocketAddress LocalEndPoint_icall (IntPtr socket, int family, out int error);
|
||||
|
||||
public bool Blocking {
|
||||
get { return is_blocking; }
|
||||
@@ -327,7 +327,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
Blocking_internal (safeHandle.DangerousGetHandle (), block, out error);
|
||||
Blocking_icall (safeHandle.DangerousGetHandle (), block, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -335,7 +335,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
internal extern static void Blocking_internal(IntPtr socket, bool block, out int error);
|
||||
internal extern static void Blocking_icall (IntPtr socket, bool block, out int error);
|
||||
|
||||
public bool Connected {
|
||||
get { return is_connected; }
|
||||
@@ -382,7 +382,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return RemoteEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error);
|
||||
return RemoteEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -391,7 +391,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Returns the remote endpoint details in addr and port */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static SocketAddress RemoteEndPoint_internal (IntPtr socket, int family, out int error);
|
||||
extern static SocketAddress RemoteEndPoint_icall (IntPtr socket, int family, out int error);
|
||||
|
||||
internal SafeHandle SafeHandle
|
||||
{
|
||||
@@ -419,7 +419,7 @@ namespace System.Net.Sockets
|
||||
Socket [] sockets = list.ToArray ();
|
||||
|
||||
int error;
|
||||
Select_internal (ref sockets, microSeconds, out error);
|
||||
Select_icall (ref sockets, microSeconds, out error);
|
||||
|
||||
if (error != 0)
|
||||
throw new SocketException (error);
|
||||
@@ -480,7 +480,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void Select_internal (ref Socket [] sockets, int microSeconds, out int error);
|
||||
extern static void Select_icall (ref Socket [] sockets, int microSeconds, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -514,7 +514,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return Poll_internal (safeHandle.DangerousGetHandle (), mode, timeout, out error);
|
||||
return Poll_icall (safeHandle.DangerousGetHandle (), mode, timeout, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -522,7 +522,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static bool Poll_internal (IntPtr socket, SelectMode mode, int timeout, out int error);
|
||||
extern static bool Poll_icall (IntPtr socket, SelectMode mode, int timeout, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -750,7 +750,7 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
var ret = Accept_internal (safeHandle.DangerousGetHandle (), out error, blocking);
|
||||
var ret = Accept_icall (safeHandle.DangerousGetHandle (), out error, blocking);
|
||||
return new SafeSocketHandle (ret, true);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
@@ -759,7 +759,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Creates a new system socket, returning the handle */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static IntPtr Accept_internal (IntPtr sock, out int error, bool blocking);
|
||||
extern static IntPtr Accept_icall (IntPtr sock, out int error, bool blocking);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -797,7 +797,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
Bind_internal (safeHandle.DangerousGetHandle (), sa, out error);
|
||||
Bind_icall (safeHandle.DangerousGetHandle (), sa, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -806,7 +806,7 @@ namespace System.Net.Sockets
|
||||
|
||||
// Creates a new system socket, returning the handle
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static void Bind_internal(IntPtr sock, SocketAddress sa, out int error);
|
||||
private extern static void Bind_icall (IntPtr sock, SocketAddress sa, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -833,7 +833,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
Listen_internal (safeHandle.DangerousGetHandle (), backlog, out error);
|
||||
Listen_icall (safeHandle.DangerousGetHandle (), backlog, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -841,7 +841,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void Listen_internal (IntPtr sock, int backlog, out int error);
|
||||
extern static void Listen_icall (IntPtr sock, int backlog, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1083,6 +1083,9 @@ namespace System.Net.Sockets
|
||||
sockares.CurrentAddress++;
|
||||
sockares.EndPoint = new IPEndPoint (sockares.Addresses [i], sockares.Port);
|
||||
|
||||
if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily))
|
||||
continue;
|
||||
|
||||
return BeginSConnect (sockares);
|
||||
} catch (Exception e) {
|
||||
exc = e;
|
||||
@@ -1121,7 +1124,7 @@ namespace System.Net.Sockets
|
||||
// an error. Better to just close the socket and move on.
|
||||
sockares.socket.connect_in_progress = false;
|
||||
sockares.socket.m_Handle.Dispose ();
|
||||
sockares.socket.m_Handle = new SafeSocketHandle (sockares.socket.Socket_internal (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true);
|
||||
sockares.socket.m_Handle = new SafeSocketHandle (Socket_icall (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true);
|
||||
if (error != 0) {
|
||||
sockares.Complete (new SocketException (error), true);
|
||||
return false;
|
||||
@@ -1215,7 +1218,7 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
Connect_internal (safeHandle.DangerousGetHandle (), sa, out error, blocking);
|
||||
Connect_icall (safeHandle.DangerousGetHandle (), sa, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
@@ -1223,7 +1226,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* Connects to the remote address */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void Connect_internal(IntPtr sock, SocketAddress sa, out int error, bool blocking);
|
||||
extern static void Connect_icall (IntPtr sock, SocketAddress sa, out int error, bool blocking);
|
||||
|
||||
/* Returns :
|
||||
* - false when it is ok to use RemoteEndPoint
|
||||
@@ -1360,7 +1363,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
Disconnect_internal (safeHandle.DangerousGetHandle (), reuse, out error);
|
||||
Disconnect_icall (safeHandle.DangerousGetHandle (), reuse, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -1368,7 +1371,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void Disconnect_internal (IntPtr sock, bool reuse, out int error);
|
||||
extern static void Disconnect_icall (IntPtr sock, bool reuse, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1641,27 +1644,27 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return Receive_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
|
||||
return Receive_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int Receive_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
|
||||
extern static unsafe int Receive_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
|
||||
|
||||
static unsafe int Receive_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking)
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return Receive_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
|
||||
return Receive_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int Receive_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
|
||||
extern static unsafe int Receive_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1881,14 +1884,14 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return ReceiveFrom_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking);
|
||||
return ReceiveFrom_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int ReceiveFrom_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking);
|
||||
extern static unsafe int ReceiveFrom_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2206,27 +2209,27 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return Send_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
|
||||
return Send_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int Send_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
|
||||
extern static unsafe int Send_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
|
||||
|
||||
static unsafe int Send_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking)
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return Send_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
|
||||
return Send_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int Send_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
|
||||
extern static unsafe int Send_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2396,14 +2399,14 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return SendTo_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking);
|
||||
return SendTo_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static unsafe int SendTo_internal (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking);
|
||||
extern static unsafe int SendTo_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2459,14 +2462,14 @@ namespace System.Net.Sockets
|
||||
{
|
||||
try {
|
||||
safeHandle.RegisterForBlockingSyscall ();
|
||||
return SendFile_internal (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking);
|
||||
return SendFile_icall (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking);
|
||||
} finally {
|
||||
safeHandle.UnRegisterForBlockingSyscall ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static bool SendFile_internal (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking);
|
||||
extern static bool SendFile_icall (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking);
|
||||
|
||||
delegate void SendFileHandler (string fileName, byte [] preBuffer, byte [] postBuffer, TransmitFileOptions flags);
|
||||
|
||||
@@ -2524,7 +2527,7 @@ namespace System.Net.Sockets
|
||||
#region DuplicateAndClose
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
static extern bool Duplicate_internal(IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error);
|
||||
static extern bool Duplicate_icall (IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error);
|
||||
|
||||
[MonoLimitation ("We do not support passing sockets across processes, we merely allow this API to pass the socket across AppDomains")]
|
||||
public SocketInformation DuplicateAndClose (int targetProcessId)
|
||||
@@ -2537,7 +2540,7 @@ namespace System.Net.Sockets
|
||||
(useOverlappedIO ? SocketInformationOptions.UseOnlyOverlappedIO : 0);
|
||||
|
||||
IntPtr duplicateHandle;
|
||||
if (!Duplicate_internal (Handle, targetProcessId, out duplicateHandle, out MonoIOError error))
|
||||
if (!Duplicate_icall (Handle, targetProcessId, out duplicateHandle, out MonoIOError error))
|
||||
throw MonoIO.GetException (error);
|
||||
|
||||
si.ProtocolInformation = Mono.DataConverter.Pack ("iiiil", (int)addressFamily, (int)socketType, (int)protocolType, is_bound ? 1 : 0, (long)duplicateHandle);
|
||||
@@ -2604,7 +2607,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
GetSocketOption_arr_internal (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error);
|
||||
GetSocketOption_arr_icall (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -2612,14 +2615,14 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void GetSocketOption_arr_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error);
|
||||
extern static void GetSocketOption_arr_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error);
|
||||
|
||||
static void GetSocketOption_obj_internal (SafeSocketHandle safeHandle, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error)
|
||||
{
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
GetSocketOption_obj_internal (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error);
|
||||
GetSocketOption_obj_icall (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -2627,7 +2630,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void GetSocketOption_obj_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error);
|
||||
extern static void GetSocketOption_obj_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2713,7 +2716,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
SetSocketOption_internal (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error);
|
||||
SetSocketOption_icall (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -2721,7 +2724,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static void SetSocketOption_internal (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error);
|
||||
extern static void SetSocketOption_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2748,7 +2751,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return IOControl_internal (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error);
|
||||
return IOControl_icall (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -2759,7 +2762,7 @@ namespace System.Net.Sockets
|
||||
* and Winsock are FIONREAD, FIONBIO and SIOCATMARK. Anything else will depend on the system
|
||||
* except SIO_KEEPALIVE_VALS which is properly handled on both windows and linux. */
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static int IOControl_internal (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error);
|
||||
extern static int IOControl_icall (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2778,7 +2781,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
internal extern static void Close_internal (IntPtr socket, out int error);
|
||||
internal extern static void Close_icall (IntPtr socket, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2815,7 +2818,7 @@ namespace System.Net.Sockets
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
Shutdown_internal (safeHandle.DangerousGetHandle (), how, out error);
|
||||
Shutdown_icall (safeHandle.DangerousGetHandle (), how, out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
@@ -2823,7 +2826,7 @@ namespace System.Net.Sockets
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
internal extern static void Shutdown_internal (IntPtr socket, SocketShutdown how, out int error);
|
||||
internal extern static void Shutdown_icall (IntPtr socket, SocketShutdown how, out int error);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2856,7 +2859,7 @@ namespace System.Net.Sockets
|
||||
|
||||
/* We don't want to receive any more data */
|
||||
int error;
|
||||
Shutdown_internal (handle, SocketShutdown.Receive, out error);
|
||||
Shutdown_icall (handle, SocketShutdown.Receive, out error);
|
||||
|
||||
if (error != 0)
|
||||
return;
|
||||
@@ -2865,14 +2868,14 @@ namespace System.Net.Sockets
|
||||
int ms = linger_timeout % 1000;
|
||||
if (ms > 0) {
|
||||
/* If the other end closes, this will return 'true' with 'Available' == 0 */
|
||||
Poll_internal (handle, SelectMode.SelectRead, ms * 1000, out error);
|
||||
Poll_icall (handle, SelectMode.SelectRead, ms * 1000, out error);
|
||||
if (error != 0)
|
||||
return;
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
LingerOption linger = new LingerOption (true, seconds);
|
||||
SetSocketOption_internal (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error);
|
||||
SetSocketOption_icall (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error);
|
||||
/* Not needed, we're closing upon return */
|
||||
//if (error != 0)
|
||||
// return;
|
||||
|
||||
@@ -295,13 +295,13 @@ namespace System.Net {
|
||||
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static bool GetHostByName_internal(string host, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint);
|
||||
private extern static bool GetHostByName_icall (string host, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint);
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static bool GetHostByAddr_internal(string addr, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint);
|
||||
private extern static bool GetHostByAddr_icall (string addr, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint);
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private extern static bool GetHostName_internal(out string h_name);
|
||||
private extern static bool GetHostName_icall (out string h_name);
|
||||
|
||||
static void Error_11001 (string hostName)
|
||||
{
|
||||
@@ -372,7 +372,7 @@ namespace System.Net {
|
||||
|
||||
string h_name;
|
||||
string[] h_aliases, h_addrlist;
|
||||
bool ret = GetHostByAddr_internal(address, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint);
|
||||
bool ret = GetHostByAddr_icall (address, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint);
|
||||
if (!ret)
|
||||
Error_11001 (address);
|
||||
return (hostent_to_IPHostEntry (address, h_name, h_aliases, h_addrlist));
|
||||
@@ -436,7 +436,7 @@ namespace System.Net {
|
||||
string h_name;
|
||||
string[] h_aliases, h_addrlist;
|
||||
|
||||
bool ret = GetHostByName_internal(hostName, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint);
|
||||
bool ret = GetHostByName_icall (hostName, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint);
|
||||
if (ret == false)
|
||||
Error_11001 (hostName);
|
||||
|
||||
@@ -447,7 +447,7 @@ namespace System.Net {
|
||||
{
|
||||
string hostName;
|
||||
|
||||
bool ret = GetHostName_internal(out hostName);
|
||||
bool ret = GetHostName_icall (out hostName);
|
||||
|
||||
if (ret == false)
|
||||
Error_11001 (hostName);
|
||||
|
||||
@@ -645,7 +645,6 @@
|
||||
<type fullname="System.Reflection.Emit.LocalBuilder" preserve="fields" feature="sre" />
|
||||
<type fullname="System.Reflection.Emit.MethodBuilder" preserve="fields" feature="sre" />
|
||||
<type fullname="System.Reflection.Emit.ModuleBuilder" preserve="fields" feature="sre">
|
||||
<method name="Mono_GetGuid" feature="sre" />
|
||||
</type>
|
||||
<type fullname="System.Reflection.Emit.MonoResource" preserve="fields" feature="sre" />
|
||||
<type fullname="System.Reflection.Emit.MonoWin32Resource" preserve="fields" feature="sre" />
|
||||
|
||||
@@ -173,6 +173,7 @@ LIB_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
|
||||
TEST_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
|
||||
endif
|
||||
|
||||
XTEST_SPLIT_ASSEMBLIES := $(filter monotouch%, $(PROFILE))
|
||||
|
||||
CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
|
||||
ifdef CC_PROFILE
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Diagnostics;
|
||||
|
||||
namespace System
|
||||
{
|
||||
internal enum LogLevel {
|
||||
internal enum BCLDebugLogLevel {
|
||||
Trace = 0,
|
||||
Status = 20,
|
||||
Warning= 40,
|
||||
@@ -33,7 +33,7 @@ namespace System
|
||||
}
|
||||
|
||||
[Conditional("_DEBUG")]
|
||||
public static void Log (string switchName, LogLevel level, params object[] messages)
|
||||
public static void Log (string switchName, BCLDebugLogLevel level, params object[] messages)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ namespace System.Diagnostics {
|
||||
}
|
||||
|
||||
var filename = frame.GetSecureFileName ();
|
||||
#if !WASM
|
||||
if (filename[0] == '<') {
|
||||
var mvid = frame.GetMethod ().Module.ModuleVersionId.ToString ("N");
|
||||
var aotid = GetAotId ();
|
||||
@@ -252,6 +253,7 @@ namespace System.Diagnostics {
|
||||
filename = string.Format ("<{0}#{1}>", mvid, aotid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
sb.AppendFormat (" in {0}:{1} ", filename, frame.GetFileLineNumber ());
|
||||
}
|
||||
|
||||
@@ -154,6 +154,9 @@ namespace System.Globalization
|
||||
if (default_current_culture != null)
|
||||
return default_current_culture;
|
||||
|
||||
if (GlobalizationMode.Invariant)
|
||||
return InvariantCulture;
|
||||
|
||||
var locale_name = get_current_locale_name ();
|
||||
CultureInfo ci = null;
|
||||
|
||||
|
||||
@@ -1066,12 +1066,6 @@ namespace System.Reflection.Emit {
|
||||
return new Guid (guid);
|
||||
}
|
||||
|
||||
// Used by mcs, the symbol writer, and mdb through reflection
|
||||
internal static Guid Mono_GetGuid (ModuleBuilder mb)
|
||||
{
|
||||
return mb.GetModuleVersionId ();
|
||||
}
|
||||
|
||||
public override Assembly Assembly {
|
||||
get { return assemblyb; }
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace System
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
internal static extern object[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs);
|
||||
internal static extern Attribute[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs);
|
||||
|
||||
internal static object[] GetPseudoCustomAttributes (ICustomAttributeProvider obj, Type attributeType) {
|
||||
object[] pseudoAttrs = null;
|
||||
@@ -134,7 +134,7 @@ namespace System
|
||||
if (!inheritedOnly) {
|
||||
object[] pseudoAttrs = GetPseudoCustomAttributes (obj, attributeType);
|
||||
if (pseudoAttrs != null) {
|
||||
object[] res = new object [attrs.Length + pseudoAttrs.Length];
|
||||
object[] res = new Attribute [attrs.Length + pseudoAttrs.Length];
|
||||
System.Array.Copy (attrs, res, attrs.Length);
|
||||
System.Array.Copy (pseudoAttrs, 0, res, attrs.Length, pseudoAttrs.Length);
|
||||
return res;
|
||||
|
||||
@@ -195,76 +195,81 @@ namespace System {
|
||||
lock (initLock){
|
||||
if (inited)
|
||||
return;
|
||||
inited = true;
|
||||
|
||||
/* This should not happen any more, since it is checked for in Console */
|
||||
if (!ConsoleDriver.IsConsole)
|
||||
throw new IOException ("Not a tty.");
|
||||
|
||||
ConsoleDriver.SetEcho (false);
|
||||
|
||||
string endString = null;
|
||||
keypadXmit = reader.Get (TermInfoStrings.KeypadXmit);
|
||||
keypadLocal = reader.Get (TermInfoStrings.KeypadLocal);
|
||||
if (keypadXmit != null) {
|
||||
WriteConsole (keypadXmit); // Needed to get the arrows working
|
||||
if (keypadLocal != null)
|
||||
endString += keypadLocal;
|
||||
}
|
||||
|
||||
origPair = reader.Get (TermInfoStrings.OrigPair);
|
||||
origColors = reader.Get (TermInfoStrings.OrigColors);
|
||||
setfgcolor = reader.Get (TermInfoStrings.SetAForeground);
|
||||
setbgcolor = reader.Get (TermInfoStrings.SetABackground);
|
||||
maxColors = reader.Get (TermInfoNumbers.MaxColors);
|
||||
maxColors = Math.Max (Math.Min (maxColors, 16), 1);
|
||||
|
||||
string resetColors = (origColors == null) ? origPair : origColors;
|
||||
if (resetColors != null)
|
||||
endString += resetColors;
|
||||
|
||||
unsafe {
|
||||
if (!ConsoleDriver.TtySetup (keypadXmit, endString, out control_characters, out native_terminal_size)){
|
||||
control_characters = new byte [17];
|
||||
native_terminal_size = null;
|
||||
//throw new IOException ("Error initializing terminal.");
|
||||
try {
|
||||
/* This should not happen any more, since it is checked for in Console */
|
||||
if (!ConsoleDriver.IsConsole)
|
||||
throw new IOException ("Not a tty.");
|
||||
|
||||
ConsoleDriver.SetEcho (false);
|
||||
|
||||
string endString = null;
|
||||
keypadXmit = reader.Get (TermInfoStrings.KeypadXmit);
|
||||
keypadLocal = reader.Get (TermInfoStrings.KeypadLocal);
|
||||
if (keypadXmit != null) {
|
||||
WriteConsole (keypadXmit); // Needed to get the arrows working
|
||||
if (keypadLocal != null)
|
||||
endString += keypadLocal;
|
||||
}
|
||||
|
||||
origPair = reader.Get (TermInfoStrings.OrigPair);
|
||||
origColors = reader.Get (TermInfoStrings.OrigColors);
|
||||
setfgcolor = reader.Get (TermInfoStrings.SetAForeground);
|
||||
setbgcolor = reader.Get (TermInfoStrings.SetABackground);
|
||||
maxColors = reader.Get (TermInfoNumbers.MaxColors);
|
||||
maxColors = Math.Max (Math.Min (maxColors, 16), 1);
|
||||
|
||||
string resetColors = (origColors == null) ? origPair : origColors;
|
||||
if (resetColors != null)
|
||||
endString += resetColors;
|
||||
|
||||
unsafe {
|
||||
if (!ConsoleDriver.TtySetup (keypadXmit, endString, out control_characters, out native_terminal_size)){
|
||||
control_characters = new byte [17];
|
||||
native_terminal_size = null;
|
||||
//throw new IOException ("Error initializing terminal.");
|
||||
}
|
||||
}
|
||||
|
||||
stdin = new StreamReader (Console.OpenStandardInput (0), Console.InputEncoding);
|
||||
clear = reader.Get (TermInfoStrings.ClearScreen);
|
||||
bell = reader.Get (TermInfoStrings.Bell);
|
||||
if (clear == null) {
|
||||
clear = reader.Get (TermInfoStrings.CursorHome);
|
||||
clear += reader.Get (TermInfoStrings.ClrEos);
|
||||
}
|
||||
|
||||
csrVisible = reader.Get (TermInfoStrings.CursorNormal);
|
||||
if (csrVisible == null)
|
||||
csrVisible = reader.Get (TermInfoStrings.CursorVisible);
|
||||
|
||||
csrInvisible = reader.Get (TermInfoStrings.CursorInvisible);
|
||||
if (term == "cygwin" || term == "linux" || (term != null && term.StartsWith ("xterm")) ||
|
||||
term == "rxvt" || term == "dtterm") {
|
||||
titleFormat = "\x1b]0;{0}\x7"; // icon + window title
|
||||
} else if (term == "iris-ansi") {
|
||||
titleFormat = "\x1bP1.y{0}\x1b\\"; // not tested
|
||||
} else if (term == "sun-cmd") {
|
||||
titleFormat = "\x1b]l{0}\x1b\\"; // not tested
|
||||
}
|
||||
|
||||
cursorAddress = reader.Get (TermInfoStrings.CursorAddress);
|
||||
|
||||
GetCursorPosition ();
|
||||
#if DEBUG
|
||||
logger.WriteLine ("noGetPosition: {0} left: {1} top: {2}", noGetPosition, cursorLeft, cursorTop);
|
||||
logger.Flush ();
|
||||
#endif
|
||||
if (noGetPosition) {
|
||||
WriteConsole (clear);
|
||||
cursorLeft = 0;
|
||||
cursorTop = 0;
|
||||
}
|
||||
|
||||
} finally {
|
||||
inited = true;
|
||||
}
|
||||
|
||||
stdin = new StreamReader (Console.OpenStandardInput (0), Console.InputEncoding);
|
||||
clear = reader.Get (TermInfoStrings.ClearScreen);
|
||||
bell = reader.Get (TermInfoStrings.Bell);
|
||||
if (clear == null) {
|
||||
clear = reader.Get (TermInfoStrings.CursorHome);
|
||||
clear += reader.Get (TermInfoStrings.ClrEos);
|
||||
}
|
||||
|
||||
csrVisible = reader.Get (TermInfoStrings.CursorNormal);
|
||||
if (csrVisible == null)
|
||||
csrVisible = reader.Get (TermInfoStrings.CursorVisible);
|
||||
|
||||
csrInvisible = reader.Get (TermInfoStrings.CursorInvisible);
|
||||
if (term == "cygwin" || term == "linux" || (term != null && term.StartsWith ("xterm")) ||
|
||||
term == "rxvt" || term == "dtterm") {
|
||||
titleFormat = "\x1b]0;{0}\x7"; // icon + window title
|
||||
} else if (term == "iris-ansi") {
|
||||
titleFormat = "\x1bP1.y{0}\x1b\\"; // not tested
|
||||
} else if (term == "sun-cmd") {
|
||||
titleFormat = "\x1b]l{0}\x1b\\"; // not tested
|
||||
}
|
||||
|
||||
cursorAddress = reader.Get (TermInfoStrings.CursorAddress);
|
||||
|
||||
GetCursorPosition ();
|
||||
#if DEBUG
|
||||
logger.WriteLine ("noGetPosition: {0} left: {1} top: {2}", noGetPosition, cursorLeft, cursorTop);
|
||||
logger.Flush ();
|
||||
#endif
|
||||
if (noGetPosition) {
|
||||
WriteConsole (clear);
|
||||
cursorLeft = 0;
|
||||
cursorTop = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace MonoTests.System.IO
|
||||
DirectoryInfo info = new DirectoryInfo (path);
|
||||
Assert.IsFalse (info.Exists, "#1");
|
||||
info.Create ();
|
||||
Assert.IsFalse (info.Exists, "#2");
|
||||
Assert.IsTrue (info.Exists, "#2");
|
||||
info = new DirectoryInfo (path);
|
||||
Assert.IsTrue (info.Exists, "#3");
|
||||
} finally {
|
||||
|
||||
@@ -5106,6 +5106,16 @@ namespace MonoTests.System
|
||||
typeof(UserByRefLikeStruct).MakeArrayType ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetConstructorsOnArrayOfGenericArgumentsToArraySpecialInterfaceGtd ()
|
||||
{
|
||||
// Regression test for https://github.com/mono/mono/issues/7095#issuecomment-470465597
|
||||
// The assertion here isn't very important; what matters is that the runtime doesn't crash.
|
||||
Type ilist_arg = typeof(IList<>).GetGenericArguments () [0];
|
||||
Type ilist_arg_array = ilist_arg.MakeArrayType ();
|
||||
Assert.NotNull (ilist_arg_array.GetConstructors ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class UserType : Type
|
||||
|
||||
@@ -15,12 +15,19 @@ corefx/GlobalizationMode.cs
|
||||
../../../external/corefx/src/Common/tests/System/Security/Cryptography/ByteUtils.cs
|
||||
../../../external/corefx/src/Common/tests/System/ShouldNotBeInvokedException.cs
|
||||
|
||||
../../../external/corefx/src/System.Reflection/tests/Common.cs
|
||||
|
||||
../../../external/corefx/src/System.Reflection/tests/TypeInfoTests.cs
|
||||
|
||||
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
#../../../external/corefx/src/System.Globalization/tests/CompareInfo/*.cs:
|
||||
|
||||
../../../external/corefx/src/System.Reflection.Emit/tests/Utilities.cs
|
||||
|
||||
../../../external/corefx/src/System.Reflection/tests/Common.cs
|
||||
|
||||
../../../external/corefx/src/System.Reflection/tests/*.cs:AssemblyTests.cs,AssemblyTests.netcoreapp.cs,AssemblyNameTests.cs,MethodInfoTests.cs
|
||||
../../../external/corefx/src/System.Reflection.Extensions/tests/Definitions/PropertyDefinitions.cs
|
||||
../../../external/corefx/src/System.Reflection.Extensions/tests/*.cs
|
||||
@@ -207,56 +214,74 @@ corefx/GlobalizationMode.cs
|
||||
# FIXME: this is internal in corlib
|
||||
../../../external/corefx/src/Common/src/System/MutableDecimal.cs
|
||||
|
||||
# System.Collections
|
||||
../../../external/corefx/src/Common/tests/System/Collections/CollectionAsserts.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestBase.NonGeneric.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestBase.Generic.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestingTypes.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IList.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IList.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ICollection.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IDictionary.Generic.Tests.cs
|
||||
#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs
|
||||
#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ISet.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs
|
||||
../../../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:SortedSet.TreeSubSet.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Stack/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedList/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Queue/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/List/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/LinkedList/*.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:EqualityComparer.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/BitArray/*.cs:BitArray_GetSetTests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/*.cs
|
||||
|
||||
# System.Collections.NonGeneric
|
||||
#../../../external/corefx/src/System.Collections.NonGeneric/tests/ArrayList/*.cs
|
||||
../../../external/corefx/src/System.Collections.NonGeneric/tests/Hashtable/*.cs
|
||||
../../../external/corefx/src/System.Collections.NonGeneric/tests/*.cs:SortedListTests.cs,CollectionBaseTests.cs,DictionaryBaseTests.cs,ArrayListTests.cs,ReadOnlyCollectionBaseTests.cs
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
# System.Collections.Concurrent
|
||||
../../../external/corefx/src/System.Collections.Concurrent/tests/ConcurrentDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Concurrent/tests/*.cs:ProducerConsumerCollectionTests.cs,EtwTests.cs,ConcurrentBagTests.cs,ConcurrentQueueTests.cs,ConcurrentStackTests.cs
|
||||
# System.Runtime.Extensions
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/Diagnostics/*.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/*.cs:VersioningHelperTests.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/*.cs:AppDomainTests.cs,Environment.Exit.cs,Environment.GetCommandLineArgs.cs,Environment.GetEnvironmentVariable.cs,Environment.SetEnvironmentVariable.cs,EnvironmentTests.cs,Environment.StackTrace.cs,MarshalByRefObjectTest.cs,StringComparer.cs,StringComparer.netcoreapp.cs,UnloadingAndProcessExitTests.netcoreapp.cs,Environment.UserDomainName.cs,Environment.MachineName.cs
|
||||
|
||||
# System.Collections.Specialized
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/StringDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/NameObjectCollectionBase/*.cs:NameObjectCollectionBase.KeysTests.cs,NameObjectCollectionBase.CopyToTests.cs
|
||||
#../../../external/corefx/src/System.Collections.Specialized/tests/NameValueCollection/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/ListDictionary/*.cs
|
||||
../../../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
|
||||
# System.Runtime.InteropServices
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/tests/System/Runtime/CompilerServices/*.cs
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/*.cs:MarshalTests.cs,GCHandleTests.cs,SafeBufferTests.cs,ComEventsHelperTests.cs,RuntimeEnvironmentTests.cs,DispatchWrapperTests.cs,ArrayWithOffsetTests.cs,SetWin32ContextInIDispatchAttributeTests.cs,ComAwareEventInfoTests.cs,IDispatchImplAttributeTests.cs,ComAwareEventInfoTests.Windows.cs,MarshalTests.Windows.cs
|
||||
|
||||
# System.IO.MemoryStream
|
||||
../../../external/corefx/src/System.IO/tests/MemoryStream/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/DelegateStream.cs
|
||||
|
||||
# System.IO.UnmanagedMemoryStream
|
||||
../../../external/corefx/src/System.IO.UnmanagedMemoryStream/tests/*.cs
|
||||
|
||||
# System.IO.TextReader/StreamReader
|
||||
../../../external/corefx/src/System.IO/tests/TextReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs
|
||||
|
||||
# System.IO.Stream
|
||||
../../../external/corefx/src/Common/tests/System/IO/CallTrackingStream.cs
|
||||
../../../external/corefx/src/System.IO/tests/Stream/*.cs
|
||||
|
||||
# System.IO.BufferedStream
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.CloseTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.FlushTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriterTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/StreamReaderTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/WrappedMemoryStream.cs
|
||||
../../../external/corefx/src/System.IO/tests/BufferedStream/*.cs
|
||||
|
||||
# FileSystem Helper (not used on Windows)
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileSystemTest.Unix.cs
|
||||
|
||||
# System.IO.FileInfo
|
||||
../../../external/corefx/src/Common/tests/System/IO/TempFile.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/PathFeatures.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/TestData.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FSAssert.cs
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AdminHelpers.cs
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TheoryExtensions.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/Base/*.cs:StaticGetSetTimes.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/File/*.cs:GetSetTimes.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileStream/ctor_*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/PortedCommon/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileSystemTest.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileInfo/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.Directory
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/Directory/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.DirectoryInfo
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/DirectoryInfo/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.TextWriter/StreamWriter
|
||||
../../../external/corefx/src/System.IO/tests/TextReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/*.cs
|
||||
|
||||
# System.Runtime
|
||||
../../../external/corefx/src/System.Runtime/tests/System/AccessViolationExceptionTests.cs
|
||||
@@ -341,66 +366,54 @@ corefx/GlobalizationMode.cs
|
||||
../../../external/corefx/src/System.Runtime/tests/System/Text/*.cs
|
||||
../../../external/corefx/src/System.Runtime/tests/System/Runtime/CompilerServices/*.cs:RuntimeHelpersTests.netcoreapp.cs,ConditionalWeakTableTests.netcoreapp.cs,ConditionalWeakTableTests.cs
|
||||
|
||||
# System.Runtime.Extensions
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/Diagnostics/*.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/*.cs:VersioningHelperTests.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/tests/System/*.cs:AppDomainTests.cs,Environment.Exit.cs,Environment.GetCommandLineArgs.cs,Environment.GetEnvironmentVariable.cs,Environment.SetEnvironmentVariable.cs,EnvironmentTests.cs,Environment.StackTrace.cs,MarshalByRefObjectTest.cs,StringComparer.cs,StringComparer.netcoreapp.cs,UnloadingAndProcessExitTests.netcoreapp.cs,Environment.UserDomainName.cs,Environment.MachineName.cs
|
||||
# System.Collections
|
||||
../../../external/corefx/src/Common/tests/System/Collections/CollectionAsserts.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestBase.NonGeneric.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestBase.Generic.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/TestingTypes.cs
|
||||
../../../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/Common/tests/System/Collections/IList.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IList.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ICollection.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IDictionary.Generic.Tests.cs
|
||||
#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs
|
||||
#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/ISet.Generic.Tests.cs
|
||||
../../../external/corefx/src/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs:SortedSet.TreeSubSet.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Stack/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedList/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/SortedDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/Queue/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/List/*.cs
|
||||
../../../external/corefx/src/System.Collections/tests/Generic/LinkedList/*.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:EqualityComparer.Tests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/BitArray/*.cs:BitArray_GetSetTests.cs
|
||||
../../../external/corefx/src/System.Collections/tests/*.cs
|
||||
|
||||
# System.Runtime.InteropServices
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/tests/System/Runtime/CompilerServices/*.cs
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/*.cs:MarshalTests.cs,GCHandleTests.cs,SafeBufferTests.cs,ComEventsHelperTests.cs,RuntimeEnvironmentTests.cs,DispatchWrapperTests.cs,ArrayWithOffsetTests.cs,SetWin32ContextInIDispatchAttributeTests.cs,ComAwareEventInfoTests.cs,IDispatchImplAttributeTests.cs,ComAwareEventInfoTests.Windows.cs,MarshalTests.Windows.cs
|
||||
# System.Collections.NonGeneric
|
||||
#../../../external/corefx/src/System.Collections.NonGeneric/tests/ArrayList/*.cs
|
||||
../../../external/corefx/src/System.Collections.NonGeneric/tests/Hashtable/*.cs
|
||||
../../../external/corefx/src/System.Collections.NonGeneric/tests/*.cs:SortedListTests.cs,CollectionBaseTests.cs,DictionaryBaseTests.cs,ArrayListTests.cs,ReadOnlyCollectionBaseTests.cs
|
||||
|
||||
# System.IO.MemoryStream
|
||||
../../../external/corefx/src/System.IO/tests/MemoryStream/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/DelegateStream.cs
|
||||
# System.Collections.Concurrent
|
||||
../../../external/corefx/src/System.Collections.Concurrent/tests/ConcurrentDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Concurrent/tests/*.cs:ProducerConsumerCollectionTests.cs,EtwTests.cs,ConcurrentBagTests.cs,ConcurrentQueueTests.cs,ConcurrentStackTests.cs
|
||||
|
||||
# System.IO.UnmanagedMemoryStream
|
||||
../../../external/corefx/src/System.IO.UnmanagedMemoryStream/tests/*.cs
|
||||
# System.Collections.Specialized
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/StringDictionary/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/NameObjectCollectionBase/*.cs:NameObjectCollectionBase.KeysTests.cs,NameObjectCollectionBase.CopyToTests.cs
|
||||
#../../../external/corefx/src/System.Collections.Specialized/tests/NameValueCollection/*.cs
|
||||
../../../external/corefx/src/System.Collections.Specialized/tests/ListDictionary/*.cs
|
||||
../../../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
|
||||
|
||||
# System.IO.TextReader/StreamReader
|
||||
../../../external/corefx/src/System.IO/tests/TextReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs
|
||||
|
||||
# System.IO.Stream
|
||||
../../../external/corefx/src/Common/tests/System/IO/CallTrackingStream.cs
|
||||
../../../external/corefx/src/System.IO/tests/Stream/*.cs
|
||||
|
||||
# System.IO.BufferedStream
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.CloseTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamWriter/StreamWriter.FlushTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriterTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/StreamReaderTests.cs
|
||||
../../../external/corefx/src/System.IO/tests/TestDataProvider/TestDataProvider.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/WrappedMemoryStream.cs
|
||||
../../../external/corefx/src/System.IO/tests/BufferedStream/*.cs
|
||||
|
||||
# FileSystem Helper (not used on Windows)
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileSystemTest.Unix.cs
|
||||
|
||||
# System.IO.FileInfo
|
||||
../../../external/corefx/src/Common/tests/System/IO/TempFile.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/PathFeatures.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/TestData.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FSAssert.cs
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AdminHelpers.cs
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TheoryExtensions.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/Base/*.cs:StaticGetSetTimes.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/File/*.cs:GetSetTimes.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileStream/ctor_*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/PortedCommon/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileSystemTest.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/FileInfo/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.Directory
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/Directory/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.DirectoryInfo
|
||||
../../../external/corefx/src/System.IO.FileSystem/tests/DirectoryInfo/*.cs:GetSetTimes.cs
|
||||
|
||||
# System.IO.TextWriter/StreamWriter
|
||||
../../../external/corefx/src/System.IO/tests/TextReader/*.cs
|
||||
../../../external/corefx/src/System.IO/tests/StreamReader/*.cs
|
||||
@@ -86,7 +86,9 @@ namespace System.ServiceModel
|
||||
int j;
|
||||
for (j = s.Length; j > 0 && IsWhitespace(s[j - 1]); j--);
|
||||
|
||||
#if !MONO
|
||||
Fx.Assert(j > i, "Logic error in XmlUtil.Trim().");
|
||||
#endif
|
||||
|
||||
if (i != 0 || j != s.Length)
|
||||
{
|
||||
|
||||
@@ -750,7 +750,7 @@ namespace System.Xml {
|
||||
// This method tests whether a value is in a given range with just one test; start and end should be constants
|
||||
private static bool InRange(int value, int start, int end) {
|
||||
Debug.Assert(start <= end);
|
||||
return (uint)(value - start) <= (uint)(end - start);
|
||||
return (uint)(value - start) <= (uint)(end - start);
|
||||
}
|
||||
|
||||
#if XMLCHARTYPE_GEN_RESOURCE
|
||||
|
||||
@@ -23,9 +23,9 @@ namespace System.Net.Sockets {
|
||||
|
||||
#if MONO
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute (System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
|
||||
static extern int WSAGetLastError_internal ();
|
||||
static extern int WSAGetLastError_icall ();
|
||||
|
||||
public SocketException () : base (WSAGetLastError_internal ())
|
||||
public SocketException () : base (WSAGetLastError_icall ())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace System.Net.Sockets {
|
||||
|
||||
#if MONO
|
||||
int error;
|
||||
m_Handle = new SafeSocketHandle (Socket_internal (addressFamily, socketType, protocolType, out error), true);
|
||||
m_Handle = new SafeSocketHandle (Socket_icall (addressFamily, socketType, protocolType, out error), true);
|
||||
#else
|
||||
m_Handle = SafeCloseSocket.CreateWSASocket(
|
||||
addressFamily,
|
||||
|
||||
@@ -241,6 +241,13 @@ namespace System.Globalization {
|
||||
[System.Security.SecuritySafeCritical] // auto-generated
|
||||
internal NumberFormatInfo(CultureData cultureData)
|
||||
{
|
||||
#if MONO
|
||||
if (GlobalizationMode.Invariant) {
|
||||
this.m_isInvariant = true;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cultureData != null)
|
||||
{
|
||||
// We directly use fields here since these data is coming from data table or Win32, so we
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace System.Resources {
|
||||
_store.BaseStream.Seek(_nameSectionOffset + GetNamePosition(index), SeekOrigin.Begin);
|
||||
lastReadString = _store.ReadString();
|
||||
}
|
||||
BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\'');
|
||||
BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\'');
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
@@ -909,7 +909,7 @@ namespace System.Resources {
|
||||
throw new BadImageFormatException(Environment.GetResourceString("BadImageFormat_ResourcesHeaderCorrupted"));
|
||||
}
|
||||
if (resMgrHeaderVersion > 1) {
|
||||
BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip);
|
||||
BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip);
|
||||
_store.BaseStream.Seek(numBytesToSkip, SeekOrigin.Current);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -30,7 +30,6 @@ ROSLYN_FILES_TO_COPY_FOR_MSBUILD = \
|
||||
$(ROSLYN_CSC_DIR)/Microsoft.Build.Tasks.CodeAnalysis.dll \
|
||||
$(ROSLYN_CSC_DIR)/Microsoft.CSharp.Core.targets \
|
||||
$(ROSLYN_CSC_DIR)/Microsoft.Managed.Core.targets \
|
||||
$(ROSLYN_CSC_DIR)/Microsoft.Managed.EditorConfig.targets \
|
||||
$(ROSLYN_CSC_DIR)/Microsoft.VisualBasic.Core.targets
|
||||
|
||||
DISTFILES = $(ROSLYN_FILES_FOR_MONO) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) csi-test.csx
|
||||
|
||||
@@ -116,9 +116,6 @@ public static class Program {
|
||||
if (SourcesParser.TraceLevel > 0)
|
||||
Console.Error.WriteLine ($"// Writing sources from {sourcesFile} minus {excludesFile}, to {outFile}.");
|
||||
} else if (args.Count == 4) {
|
||||
if (baseDir != null)
|
||||
Console.Error.WriteLine ($"// WARNING: baseDir has no effect in this mode");
|
||||
|
||||
var libraryFullName = Path.GetFullPath (args[1]);
|
||||
var platformName = args[2].Trim ();
|
||||
var profileName = args[3].Trim ();
|
||||
@@ -135,13 +132,12 @@ public static class Program {
|
||||
throw new Exception ();
|
||||
}
|
||||
|
||||
var fileNames = result.GetMatches ()
|
||||
var files = result.GetMatches ()
|
||||
.OrderBy (e => e.RelativePath, StringComparer.Ordinal)
|
||||
.Select (e => e.RelativePath)
|
||||
.Distinct ()
|
||||
.Distinct (new MatchEntryEqualityComparer ())
|
||||
.ToList ();
|
||||
|
||||
var unexpectedEmptyResult = (fileNames.Count == 0);
|
||||
var unexpectedEmptyResult = (files.Count == 0);
|
||||
|
||||
// HACK: We have sources files that are literally empty, so as long as *some* sources files were
|
||||
// parsed during this invocation and they are all empty, producing no matching file names is not
|
||||
@@ -150,7 +146,7 @@ public static class Program {
|
||||
unexpectedEmptyResult = false;
|
||||
|
||||
if ((result.ErrorCount > 0) || unexpectedEmptyResult) {
|
||||
Console.Error.WriteLine ($"// gensources produced {result.ErrorCount} error(s) and a set of {fileNames.Count} filename(s)");
|
||||
Console.Error.WriteLine ($"// gensources produced {result.ErrorCount} error(s) and a set of {files.Count} filename(s)");
|
||||
Console.Error.WriteLine ($"// Invoked with '{Environment.CommandLine}'");
|
||||
Console.Error.WriteLine ($"// Working directory was '{Environment.CurrentDirectory}'");
|
||||
|
||||
@@ -163,17 +159,29 @@ public static class Program {
|
||||
}
|
||||
}
|
||||
|
||||
TextWriter output;
|
||||
if (useStdout)
|
||||
output = Console.Out;
|
||||
else
|
||||
output = new StreamWriter (outFile);
|
||||
int parts = files.Count == 0 ? 0 : files.Max (f => f.SplitNumber);
|
||||
if (useStdout && parts > 0)
|
||||
throw new InvalidOperationException ("useStdout can't be used together with assembly splitting");
|
||||
|
||||
using (output) {
|
||||
foreach (var fileName in fileNames)
|
||||
output.WriteLine (fileName);
|
||||
TextWriter[] outputs = new TextWriter[parts + 1];
|
||||
for (int i = 0; i < parts + 1; i++) { // we create one file with all sources and part assemblies with only common+specific ones
|
||||
outputs[i] = useStdout ? Console.Out : new StreamWriter (i == 0 ? outFile : $"{outFile}.part{i}");
|
||||
}
|
||||
|
||||
foreach (var fileName in files) {
|
||||
if (fileName.SplitNumber == 0) { // split number 0 is the special case: common files that should be included in all output parts
|
||||
foreach (var output in outputs)
|
||||
output.WriteLine (fileName.RelativePath);
|
||||
}
|
||||
else { // all other split numbers should only be included in the full assembly and the specific part assembly
|
||||
outputs[0].WriteLine (fileName.RelativePath);
|
||||
outputs[fileName.SplitNumber].WriteLine (fileName.RelativePath);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var output in outputs)
|
||||
output.Dispose();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -195,11 +203,25 @@ public class SourcesFile {
|
||||
public struct ParseEntry {
|
||||
public string Directory;
|
||||
public string Pattern;
|
||||
public int SplitNumber;
|
||||
}
|
||||
|
||||
public struct MatchEntry {
|
||||
public SourcesFile SourcesFile;
|
||||
public string RelativePath;
|
||||
public int SplitNumber;
|
||||
}
|
||||
|
||||
public class MatchEntryEqualityComparer : IEqualityComparer<MatchEntry> {
|
||||
public bool Equals (MatchEntry x, MatchEntry y)
|
||||
{
|
||||
return (x.RelativePath == y.RelativePath);
|
||||
}
|
||||
|
||||
public int GetHashCode (MatchEntry obj)
|
||||
{
|
||||
return obj.RelativePath?.GetHashCode() ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class TargetParseResult {
|
||||
@@ -309,6 +331,7 @@ public class ParseResult {
|
||||
yield return new MatchEntry {
|
||||
SourcesFile = sourcesFile,
|
||||
RelativePath = relativePath,
|
||||
SplitNumber = entry.SplitNumber
|
||||
};
|
||||
}
|
||||
} else {
|
||||
@@ -329,6 +352,7 @@ public class ParseResult {
|
||||
yield return new MatchEntry {
|
||||
SourcesFile = sourcesFile,
|
||||
RelativePath = relativePath,
|
||||
SplitNumber = entry.SplitNumber
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -403,6 +427,7 @@ public class SourcesParser {
|
||||
public string HostPlatform;
|
||||
public string ProfileName;
|
||||
public string ExclusionsFileName;
|
||||
public int CurrentSplitNumber;
|
||||
|
||||
public int SourcesFilesParsed, ExclusionsFilesParsed;
|
||||
}
|
||||
@@ -413,6 +438,7 @@ public class SourcesParser {
|
||||
public readonly string BaseDirectory;
|
||||
|
||||
private int ParseDepth = 0;
|
||||
private string TargetProfileName = "";
|
||||
|
||||
public SourcesParser (
|
||||
string platformsFolder, string profilesFolder, string baseDir
|
||||
@@ -442,6 +468,7 @@ public class SourcesParser {
|
||||
}
|
||||
|
||||
public ParseResult Parse (string libraryDirectory, string libraryName, string hostPlatform, string profile) {
|
||||
TargetProfileName = profile;
|
||||
var state = new State {
|
||||
Result = new ParseResult (libraryDirectory),
|
||||
ProfileName = profile,
|
||||
@@ -581,6 +608,7 @@ public class SourcesParser {
|
||||
bool asExclusionsList, string directive
|
||||
) {
|
||||
var include = "#include ";
|
||||
var split = "#split ";
|
||||
if (directive.StartsWith (include)) {
|
||||
var includeName = directive.Substring (include.Length).Trim ();
|
||||
var fileName = Path.Combine (includeDirectory, includeName);
|
||||
@@ -598,6 +626,14 @@ public class SourcesParser {
|
||||
}
|
||||
|
||||
file.Includes.Add (newFile);
|
||||
} else if (directive.StartsWith (split)) {
|
||||
if (asExclusionsList) throw new InvalidOperationException ("split directive is not valid for exclusion lists");
|
||||
|
||||
var profileName = directive.Substring (split.Length).Trim ();
|
||||
|
||||
if (profileName == TargetProfileName) {
|
||||
state.CurrentSplitNumber++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,7 +751,8 @@ public class SourcesParser {
|
||||
foreach (var pattern in explicitExclusions) {
|
||||
result.Exclusions.Add (new ParseEntry {
|
||||
Directory = pathDirectory,
|
||||
Pattern = Path.Combine (mainPatternDirectory, pattern)
|
||||
Pattern = Path.Combine (mainPatternDirectory, pattern),
|
||||
SplitNumber = state.CurrentSplitNumber
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -723,7 +760,8 @@ public class SourcesParser {
|
||||
(asExclusionsList ? result.Exclusions : result.Sources)
|
||||
.Add (new ParseEntry {
|
||||
Directory = pathDirectory,
|
||||
Pattern = parts[0]
|
||||
Pattern = parts[0],
|
||||
SplitNumber = state.CurrentSplitNumber
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,8 @@ BINARY_TEST_CASES = \
|
||||
endif
|
||||
|
||||
ifeq ($(PROFILE),wasm)
|
||||
LINKER_PROFILE_OPTIONS += --exclude-feature remoting --exclude-feature com --exclude-feature etw -d ../../../external/binary-reference-assemblies/build/monowasm
|
||||
LINKER_PROFILE_OPTIONS += --exclude-feature remoting --exclude-feature com --exclude-feature etw -d $(topdir)/../external/binary-reference-assemblies/build/monowasm \
|
||||
--substitutions $(topdir)/../sdks/wasm/src/linker-subs.xml
|
||||
|
||||
BINARY_TEST_CASES_ROOT:=../../../external/illinker-test-assets/wasm/
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
System.Core/test-plinq-01.exe,1585664,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-01.exe,1910272,14336,385024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,1585152,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-01.exe,1910272,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-02.exe,1910272,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1913344,101376,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1907200,71168,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1913344,101376,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1907200,71168,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1611264,81408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1578496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1578496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
@@ -13,7 +13,7 @@ mscorlib/test-exception-01.exe,1578496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1580544,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1578496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1578496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1588736,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1588224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1579520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1588224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection.exe,1873920,13824,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
|
@@ -53,6 +53,7 @@
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\AddBypassNGenStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\BaseStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\BlacklistStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\BodySubstituterStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\CleanStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\ClearInitLocals.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\CodeRewriterStep.cs" />
|
||||
@@ -67,6 +68,7 @@
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\RegenerateGuidStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\RemoveFeaturesStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\RemoveSecurityStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\RemoveUnreachableBlocksStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\ResolveFromAssemblyStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\ResolveFromXApiStep.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker.Steps\ResolveFromXmlStep.cs" />
|
||||
@@ -83,6 +85,7 @@
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\DirectoryAssemblyResolver.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\Driver.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\I18nAssemblies.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\IDependencyRecorder.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\ILogger.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\IXApiVisitor.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\Inflater.cs" />
|
||||
@@ -104,6 +107,7 @@
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\TypePreserve.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\TypeReferenceExtensions.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\XApiReader.cs" />
|
||||
<Compile Include="..\..\..\external\linker\src\linker\Linker\XmlDependencyRecorder.cs" />
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
../../../external/linker/src/linker/Linker/ConsoleLogger.cs
|
||||
../../../external/linker/src/linker/Linker/DirectoryAssemblyResolver.cs
|
||||
../../../external/linker/src/linker/Linker/Driver.cs
|
||||
../../../external/linker/src/linker/Linker/IDependencyRecorder.cs
|
||||
../../../external/linker/src/linker/Linker/I18nAssemblies.cs
|
||||
../../../external/linker/src/linker/Linker/ILogger.cs
|
||||
../../../external/linker/src/linker/Linker/IXApiVisitor.cs
|
||||
@@ -29,6 +30,7 @@
|
||||
../../../external/linker/src/linker/Linker/TypePreserve.cs
|
||||
../../../external/linker/src/linker/Linker/TypeReferenceExtensions.cs
|
||||
../../../external/linker/src/linker/Linker/XApiReader.cs
|
||||
../../../external/linker/src/linker/Linker/XmlDependencyRecorder.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/BaseStep.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/ClearInitLocals.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/LoadReferencesStep.cs
|
||||
@@ -52,4 +54,6 @@
|
||||
../../../external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/ReflectionBlockedStep.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs
|
||||
../../../external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1840640,719360,369152,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
|
||||
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1841152,720384,369152,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
|
||||
System.Core/test-plinq-01.exe,1021952,13824,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1411584,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1404416,64000,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1171968,80384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1412096,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1404928,64000,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1172480,80384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
@@ -12,10 +12,10 @@ mscorlib/test-exception-01.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1017344,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1026560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1028608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1026048,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1028096,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1026048,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1015296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1015808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1024512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1024000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,1019392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
@@ -1,23 +1,23 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.Build.Engine.dll,Microsoft.Build.Framework.dll,Microsoft.Build.Tasks.v4.0.dll,Microsoft.Build.Utilities.v4.0.dll,Microsoft.Build.dll,Microsoft.CSharp.dll,Microsoft.VisualC.dll,Microsoft.Web.Infrastructure.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Configuration.Install.dll,System.Configuration.dll,System.Data.DataSetExtensions.dll,System.Data.Entity.dll,System.Data.Linq.dll,System.Data.OracleClient.dll,System.Data.Services.Client.dll,System.Data.Services.dll,System.Data.dll,System.Deployment.dll,System.Design.dll,System.DirectoryServices.Protocols.dll,System.DirectoryServices.dll,System.Drawing.Design.dll,System.Drawing.dll,System.Dynamic.dll,System.EnterpriseServices.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.Selectors.dll,System.IdentityModel.dll,System.Json.Microsoft.dll,System.Json.dll,System.Management.dll,System.Messaging.dll,System.Net.Http.Formatting.dll,System.Net.Http.WebRequest.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reactive.Core.dll,System.Reactive.Debugger.dll,System.Reactive.Experimental.dll,System.Reactive.Interfaces.dll,System.Reactive.Linq.dll,System.Reactive.Observable.Aliases.dll,System.Reactive.PlatformServices.dll,System.Reactive.Providers.dll,System.Reactive.Runtime.Remoting.dll,System.Reactive.Windows.Forms.dll,System.Reactive.Windows.Threading.dll,System.Reflection.Context.dll,System.Runtime.Caching.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.DurableInstancing.dll,System.Runtime.Remoting.dll,System.Runtime.Serialization.Formatters.Soap.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Activation.dll,System.ServiceModel.Discovery.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Routing.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.ServiceProcess.dll,System.Threading.Tasks.Dataflow.dll,System.Transactions.dll,System.Web.Abstractions.dll,System.Web.ApplicationServices.dll,System.Web.DynamicData.dll,System.Web.Extensions.Design.dll,System.Web.Extensions.dll,System.Web.Http.SelfHost.dll,System.Web.Http.WebHost.dll,System.Web.Http.dll,System.Web.Mobile.dll,System.Web.Mvc.dll,System.Web.Razor.dll,System.Web.RegularExpressions.dll,System.Web.Routing.dll,System.Web.Services.dll,System.Web.WebPages.Deployment.dll,System.Web.WebPages.Razor.dll,System.Web.WebPages.dll,System.Web.dll,System.Windows.Forms.DataVisualization.dll,System.Windows.Forms.dll,System.Windows.dll,System.Workflow.Activities.dll,System.Workflow.ComponentModel.dll,System.Workflow.Runtime.dll,System.Xaml.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2386944,1024000,346112,1318400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,621568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
|
||||
System.Core/test-plinq-01.exe,1584640,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2386944,1024512,346112,1319424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,622080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
|
||||
System.Core/test-plinq-01.exe,1584128,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-01.exe,2000896,62464,365056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-02.exe,2000896,62464,365568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,2172928,841216,7168,693760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1600512,136704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1580032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1587712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1724416,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1587200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,2172928,841728,7168,694272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1600000,136704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1579520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1587200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1679360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1586688,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection.exe,1964032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-remoting.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-remoting.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1582080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,1582080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,1581568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
@@ -1,24 +1,24 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.Net.Http.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.Transactions.dll,System.Xml.Linq.dll
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1162752,66560,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1144832,66560,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1195008,68096,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1145344,66560,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,614400,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,760320,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1085952,59904,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,720896,78848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,881664,11264,24064,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,562688,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,566272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,658944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,566272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,553984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,554496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,563200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,612352,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1162240,67072,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1144320,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1190400,68608,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1144320,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,608768,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,758272,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1084928,60416,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,721408,78848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,880128,11776,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,558080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,562176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,653312,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,561664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,549376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,549888,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,558592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,606720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
+16
-3
@@ -137,15 +137,28 @@ dump_table_assemblyref (MonoImage *m)
|
||||
cols [MONO_ASSEMBLYREF_REV_NUMBER],
|
||||
mono_metadata_string_heap (m, cols [MONO_ASSEMBLYREF_NAME]));
|
||||
fprintf (output, "\tFlags=0x%08x\n", cols [MONO_ASSEMBLYREF_FLAGS]);
|
||||
ptr = mono_metadata_blob_heap (m, cols [MONO_ASSEMBLYREF_PUBLIC_KEY]);
|
||||
len = mono_metadata_decode_value (ptr, &ptr);
|
||||
ptr = mono_metadata_blob_heap_null_ok (m, cols [MONO_ASSEMBLYREF_PUBLIC_KEY]);
|
||||
if (ptr)
|
||||
len = mono_metadata_decode_value (ptr, &ptr);
|
||||
else
|
||||
len = 0;
|
||||
if (len > 0){
|
||||
fprintf (output, "\tPublic Key:");
|
||||
hex_dump (ptr, 0, len);
|
||||
fprintf (output, "\n");
|
||||
} else
|
||||
fprintf (output, "\tZero sized public key\n");
|
||||
|
||||
ptr = mono_metadata_blob_heap_null_ok (m, cols [MONO_ASSEMBLYREF_HASH_VALUE]);
|
||||
if (ptr)
|
||||
len = mono_metadata_decode_value (ptr, &ptr);
|
||||
else
|
||||
len = 0;
|
||||
if (len > 0) {
|
||||
fprintf (output, "\tHash:");
|
||||
hex_dump (ptr, 0, len);
|
||||
fprintf (output, "\n");
|
||||
} else
|
||||
fprintf (output, "\tZero sized hash value\n");
|
||||
}
|
||||
fprintf (output, "\n");
|
||||
}
|
||||
|
||||
+1
-1
@@ -1951,7 +1951,7 @@ monodis_assembly_search_hook (MonoAssemblyLoadContext *alc, MonoAssembly *reques
|
||||
|
||||
for (tmp = loaded_assemblies; tmp; tmp = tmp->next) {
|
||||
MonoAssembly *ass = (MonoAssembly *)tmp->data;
|
||||
if (mono_assembly_names_equal (aname, &ass->aname))
|
||||
if (mono_assembly_check_name_match (aname, &ass->aname))
|
||||
return ass;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -63,7 +63,11 @@ if !ENABLE_MSVC_ONLY
|
||||
eglibdir=$(datadir)/mono-$(API_VER)/mono/eglib
|
||||
eglib_DATA = eglib-config.h
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
|
||||
libeglib_la_CFLAGS = -g -Wall -D_GNU_SOURCE
|
||||
|
||||
if !HOST_WIN32
|
||||
libeglib_la_CFLAGS += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
|
||||
|
||||
+3
-3
@@ -247,11 +247,11 @@ typedef guint32 gunichar;
|
||||
#define ABS(a) ((a) > 0 ? (a) : -(a))
|
||||
#endif
|
||||
|
||||
#define ALIGN_TO(val,align) ((((gssize)val) + ((align) - 1)) & ~((align) - 1))
|
||||
#define ALIGN_TO(val,align) ((((gssize)val) + (gssize)((align) - 1)) & (~((gssize)(align - 1))))
|
||||
|
||||
#define ALIGN_DOWN_TO(val,align) (((gssize)val) & ~((align) - 1))
|
||||
#define ALIGN_DOWN_TO(val,align) (((gssize)val) & (~((gssize)(align - 1))))
|
||||
|
||||
#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
|
||||
#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (gssize)(align - 1)) & (~((gssize)(align - 1))))
|
||||
|
||||
#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field)
|
||||
|
||||
|
||||
@@ -34,7 +34,10 @@ SOURCES = \
|
||||
|
||||
test_eglib_SOURCES = $(SOURCES)
|
||||
|
||||
GLIB_TEST_FLAGS_COMMON = -Wall -DEGLIB_TESTS=1 -D_FORTIFY_SOURCE=2 -I$(srcdir)/.. -I.. -DDRIVER_NAME=\"EGlib\"
|
||||
GLIB_TEST_FLAGS_COMMON = -Wall -DEGLIB_TESTS=1 -I$(srcdir)/.. -I.. -DDRIVER_NAME=\"EGlib\"
|
||||
if !HOST_WIN32
|
||||
GLIB_TEST_FLAGS_COMMON += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
CFLAGS += $(GLIB_TEST_FLAGS_COMMON)
|
||||
CXXFLAGS += $(GLIB_TEST_FLAGS_COMMON) @CXXFLAGS_COMMON@
|
||||
if HOST_AIX
|
||||
|
||||
+117
-14
@@ -1,4 +1,3 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include "test.h"
|
||||
|
||||
@@ -8,31 +7,135 @@ test_memory_zero_size_allocations (void)
|
||||
gpointer p;
|
||||
|
||||
p = g_malloc (0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc with size zero should return NULL.");
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc with size zero should return NULL.");
|
||||
|
||||
p = g_malloc0 (0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc0 with size zero should return NULL.");
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc0 with size zero should return NULL.");
|
||||
|
||||
p = g_realloc (NULL, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_realloc with size zero should return NULL.");
|
||||
if (p)
|
||||
return FAILED ("Calling g_realloc with size zero should return NULL.");
|
||||
|
||||
p = g_new (int, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_new with size zero should return NULL.");
|
||||
if (p)
|
||||
return FAILED ("Calling g_new with size zero should return NULL.");
|
||||
|
||||
p = g_new0 (int, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_new0 with size zero should return NULL.");
|
||||
if (p)
|
||||
return FAILED ("Calling g_new0 with size zero should return NULL.");
|
||||
|
||||
return OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test the following macros with alignment value as signed int
|
||||
* <> ALIGN_TO
|
||||
* <> ALIGN_DOWN_TO
|
||||
* <> ALIGN_PTR_TO
|
||||
*/
|
||||
static RESULT
|
||||
test_align_signed_int (void)
|
||||
{
|
||||
gssize orig_value = 67;
|
||||
gssize result, exp_value;
|
||||
gpointer orig_ptr = (gpointer)orig_value;
|
||||
gpointer result_ptr, exp_ptr;
|
||||
|
||||
// test case #1
|
||||
int align = 1;
|
||||
result = ALIGN_TO (orig_value, align);
|
||||
exp_value = orig_value;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result = ALIGN_DOWN_TO (orig_value, align);
|
||||
exp_value = orig_value;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result_ptr = ALIGN_PTR_TO (orig_ptr,align);
|
||||
exp_ptr = orig_ptr;
|
||||
if (result_ptr != exp_ptr)
|
||||
return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr);
|
||||
|
||||
// test case #2
|
||||
align = 8;
|
||||
result = ALIGN_TO (orig_value, align);
|
||||
exp_value = 72;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result_ptr = ALIGN_PTR_TO (orig_ptr,align);
|
||||
exp_ptr= (gpointer)exp_value;
|
||||
if (result_ptr != exp_ptr)
|
||||
return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr);
|
||||
|
||||
result = ALIGN_DOWN_TO (orig_value, align);
|
||||
exp_value = 64;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test the following macros with alignment value as unsigned int
|
||||
* <> ALIGN_TO
|
||||
* <> ALIGN_DOWN_TO
|
||||
* <> ALIGN_PTR_TO
|
||||
*/
|
||||
static RESULT
|
||||
test_align_unsigned_int (void)
|
||||
{
|
||||
gssize orig_value = 67;
|
||||
gssize result, exp_value;
|
||||
gpointer orig_ptr = (gpointer)orig_value;
|
||||
gpointer result_ptr, exp_ptr;
|
||||
|
||||
// test case #1
|
||||
unsigned int align = 1;
|
||||
result = ALIGN_TO (orig_value, align);
|
||||
exp_value = orig_value;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result = ALIGN_DOWN_TO (orig_value, align);
|
||||
exp_value = orig_value;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result_ptr = ALIGN_PTR_TO (orig_ptr,align);
|
||||
exp_ptr = orig_ptr;
|
||||
if (result_ptr != exp_ptr)
|
||||
return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr);
|
||||
|
||||
// test case #2
|
||||
align= 16;
|
||||
result = ALIGN_TO (orig_value, align);
|
||||
exp_value = 80;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
result_ptr = ALIGN_PTR_TO (orig_ptr,align);
|
||||
exp_ptr= (gpointer)exp_value;
|
||||
if (result_ptr != exp_ptr)
|
||||
return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr);
|
||||
|
||||
result = ALIGN_DOWN_TO (orig_value, align);
|
||||
exp_value = 64;
|
||||
if (result != exp_value)
|
||||
return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
static Test memory_tests [] = {
|
||||
{ "zero_size_allocations", test_memory_zero_size_allocations},
|
||||
{NULL, NULL}
|
||||
{"zero_size_allocations", test_memory_zero_size_allocations},
|
||||
{"align_signed_int", test_align_signed_int},
|
||||
{"align_unsigned_int", test_align_unsigned_int},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(memory_tests_init, memory_tests)
|
||||
+179
-51
@@ -12,7 +12,7 @@
|
||||
* Copyright 2012 Xamarin Inc
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#undef ASSEMBLY_LOAD_DEBUG
|
||||
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
@@ -154,6 +154,7 @@ static MonoLoadFunc load_function = NULL;
|
||||
|
||||
/* Lazy class loading functions */
|
||||
static GENERATE_GET_CLASS_WITH_CACHE (assembly, "System.Reflection", "Assembly");
|
||||
static GENERATE_GET_CLASS_WITH_CACHE (app_context, "System", "AppContext");
|
||||
|
||||
GENERATE_GET_CLASS_WITH_CACHE (appdomain, MONO_APPDOMAIN_CLASS_NAME_SPACE, MONO_APPDOMAIN_CLASS_NAME);
|
||||
GENERATE_GET_CLASS_WITH_CACHE (appdomain_setup, MONO_APPDOMAIN_SETUP_CLASS_NAME_SPACE, MONO_APPDOMAIN_SETUP_CLASS_NAME);
|
||||
@@ -811,8 +812,12 @@ leave:
|
||||
gboolean
|
||||
mono_domain_has_type_resolve (MonoDomain *domain)
|
||||
{
|
||||
// Check whether managed code is running, and if the managed AppDomain object doesn't exist neither does the event handler
|
||||
if (!domain->domain)
|
||||
return FALSE;
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
#else
|
||||
MonoObject *o;
|
||||
|
||||
@@ -823,10 +828,6 @@ mono_domain_has_type_resolve (MonoDomain *domain)
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoClassField, field)
|
||||
|
||||
/*pedump doesn't create an appdomin, so the domain object doesn't exist.*/
|
||||
if (!domain->domain)
|
||||
return FALSE;
|
||||
|
||||
mono_field_get_value_internal ((MonoObject*)(domain->domain), field, &o);
|
||||
return o != NULL;
|
||||
#endif
|
||||
@@ -855,13 +856,19 @@ mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *typebu
|
||||
|
||||
MonoReflectionAssemblyHandle ret = NULL_HANDLE_INIT;
|
||||
|
||||
// This will not work correctly on netcore
|
||||
if (name) {
|
||||
MonoStringHandle name_handle = mono_string_new_handle (mono_domain_get (), name, error);
|
||||
goto_if_nok (error, exit);
|
||||
ret = mono_domain_try_type_resolve_name (domain, name_handle, error);
|
||||
ret = mono_domain_try_type_resolve_name (domain, NULL, name_handle, error);
|
||||
} else {
|
||||
#ifndef ENABLE_NETCORE
|
||||
MONO_HANDLE_DCL (MonoObject, typebuilder);
|
||||
ret = mono_domain_try_type_resolve_typebuilder (domain, MONO_HANDLE_CAST (MonoReflectionTypeBuilder, typebuilder), error);
|
||||
#else
|
||||
// TODO: make this work on netcore when working on SRE.TypeBuilder
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
}
|
||||
|
||||
exit:
|
||||
@@ -869,6 +876,50 @@ exit:
|
||||
HANDLE_FUNCTION_RETURN_OBJ (ret);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
MonoReflectionAssemblyHandle
|
||||
mono_domain_try_type_resolve_name (MonoDomain *domain, MonoAssembly *assembly, MonoStringHandle name, MonoError *error)
|
||||
{
|
||||
MonoObjectHandle ret;
|
||||
MonoReflectionAssemblyHandle assembly_handle;
|
||||
|
||||
HANDLE_FUNCTION_ENTER ();
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, method)
|
||||
|
||||
MonoClass *alc_class = mono_class_get_assembly_load_context_class ();
|
||||
g_assert (alc_class);
|
||||
method = mono_class_get_method_from_name_checked (alc_class, "OnTypeResolve", -1, 0, error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, method)
|
||||
|
||||
goto_if_nok (error, return_null);
|
||||
|
||||
g_assert (domain);
|
||||
g_assert (MONO_HANDLE_BOOL (name));
|
||||
|
||||
if (mono_runtime_get_no_exec ())
|
||||
goto return_null;
|
||||
|
||||
if (assembly) {
|
||||
assembly_handle = mono_assembly_get_object_handle (domain, assembly, error);
|
||||
goto_if_nok (error, return_null);
|
||||
}
|
||||
|
||||
gpointer args [2];
|
||||
args [0] = assembly ? MONO_HANDLE_RAW (assembly_handle) : NULL;
|
||||
args [1] = MONO_HANDLE_RAW (name);
|
||||
ret = mono_runtime_try_invoke_handle (method, NULL_HANDLE, args, error);
|
||||
goto_if_nok (error, return_null);
|
||||
goto exit;
|
||||
|
||||
return_null:
|
||||
ret = NULL_HANDLE;
|
||||
|
||||
exit:
|
||||
HANDLE_FUNCTION_RETURN_REF (MonoReflectionAssembly, MONO_HANDLE_CAST (MonoReflectionAssembly, ret));
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* mono_class_get_appdomain_do_type_resolve_method:
|
||||
*
|
||||
@@ -879,9 +930,7 @@ mono_class_get_appdomain_do_type_resolve_method (MonoError *error)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, method)
|
||||
|
||||
// not cached yet, fill cache under caller's lock
|
||||
|
||||
method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeResolve", -1, 0, error);
|
||||
method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeResolve", -1, 0, error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, method)
|
||||
|
||||
@@ -901,9 +950,7 @@ mono_class_get_appdomain_do_type_builder_resolve_method (MonoError *error)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, method)
|
||||
|
||||
// not cached yet, fill cache under caller's lock
|
||||
|
||||
method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeBuilderResolve", -1, 0, error);
|
||||
method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeBuilderResolve", -1, 0, error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, method)
|
||||
|
||||
@@ -924,7 +971,7 @@ mono_class_get_appdomain_do_type_builder_resolve_method (MonoError *error)
|
||||
* \returns A \c MonoReflectionAssembly or NULL if not found
|
||||
*/
|
||||
MonoReflectionAssemblyHandle
|
||||
mono_domain_try_type_resolve_name (MonoDomain *domain, MonoStringHandle name, MonoError *error)
|
||||
mono_domain_try_type_resolve_name (MonoDomain *domain, MonoAssembly *assembly, MonoStringHandle name, MonoError *error)
|
||||
{
|
||||
HANDLE_FUNCTION_ENTER ();
|
||||
|
||||
@@ -992,6 +1039,7 @@ return_null:
|
||||
exit:
|
||||
HANDLE_FUNCTION_RETURN_REF (MonoReflectionAssembly, MONO_HANDLE_CAST (MonoReflectionAssembly, ret));
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* mono_domain_owns_vtable_slot:
|
||||
@@ -1547,32 +1595,32 @@ add_assembly_to_alc (MonoAssemblyLoadContext *alc, MonoAssembly *ass)
|
||||
#endif
|
||||
|
||||
static void
|
||||
mono_domain_fire_assembly_load (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error_out)
|
||||
mono_domain_fire_assembly_load_event (MonoDomain *domain, MonoAssembly *assembly, MonoError *error)
|
||||
{
|
||||
HANDLE_FUNCTION_ENTER ();
|
||||
ERROR_DECL (error);
|
||||
MonoDomain *domain = mono_alc_domain (alc);
|
||||
MonoClass *klass;
|
||||
MonoObjectHandle appdomain;
|
||||
|
||||
if (!MONO_BOOL (domain->domain))
|
||||
goto leave; // This can happen during startup
|
||||
g_assert (domain);
|
||||
g_assert (assembly);
|
||||
|
||||
if (mono_runtime_get_no_exec ())
|
||||
goto leave;
|
||||
|
||||
#ifdef ASSEMBLY_LOAD_DEBUG
|
||||
fprintf (stderr, "Loading %s into domain %s\n", assembly->aname.name, domain->friendly_name);
|
||||
#endif
|
||||
appdomain = MONO_HANDLE_NEW (MonoObject, &domain->domain->mbr.obj);
|
||||
klass = mono_handle_class (appdomain);
|
||||
|
||||
mono_domain_assemblies_lock (domain);
|
||||
add_assemblies_to_domain (domain, assembly, NULL);
|
||||
mono_domain_assemblies_unlock (domain);
|
||||
#ifdef ENABLE_NETCORE
|
||||
add_assembly_to_alc (alc, assembly);
|
||||
#endif
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, method)
|
||||
|
||||
MonoClass *alc_class = mono_class_get_assembly_load_context_class ();
|
||||
g_assert (alc_class);
|
||||
method = mono_class_get_method_from_name_checked (alc_class, "OnAssemblyLoad", -1, 0, error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, method)
|
||||
goto_if_nok (error, exit);
|
||||
|
||||
MonoReflectionAssemblyHandle assembly_handle = mono_assembly_get_object_handle (domain, assembly, error);
|
||||
goto_if_nok (error, exit);
|
||||
|
||||
gpointer args [1];
|
||||
args [0] = MONO_HANDLE_RAW (assembly_handle);
|
||||
mono_runtime_try_invoke_handle (method, NULL_HANDLE, args, error);
|
||||
#else
|
||||
MonoObjectHandle appdomain = MONO_HANDLE_NEW (MonoObject, &domain->domain->mbr.obj);
|
||||
MonoClass *klass = mono_handle_class (appdomain);
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoClassField, assembly_load_field)
|
||||
|
||||
@@ -1582,11 +1630,11 @@ mono_domain_fire_assembly_load (MonoAssemblyLoadContext *alc, MonoAssembly *asse
|
||||
MONO_STATIC_POINTER_INIT_END (MonoClassField, assembly_load_field)
|
||||
|
||||
if (!MONO_HANDLE_GET_FIELD_BOOL (appdomain, MonoObject*, assembly_load_field))
|
||||
goto leave; // No events waiting to be triggered
|
||||
goto exit; // No events waiting to be triggered
|
||||
|
||||
MonoReflectionAssemblyHandle reflection_assembly;
|
||||
reflection_assembly = mono_assembly_get_object_handle (domain, assembly, error);
|
||||
mono_error_assert_ok (error);
|
||||
goto_if_nok (error, exit);
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, assembly_load_method)
|
||||
|
||||
@@ -1598,9 +1646,40 @@ mono_domain_fire_assembly_load (MonoAssemblyLoadContext *alc, MonoAssembly *asse
|
||||
void *params [1];
|
||||
params [0] = MONO_HANDLE_RAW (reflection_assembly);
|
||||
mono_runtime_invoke_handle_void (assembly_load_method, appdomain, params, error);
|
||||
#endif
|
||||
|
||||
exit:
|
||||
HANDLE_FUNCTION_RETURN ();
|
||||
}
|
||||
|
||||
static void
|
||||
mono_domain_fire_assembly_load (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error_out)
|
||||
{
|
||||
ERROR_DECL (error);
|
||||
MonoDomain *domain = mono_alc_domain (alc);
|
||||
|
||||
g_assert (assembly);
|
||||
g_assert (domain);
|
||||
|
||||
if (!MONO_BOOL (domain->domain))
|
||||
goto leave; // This can happen during startup
|
||||
|
||||
if (mono_runtime_get_no_exec ())
|
||||
goto leave;
|
||||
|
||||
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Loading assembly %s (%p) into domain %s (%p) and ALC %p", assembly->aname.name, assembly, domain->friendly_name, domain, alc);
|
||||
|
||||
mono_domain_assemblies_lock (domain);
|
||||
add_assemblies_to_domain (domain, assembly, NULL);
|
||||
mono_domain_assemblies_unlock (domain);
|
||||
#ifdef ENABLE_NETCORE
|
||||
add_assembly_to_alc (alc, assembly);
|
||||
#endif
|
||||
|
||||
mono_domain_fire_assembly_load_event (domain, assembly, error_out);
|
||||
|
||||
leave:
|
||||
mono_error_cleanup (error);
|
||||
HANDLE_FUNCTION_RETURN ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -2110,7 +2189,9 @@ mono_make_shadow_copy (const char *filename, MonoError *oerror)
|
||||
char *shadow_dir;
|
||||
gint32 copy_error;
|
||||
|
||||
#ifndef ENABLE_NETCORE
|
||||
set_domain_search_path (domain);
|
||||
#endif
|
||||
|
||||
if (!mono_is_shadow_copy_enabled (domain, dir_name)) {
|
||||
g_free (dir_name);
|
||||
@@ -2330,6 +2411,27 @@ real_load (gchar **search_path, const gchar *culture, const gchar *name, const M
|
||||
return result;
|
||||
}
|
||||
|
||||
static char *
|
||||
get_app_context_base_directory (MonoError *error)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_basedir)
|
||||
|
||||
ERROR_DECL (local_error);
|
||||
MonoClass *app_context = mono_class_get_app_context_class ();
|
||||
g_assert (app_context);
|
||||
get_basedir = mono_class_get_method_from_name_checked (app_context, "get_BaseDirectory", -1, 0, local_error);
|
||||
mono_error_assert_ok (local_error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_basedir)
|
||||
|
||||
HANDLE_FUNCTION_ENTER ();
|
||||
|
||||
MonoStringHandle result = MONO_HANDLE_CAST (MonoString, mono_runtime_try_invoke_handle (get_basedir, NULL_HANDLE, NULL, error));
|
||||
char *base_dir = mono_string_handle_to_utf8 (result, error);
|
||||
|
||||
HANDLE_FUNCTION_RETURN_VAL (base_dir);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try loading the assembly from ApplicationBase and PrivateBinPath
|
||||
* and then from assemblies_path if any.
|
||||
@@ -2351,21 +2453,35 @@ mono_domain_assembly_preload (MonoAssemblyLoadContext *alc,
|
||||
g_assert (domain == mono_domain_get ());
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_NETCORE
|
||||
set_domain_search_path (domain);
|
||||
#endif
|
||||
|
||||
MonoAssemblyCandidatePredicate predicate = NULL;
|
||||
void* predicate_ud = NULL;
|
||||
#if !defined(DISABLE_DESKTOP_LOADER)
|
||||
if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
|
||||
if (mono_loader_get_strict_assembly_name_check ()) {
|
||||
predicate = &mono_assembly_candidate_predicate_sn_same_name;
|
||||
predicate_ud = aname;
|
||||
}
|
||||
#endif
|
||||
MonoAssemblyOpenRequest req;
|
||||
mono_assembly_request_prepare_open (&req, refonly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_DEFAULT, alc);
|
||||
req.request.predicate = predicate;
|
||||
req.request.predicate_ud = predicate_ud;
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
if (!mono_runtime_get_no_exec ()) {
|
||||
char *search_path [2];
|
||||
search_path [1] = NULL;
|
||||
|
||||
char *base_dir = get_app_context_base_directory (error);
|
||||
search_path [0] = base_dir;
|
||||
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Domain %s (%p) ApplicationBase is %s\n", domain->friendly_name, domain, base_dir);
|
||||
|
||||
result = real_load (search_path, aname->culture, aname->name, &req);
|
||||
|
||||
g_free (base_dir);
|
||||
}
|
||||
#else
|
||||
if (domain->search_path && domain->search_path [0] != NULL) {
|
||||
if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY)) {
|
||||
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Domain %s search path is:", domain->friendly_name);
|
||||
@@ -2377,6 +2493,7 @@ mono_domain_assembly_preload (MonoAssemblyLoadContext *alc,
|
||||
}
|
||||
result = real_load (domain->search_path, aname->culture, aname->name, &req);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (result == NULL && assemblies_path && assemblies_path [0] != NULL) {
|
||||
result = real_load (assemblies_path, aname->culture, aname->name, &req);
|
||||
@@ -2403,12 +2520,10 @@ mono_assembly_load_from_assemblies_path (gchar **assemblies_path, MonoAssemblyNa
|
||||
{
|
||||
MonoAssemblyCandidatePredicate predicate = NULL;
|
||||
void* predicate_ud = NULL;
|
||||
#if !defined(DISABLE_DESKTOP_LOADER)
|
||||
if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
|
||||
if (mono_loader_get_strict_assembly_name_check ()) {
|
||||
predicate = &mono_assembly_candidate_predicate_sn_same_name;
|
||||
predicate_ud = aname;
|
||||
}
|
||||
#endif
|
||||
MonoAssemblyOpenRequest req;
|
||||
mono_assembly_request_prepare_open (&req, asmctx, mono_domain_default_alc (mono_domain_get ()));
|
||||
req.request.predicate = predicate;
|
||||
@@ -2434,19 +2549,15 @@ mono_domain_assembly_search (MonoAssemblyLoadContext *alc, MonoAssembly *request
|
||||
g_assert (aname != NULL);
|
||||
GSList *tmp;
|
||||
MonoAssembly *ass;
|
||||
const gboolean strong_name = aname->public_key_token[0] != 0;
|
||||
/* If it's not a strong name, any version that has the right simple
|
||||
* name is good enough to satisfy the request. .NET Framework also
|
||||
* ignores case differences in this case. */
|
||||
const MonoAssemblyNameEqFlags eq_flags = (MonoAssemblyNameEqFlags)(strong_name ? MONO_ANAME_EQ_IGNORE_CASE :
|
||||
(MONO_ANAME_EQ_IGNORE_PUBKEY | MONO_ANAME_EQ_IGNORE_VERSION | MONO_ANAME_EQ_IGNORE_CASE));
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
const MonoAssemblyNameEqFlags eq_flags = MONO_ANAME_EQ_IGNORE_PUBKEY | MONO_ANAME_EQ_IGNORE_VERSION | MONO_ANAME_EQ_IGNORE_CASE;
|
||||
|
||||
mono_alc_assemblies_lock (alc);
|
||||
for (tmp = alc->loaded_assemblies; tmp; tmp = tmp->next) {
|
||||
ass = (MonoAssembly *)tmp->data;
|
||||
g_assert (ass != NULL);
|
||||
// TODO: Can dynamic assemblies match here for netcore? Also, this ignores case while exact_sn_match does not.
|
||||
// FIXME: Can dynamic assemblies match here for netcore?
|
||||
if (assembly_is_dynamic (ass) || !mono_assembly_names_equal_flags (aname, &ass->aname, eq_flags))
|
||||
continue;
|
||||
|
||||
@@ -2456,6 +2567,14 @@ mono_domain_assembly_search (MonoAssemblyLoadContext *alc, MonoAssembly *request
|
||||
mono_alc_assemblies_unlock (alc);
|
||||
#else
|
||||
MonoDomain *domain = mono_alc_domain (alc);
|
||||
|
||||
const gboolean strong_name = aname->public_key_token[0] != 0;
|
||||
/* If it's not a strong name, any version that has the right simple
|
||||
* name is good enough to satisfy the request. .NET Framework also
|
||||
* ignores case differences in this case. */
|
||||
const MonoAssemblyNameEqFlags eq_flags = (MonoAssemblyNameEqFlags)(strong_name ? MONO_ANAME_EQ_IGNORE_CASE :
|
||||
(MONO_ANAME_EQ_IGNORE_PUBKEY | MONO_ANAME_EQ_IGNORE_VERSION | MONO_ANAME_EQ_IGNORE_CASE));
|
||||
|
||||
mono_domain_assemblies_lock (domain);
|
||||
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
|
||||
ass = (MonoAssembly *)tmp->data;
|
||||
@@ -2514,6 +2633,15 @@ ves_icall_System_Reflection_Assembly_InternalLoad (MonoStringHandle name_handle,
|
||||
if (!parsed)
|
||||
goto fail;
|
||||
|
||||
MonoAssemblyCandidatePredicate predicate = NULL;
|
||||
void* predicate_ud = NULL;
|
||||
if (mono_loader_get_strict_assembly_name_check ()) {
|
||||
predicate = &mono_assembly_candidate_predicate_sn_same_name;
|
||||
predicate_ud = &aname;
|
||||
}
|
||||
req.request.predicate = predicate;
|
||||
req.request.predicate_ud = predicate_ud;
|
||||
|
||||
ass = mono_assembly_request_byname (&aname, &req, &status);
|
||||
if (!ass)
|
||||
goto fail;
|
||||
|
||||
@@ -134,6 +134,9 @@ MonoAssembly* mono_assembly_request_byname (MonoAssemblyName *aname,
|
||||
gboolean
|
||||
mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointer wanted_name);
|
||||
|
||||
gboolean
|
||||
mono_assembly_check_name_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name);
|
||||
|
||||
MonoAssembly*
|
||||
mono_assembly_binding_applies_to_image (MonoAssemblyLoadContext *alc, MonoImage* image, MonoImageOpenStatus *status);
|
||||
|
||||
|
||||
+52
-23
@@ -28,6 +28,7 @@
|
||||
#include <mono/metadata/profiler-private.h>
|
||||
#include <mono/metadata/class-internals.h>
|
||||
#include <mono/metadata/domain-internals.h>
|
||||
#include <mono/metadata/exception-internals.h>
|
||||
#include <mono/metadata/reflection-internals.h>
|
||||
#include <mono/metadata/mono-endian.h>
|
||||
#include <mono/metadata/mono-debug.h>
|
||||
@@ -394,8 +395,6 @@ prevent_reference_assembly_from_running (MonoAssembly* candidate, gboolean refon
|
||||
|
||||
/* Assembly name matching */
|
||||
static gboolean
|
||||
exact_sn_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name);
|
||||
static gboolean
|
||||
framework_assembly_sn_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name);
|
||||
|
||||
static const char *
|
||||
@@ -1269,6 +1268,10 @@ assemblyref_public_tok_checked (MonoImage *image, guint32 key_index, guint32 fla
|
||||
|
||||
public_tok = mono_metadata_blob_heap_checked (image, key_index, error);
|
||||
return_val_if_nok (error, NULL);
|
||||
if (!public_tok) {
|
||||
mono_error_set_bad_image (error, image, "expected public key token (index = %d) in assembly reference, but the Blob heap is NULL", key_index);
|
||||
return NULL;
|
||||
}
|
||||
len = mono_metadata_decode_blob_size (public_tok, &public_tok);
|
||||
|
||||
if (flags & ASSEMBLYREF_FULL_PUBLIC_KEY_FLAG) {
|
||||
@@ -1478,10 +1481,18 @@ mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *an
|
||||
t = &image->tables [MONO_TABLE_ASSEMBLYREF];
|
||||
|
||||
mono_metadata_decode_row (t, index, cols, MONO_ASSEMBLYREF_SIZE);
|
||||
|
||||
hash = mono_metadata_blob_heap (image, cols [MONO_ASSEMBLYREF_HASH_VALUE]);
|
||||
aname->hash_len = mono_metadata_decode_blob_size (hash, &hash);
|
||||
aname->hash_value = hash;
|
||||
|
||||
// ECMA-335: II.22.5 - AssemblyRef
|
||||
// HashValue can be null or non-null. If non-null it's an index into the blob heap
|
||||
// Sometimes ILasm can create an image without a Blob heap.
|
||||
hash = mono_metadata_blob_heap_null_ok (image, cols [MONO_ASSEMBLYREF_HASH_VALUE]);
|
||||
if (hash) {
|
||||
aname->hash_len = mono_metadata_decode_blob_size (hash, &hash);
|
||||
aname->hash_value = hash;
|
||||
} else {
|
||||
aname->hash_len = 0;
|
||||
aname->hash_value = NULL;
|
||||
}
|
||||
aname->name = mono_metadata_string_heap (image, cols [MONO_ASSEMBLYREF_NAME]);
|
||||
aname->culture = mono_metadata_string_heap (image, cols [MONO_ASSEMBLYREF_CULTURE]);
|
||||
aname->flags = cols [MONO_ASSEMBLYREF_FLAGS];
|
||||
@@ -1697,7 +1708,7 @@ leave:
|
||||
#endif /* ENABLE_NETCORE */
|
||||
|
||||
/**
|
||||
* mono_assembly_get_assemblyref:
|
||||
* mono_assembly_get_assemblyref_checked:
|
||||
* \param image pointer to the \c MonoImage to extract the information from.
|
||||
* \param index index to the assembly reference in the image.
|
||||
* \param aname pointer to a \c MonoAssemblyName that will hold the returned value.
|
||||
@@ -1719,10 +1730,18 @@ mono_assembly_get_assemblyref_checked (MonoImage *image, int index, MonoAssembly
|
||||
if (!mono_metadata_decode_row_checked (image, t, index, cols, MONO_ASSEMBLYREF_SIZE, error))
|
||||
return FALSE;
|
||||
|
||||
// ECMA-335: II.22.5 - AssemblyRef
|
||||
// HashValue can be null or non-null. If non-null it's an index into the blob heap
|
||||
// Sometimes ILasm can create an image without a Blob heap.
|
||||
hash = mono_metadata_blob_heap_checked (image, cols [MONO_ASSEMBLYREF_HASH_VALUE], error);
|
||||
return_val_if_nok (error, FALSE);
|
||||
aname->hash_len = mono_metadata_decode_blob_size (hash, &hash);
|
||||
aname->hash_value = hash;
|
||||
if (hash) {
|
||||
aname->hash_len = mono_metadata_decode_blob_size (hash, &hash);
|
||||
aname->hash_value = hash;
|
||||
} else {
|
||||
aname->hash_len = 0;
|
||||
aname->hash_value = NULL;
|
||||
}
|
||||
aname->name = mono_metadata_string_heap_checked (image, cols [MONO_ASSEMBLYREF_NAME], error);
|
||||
return_val_if_nok (error, FALSE);
|
||||
aname->culture = mono_metadata_string_heap_checked (image, cols [MONO_ASSEMBLYREF_CULTURE], error);
|
||||
@@ -1769,7 +1788,15 @@ mono_assembly_load_reference (MonoImage *image, int index)
|
||||
if (reference)
|
||||
return;
|
||||
|
||||
mono_assembly_get_assemblyref (image, index, &aname);
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Requesting loading reference %d (of %d) of %s", index, image->nreferences, image->name);
|
||||
|
||||
ERROR_DECL (local_error);
|
||||
mono_assembly_get_assemblyref_checked (image, index, &aname, local_error);
|
||||
if (!is_ok (local_error)) {
|
||||
mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_ASSEMBLY, "Decoding assembly reference %d (of %d) of %s failed due to: %s", index, image->nreferences, image->name, mono_error_get_message (local_error));
|
||||
mono_error_cleanup (local_error);
|
||||
goto commit_reference;
|
||||
}
|
||||
|
||||
if (image->assembly) {
|
||||
if (mono_trace_is_traced (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY)) {
|
||||
@@ -1839,6 +1866,7 @@ mono_assembly_load_reference (MonoImage *image, int index)
|
||||
|
||||
}
|
||||
|
||||
commit_reference:
|
||||
mono_assemblies_lock ();
|
||||
if (reference == NULL) {
|
||||
/* Flag as not found */
|
||||
@@ -2592,7 +2620,7 @@ mono_assembly_request_open (const char *filename, const MonoAssemblyOpenRequest
|
||||
* predicate. It could be that we previously loaded a
|
||||
* different version that happens to have the filename that
|
||||
* we're currently probing. */
|
||||
if (mono_loader_get_strict_strong_names () &&
|
||||
if (mono_loader_get_strict_assembly_name_check () &&
|
||||
load_req.predicate && !load_req.predicate (image->assembly, load_req.predicate_ud)) {
|
||||
mono_image_close (image);
|
||||
g_free (fname);
|
||||
@@ -4519,42 +4547,45 @@ mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointe
|
||||
|
||||
if (mono_trace_is_traced (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY)) {
|
||||
char * s = mono_stringify_assembly_name (wanted_name);
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted = %s\n", s);
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted = %s", s);
|
||||
g_free (s);
|
||||
s = mono_stringify_assembly_name (candidate_name);
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate = %s\n", s);
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate = %s", s);
|
||||
g_free (s);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
return mono_assembly_check_name_match (wanted_name, candidate_name);
|
||||
#else
|
||||
/* Wanted name has no token, not strongly named: always matches. */
|
||||
if (0 == wanted_name->public_key_token [0]) {
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted has no token, returning TRUE\n");
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted has no token, returning TRUE");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Candidate name has no token, not strongly named: never matches */
|
||||
if (0 == candidate_name->public_key_token [0]) {
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate has no token, returning FALSE\n");
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate has no token, returning FALSE");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return exact_sn_match (wanted_name, candidate_name) ||
|
||||
return mono_assembly_check_name_match (wanted_name, candidate_name) ||
|
||||
framework_assembly_sn_match (wanted_name, candidate_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
exact_sn_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name)
|
||||
mono_assembly_check_name_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name)
|
||||
{
|
||||
#if ENABLE_NETCORE
|
||||
gboolean result = mono_assembly_names_equal_flags (wanted_name, candidate_name, MONO_ANAME_EQ_IGNORE_VERSION | MONO_ANAME_EQ_IGNORE_PUBKEY);
|
||||
if (result && assembly_names_compare_versions (wanted_name, candidate_name, -1) > 0)
|
||||
result = FALSE;
|
||||
#else
|
||||
gboolean result = mono_assembly_names_equal (wanted_name, candidate_name);
|
||||
gboolean result = mono_assembly_names_equal_flags (wanted_name, candidate_name, MONO_ANAME_EQ_NONE);
|
||||
#endif
|
||||
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate and wanted names %s\n",
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate and wanted names %s",
|
||||
result ? "match, returning TRUE" : "don't match, returning FALSE");
|
||||
return result;
|
||||
|
||||
@@ -4664,12 +4695,10 @@ mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname,
|
||||
|
||||
MonoAssemblyCandidatePredicate predicate = NULL;
|
||||
void* predicate_ud = NULL;
|
||||
#if !defined(DISABLE_DESKTOP_LOADER)
|
||||
if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
|
||||
if (mono_loader_get_strict_assembly_name_check ()) {
|
||||
predicate = &mono_assembly_candidate_predicate_sn_same_name;
|
||||
predicate_ud = aname;
|
||||
}
|
||||
#endif
|
||||
|
||||
MonoAssemblyOpenRequest req;
|
||||
mono_assembly_request_prepare_open (&req, asmctx, alc);
|
||||
|
||||
@@ -767,6 +767,7 @@ check_valid_generic_inst_arguments (MonoGenericInst *inst, MonoError *error)
|
||||
/*
|
||||
* Create the `MonoClass' for an instantiation of a generic type.
|
||||
* We only do this if we actually need it.
|
||||
* This will sometimes return a GTD due to checking the cached_class.
|
||||
*/
|
||||
MonoClass*
|
||||
mono_class_create_generic_inst (MonoGenericClass *gclass)
|
||||
@@ -4140,10 +4141,20 @@ static void
|
||||
setup_generic_array_ifaces (MonoClass *klass, MonoClass *iface, MonoMethod **methods, int pos, GHashTable *cache)
|
||||
{
|
||||
MonoGenericContext tmp_context;
|
||||
MonoGenericClass *gclass;
|
||||
int i;
|
||||
|
||||
// The interface can sometimes be a GTD in cases like IList
|
||||
// See: https://github.com/mono/mono/issues/7095#issuecomment-470465597
|
||||
if (mono_class_is_gtd (iface)) {
|
||||
MonoType *ty = mono_class_gtd_get_canonical_inst (iface);
|
||||
g_assert (ty->type == MONO_TYPE_GENERICINST);
|
||||
gclass = ty->data.generic_class;
|
||||
} else
|
||||
gclass = mono_class_get_generic_class (iface);
|
||||
|
||||
tmp_context.class_inst = NULL;
|
||||
tmp_context.method_inst = mono_class_get_generic_class (iface)->context.class_inst;
|
||||
tmp_context.method_inst = gclass->context.class_inst;
|
||||
//g_print ("setting up array interface: %s\n", mono_type_get_name_full (m_class_get_byval_arg (iface), 0));
|
||||
|
||||
for (i = 0; i < generic_array_method_num; i++) {
|
||||
|
||||
+177
-122
@@ -267,7 +267,7 @@ cominterop_method_signature (MonoMethod* method)
|
||||
MonoMethodSignature *res;
|
||||
MonoImage *image = m_class_get_image (method->klass);
|
||||
MonoMethodSignature *sig = mono_method_signature_internal (method);
|
||||
gboolean preserve_sig = method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG;
|
||||
gboolean const preserve_sig = (method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG) != 0;
|
||||
int sigsize;
|
||||
int i;
|
||||
int param_count = sig->param_count + 1; // convert this arg into IntPtr arg
|
||||
@@ -551,15 +551,16 @@ cominterop_com_visible (MonoClass* klass)
|
||||
static void
|
||||
cominterop_set_hr_error (MonoError *oerror, int hr)
|
||||
{
|
||||
static MonoMethod* throw_exception_for_hr = NULL;
|
||||
ERROR_DECL (error);
|
||||
MonoException* ex;
|
||||
void* params[1] = {&hr};
|
||||
|
||||
if (!throw_exception_for_hr) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, throw_exception_for_hr)
|
||||
|
||||
throw_exception_for_hr = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetExceptionForHR", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, throw_exception_for_hr)
|
||||
|
||||
ex = (MonoException*)mono_runtime_invoke_checked (throw_exception_for_hr, NULL, params, error);
|
||||
g_assert (ex);
|
||||
@@ -751,8 +752,7 @@ mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type,
|
||||
case MONO_MARSHAL_CONV_OBJECT_INTERFACE:
|
||||
case MONO_MARSHAL_CONV_OBJECT_IUNKNOWN:
|
||||
case MONO_MARSHAL_CONV_OBJECT_IDISPATCH: {
|
||||
static MonoMethod* com_interop_proxy_get_proxy = NULL;
|
||||
static MonoMethod* get_transparent_proxy = NULL;
|
||||
|
||||
guint32 pos_null = 0, pos_ccw = 0, pos_end = 0;
|
||||
MonoClass *klass = NULL;
|
||||
|
||||
@@ -775,17 +775,24 @@ mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type,
|
||||
mono_mb_emit_icall (mb, cominterop_get_ccw_object);
|
||||
pos_ccw = mono_mb_emit_short_branch (mb, CEE_BRTRUE_S);
|
||||
|
||||
if (!com_interop_proxy_get_proxy) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, com_interop_proxy_get_proxy)
|
||||
|
||||
ERROR_DECL (error);
|
||||
com_interop_proxy_get_proxy = mono_class_get_method_from_name_checked (mono_class_get_interop_proxy_class (), "GetProxy", 2, METHOD_ATTRIBUTE_PRIVATE, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, com_interop_proxy_get_proxy)
|
||||
|
||||
#ifndef DISABLE_REMOTING
|
||||
if (!get_transparent_proxy) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_transparent_proxy)
|
||||
|
||||
ERROR_DECL (error);
|
||||
get_transparent_proxy = mono_class_get_method_from_name_checked (mono_defaults.real_proxy_class, "GetTransparentProxy", 0, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_transparent_proxy)
|
||||
#else
|
||||
static MonoMethod* const get_transparent_proxy = NULL; // FIXME?
|
||||
#endif
|
||||
|
||||
mono_mb_add_local (mb, m_class_get_byval_arg (mono_class_get_interop_proxy_class ()));
|
||||
@@ -869,20 +876,21 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
|
||||
if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE) {
|
||||
mono_mb_emit_ptr (mb, mono_type_get_class_internal (type));
|
||||
mono_mb_emit_icall (mb, cominterop_get_interface);
|
||||
|
||||
}
|
||||
else if (conv == MONO_MARSHAL_CONV_OBJECT_IUNKNOWN) {
|
||||
static MonoProperty* iunknown = NULL;
|
||||
|
||||
if (!iunknown)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoProperty, iunknown)
|
||||
iunknown = mono_class_get_property_from_name_internal (mono_class_get_com_object_class (), "IUnknown");
|
||||
MONO_STATIC_POINTER_INIT_END (MonoProperty, iunknown)
|
||||
|
||||
mono_mb_emit_managed_call (mb, iunknown->get, NULL);
|
||||
}
|
||||
else if (conv == MONO_MARSHAL_CONV_OBJECT_IDISPATCH) {
|
||||
static MonoProperty* idispatch = NULL;
|
||||
|
||||
if (!idispatch)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoProperty, idispatch)
|
||||
idispatch = mono_class_get_property_from_name_internal (mono_class_get_com_object_class (), "IDispatch");
|
||||
MONO_STATIC_POINTER_INIT_END (MonoProperty, idispatch)
|
||||
|
||||
mono_mb_emit_managed_call (mb, idispatch->get, NULL);
|
||||
}
|
||||
else {
|
||||
@@ -1061,13 +1069,15 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
|
||||
* instead of just __ComObject .ctor.
|
||||
*/
|
||||
if (!strcmp(method->name, ".ctor")) {
|
||||
static MonoMethod *ctor = NULL;
|
||||
|
||||
if (!ctor) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ctor)
|
||||
|
||||
ERROR_DECL (error);
|
||||
ctor = mono_class_get_method_from_name_checked (mono_class_get_com_object_class (), ".ctor", 0, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ctor)
|
||||
|
||||
mono_mb_emit_ldarg (mb, 0);
|
||||
mono_mb_emit_managed_call (mb, ctor, NULL);
|
||||
mono_mb_emit_byte (mb, CEE_RET);
|
||||
@@ -1084,12 +1094,11 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
|
||||
mono_error_cleanup (error);
|
||||
}
|
||||
else {
|
||||
static MonoMethod * ThrowExceptionForHR = NULL;
|
||||
MonoMethod *adjusted_method;
|
||||
int retval = 0;
|
||||
int ptr_this;
|
||||
int i;
|
||||
gboolean preserve_sig = method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG;
|
||||
gboolean const preserve_sig = (method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG) != 0;
|
||||
|
||||
// add local variables
|
||||
ptr_this = mono_mb_add_local (mb, mono_get_int_type ());
|
||||
@@ -1119,11 +1128,15 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
|
||||
mono_mb_emit_managed_call (mb, adjusted_method, NULL);
|
||||
|
||||
if (!preserve_sig) {
|
||||
if (!ThrowExceptionForHR) {
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ThrowExceptionForHR)
|
||||
|
||||
ERROR_DECL (error);
|
||||
ThrowExceptionForHR = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "ThrowExceptionForHR", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ThrowExceptionForHR)
|
||||
|
||||
mono_mb_emit_managed_call (mb, ThrowExceptionForHR, NULL);
|
||||
|
||||
// load return value managed is expecting
|
||||
@@ -1209,13 +1222,13 @@ mono_cominterop_get_invoke (MonoMethod *method)
|
||||
}
|
||||
|
||||
if (!strcmp(method->name, ".ctor")) {
|
||||
static MonoMethod *cache_proxy = NULL;
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, cache_proxy)
|
||||
|
||||
if (!cache_proxy) {
|
||||
ERROR_DECL (error);
|
||||
cache_proxy = mono_class_get_method_from_name_checked (mono_class_get_interop_proxy_class (), "CacheProxy", 0, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, cache_proxy)
|
||||
|
||||
mono_mb_emit_ldarg (mb, 0);
|
||||
mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
|
||||
@@ -1255,6 +1268,18 @@ static GHashTable* ccw_interface_hash = NULL;
|
||||
*/
|
||||
static GHashTable* rcw_hash = NULL;
|
||||
|
||||
static MonoMethod*
|
||||
mono_get_addref (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, AddRef)
|
||||
ERROR_DECL (error);
|
||||
AddRef = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "AddRef", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, AddRef)
|
||||
|
||||
return AddRef;
|
||||
}
|
||||
|
||||
int
|
||||
mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
MonoType *t,
|
||||
@@ -1264,33 +1289,33 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
{
|
||||
MonoMethodBuilder *mb = m->mb;
|
||||
MonoClass *klass = t->data.klass;
|
||||
static MonoMethod* get_object_for_iunknown = NULL;
|
||||
static MonoMethod* get_iunknown_for_object_internal = NULL;
|
||||
static MonoMethod* get_com_interface_for_object_internal = NULL;
|
||||
static MonoMethod* get_idispatch_for_object_internal = NULL;
|
||||
static MonoMethod* marshal_release = NULL;
|
||||
static MonoMethod* AddRef = NULL;
|
||||
ERROR_DECL (error);
|
||||
if (!get_object_for_iunknown) {
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_object_for_iunknown)
|
||||
get_object_for_iunknown = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetObjectForIUnknown", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
if (!get_iunknown_for_object_internal) {
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_object_for_iunknown)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_iunknown_for_object_internal)
|
||||
get_iunknown_for_object_internal = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetIUnknownForObjectInternal", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
if (!get_idispatch_for_object_internal) {
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_iunknown_for_object_internal)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_idispatch_for_object_internal)
|
||||
get_idispatch_for_object_internal = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetIDispatchForObjectInternal", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
if (!get_com_interface_for_object_internal) {
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_idispatch_for_object_internal)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_com_interface_for_object_internal)
|
||||
get_com_interface_for_object_internal = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetComInterfaceForObjectInternal", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
if (!marshal_release) {
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_com_interface_for_object_internal)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, marshal_release)
|
||||
marshal_release = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "Release", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, marshal_release)
|
||||
|
||||
|
||||
#ifdef DISABLE_JIT
|
||||
switch (action) {
|
||||
@@ -1509,11 +1534,6 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
if (t->byref && t->attrs & PARAM_ATTRIBUTE_OUT) {
|
||||
guint32 pos_null = 0;
|
||||
|
||||
if (!AddRef) {
|
||||
AddRef = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "AddRef", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
mono_mb_emit_byte (mb, CEE_LDC_I4_0);
|
||||
mono_mb_emit_byte (mb, CEE_STIND_I);
|
||||
@@ -1541,7 +1561,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
mono_mb_emit_byte (mb, CEE_LDIND_I);
|
||||
mono_mb_emit_managed_call (mb, AddRef, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_addref (), NULL);
|
||||
mono_mb_emit_byte (mb, CEE_POP);
|
||||
|
||||
mono_mb_patch_short_branch (mb, pos_null);
|
||||
@@ -1554,11 +1574,6 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
int ccw_obj;
|
||||
ccw_obj = mono_mb_add_local (mb, mono_get_object_type ());
|
||||
|
||||
if (!AddRef) {
|
||||
AddRef = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "AddRef", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
/* store return value */
|
||||
mono_mb_emit_stloc (mb, ccw_obj);
|
||||
|
||||
@@ -1585,7 +1600,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
|
||||
mono_mb_emit_stloc (mb, 3);
|
||||
mono_mb_emit_ldloc (mb, 3);
|
||||
|
||||
mono_mb_emit_managed_call (mb, AddRef, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_addref (), NULL);
|
||||
mono_mb_emit_byte (mb, CEE_POP);
|
||||
|
||||
mono_mb_patch_short_branch (mb, pos_null);
|
||||
@@ -2131,9 +2146,12 @@ cominterop_get_ccw_checked (MonoObjectHandle object, MonoClass* itf, MonoError *
|
||||
cinfo = mono_custom_attrs_from_class_checked (itf, error);
|
||||
mono_error_assert_ok (error);
|
||||
if (cinfo) {
|
||||
static MonoClass* coclass_attribute = NULL;
|
||||
if (!coclass_attribute)
|
||||
MONO_STATIC_POINTER_INIT (MonoClass, coclass_attribute)
|
||||
|
||||
coclass_attribute = mono_class_load_from_name (mono_defaults.corlib, "System.Runtime.InteropServices", "CoClassAttribute");
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoClass, coclass_attribute)
|
||||
|
||||
if (mono_custom_attrs_has_attr (cinfo, coclass_attribute)) {
|
||||
g_assert(m_class_get_interface_count (itf) && m_class_get_interfaces (itf)[0]);
|
||||
itf = m_class_get_interfaces (itf)[0];
|
||||
@@ -2183,7 +2201,7 @@ cominterop_get_ccw_checked (MonoObjectHandle object, MonoClass* itf, MonoError *
|
||||
MonoMethod *method = m_class_get_methods (iface) [i];
|
||||
MonoMethodSignature* sig_adjusted;
|
||||
MonoMethodSignature* sig = mono_method_signature_internal (method);
|
||||
gboolean preserve_sig = method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG;
|
||||
gboolean const preserve_sig = (method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG) != 0;
|
||||
|
||||
mb = mono_mb_new (iface, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
|
||||
adjust_method = cominterop_get_managed_wrapper_adjusted (method);
|
||||
@@ -2371,7 +2389,6 @@ mono_marshal_free_ccw (MonoObject* object_raw)
|
||||
static MonoMethod *
|
||||
cominterop_get_managed_wrapper_adjusted (MonoMethod *method)
|
||||
{
|
||||
static MonoMethod *get_hr_for_exception = NULL;
|
||||
MonoMethod *res = NULL;
|
||||
MonoMethodBuilder *mb;
|
||||
MonoMarshalSpec **mspecs;
|
||||
@@ -2383,11 +2400,13 @@ cominterop_get_managed_wrapper_adjusted (MonoMethod *method)
|
||||
gboolean const preserve_sig = (method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG) != 0;
|
||||
MonoType *int_type = mono_get_int_type ();
|
||||
|
||||
if (!get_hr_for_exception) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_hr_for_exception)
|
||||
|
||||
ERROR_DECL (error);
|
||||
get_hr_for_exception = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetHRForException", -1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_hr_for_exception)
|
||||
|
||||
sig = mono_method_signature_internal (method);
|
||||
|
||||
@@ -2543,9 +2562,12 @@ static int STDCALL
|
||||
cominterop_ccw_addref (MonoCCWInterface* ccwe)
|
||||
{
|
||||
int result;
|
||||
gpointer dummy;
|
||||
gpointer orig_domain = mono_threads_attach_coop (mono_domain_get (), &dummy);
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = cominterop_ccw_addref_impl (ccwe);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
mono_threads_detach_coop (orig_domain, &dummy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2574,9 +2596,12 @@ static int STDCALL
|
||||
cominterop_ccw_release (MonoCCWInterface* ccwe)
|
||||
{
|
||||
int result;
|
||||
gpointer dummy;
|
||||
gpointer orig_domain = mono_threads_attach_coop (mono_domain_get (), &dummy);
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = cominterop_ccw_release_impl (ccwe);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
mono_threads_detach_coop (orig_domain, &dummy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2623,9 +2648,12 @@ static int STDCALL
|
||||
cominterop_ccw_queryinterface (MonoCCWInterface* ccwe, const guint8* riid, gpointer* ppv)
|
||||
{
|
||||
int result;
|
||||
gpointer dummy;
|
||||
gpointer orig_domain = mono_threads_attach_coop (mono_domain_get (), &dummy);
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = cominterop_ccw_queryinterface_impl (ccwe, riid, ppv);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
mono_threads_detach_coop (orig_domain, &dummy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2655,7 +2683,7 @@ cominterop_ccw_queryinterface_impl (MonoCCWInterface* ccwe, const guint8* riid,
|
||||
*ppv = cominterop_get_ccw_checked (object, mono_class_get_iunknown_class (), error);
|
||||
mono_error_assert_ok (error);
|
||||
/* remember to addref on QI */
|
||||
cominterop_ccw_addref ((MonoCCWInterface *)*ppv);
|
||||
cominterop_ccw_addref_impl ((MonoCCWInterface *)*ppv);
|
||||
return MONO_S_OK;
|
||||
}
|
||||
|
||||
@@ -2667,7 +2695,7 @@ cominterop_ccw_queryinterface_impl (MonoCCWInterface* ccwe, const guint8* riid,
|
||||
*ppv = cominterop_get_ccw_checked (object, mono_class_get_idispatch_class (), error);
|
||||
mono_error_assert_ok (error);
|
||||
/* remember to addref on QI */
|
||||
cominterop_ccw_addref ((MonoCCWInterface *)*ppv);
|
||||
cominterop_ccw_addref_impl ((MonoCCWInterface *)*ppv);
|
||||
return MONO_S_OK;
|
||||
}
|
||||
|
||||
@@ -2707,7 +2735,7 @@ cominterop_ccw_queryinterface_impl (MonoCCWInterface* ccwe, const guint8* riid,
|
||||
return MONO_E_NOINTERFACE;
|
||||
}
|
||||
/* remember to addref on QI */
|
||||
cominterop_ccw_addref ((MonoCCWInterface *)*ppv);
|
||||
cominterop_ccw_addref_impl ((MonoCCWInterface *)*ppv);
|
||||
return MONO_S_OK;
|
||||
}
|
||||
|
||||
@@ -2743,9 +2771,12 @@ cominterop_ccw_get_ids_of_names (MonoCCWInterface* ccwe, gpointer riid,
|
||||
guint32 lcid, gint32 *rgDispId)
|
||||
{
|
||||
int result;
|
||||
gpointer dummy;
|
||||
gpointer orig_domain = mono_threads_attach_coop (mono_domain_get(), &dummy);
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = cominterop_ccw_get_ids_of_names_impl (ccwe, riid, rgszNames, cNames, lcid, rgDispId);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
mono_threads_detach_coop (orig_domain, &dummy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2755,7 +2786,6 @@ cominterop_ccw_get_ids_of_names_impl (MonoCCWInterface* ccwe, gpointer riid,
|
||||
guint32 lcid, gint32 *rgDispId)
|
||||
{
|
||||
MONO_REQ_GC_UNSAFE_MODE;
|
||||
static MonoClass *ComDispIdAttribute = NULL;
|
||||
ERROR_DECL (error);
|
||||
MonoCustomAttrInfo *cinfo = NULL;
|
||||
int i,ret = MONO_S_OK;
|
||||
@@ -2766,9 +2796,13 @@ cominterop_ccw_get_ids_of_names_impl (MonoCCWInterface* ccwe, gpointer riid,
|
||||
MonoObject* object = mono_gchandle_get_target_internal (ccw->gc_handle);
|
||||
|
||||
/* Handle DispIdAttribute */
|
||||
if (!ComDispIdAttribute)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoClass, ComDispIdAttribute)
|
||||
|
||||
ComDispIdAttribute = mono_class_load_from_name (mono_defaults.corlib, "System.Runtime.InteropServices", "DispIdAttribute");
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoClass, ComDispIdAttribute)
|
||||
|
||||
g_assert (object);
|
||||
klass = mono_object_class (object);
|
||||
|
||||
@@ -3050,8 +3084,74 @@ mono_free_bstr (/*mono_bstr_const*/gpointer bstr)
|
||||
#endif // HOST_WIN32
|
||||
}
|
||||
|
||||
// FIXME There are multiple caches of "GetObjectForNativeVariant".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Marshal_GetObjectForNativeVariant (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_object_for_native_variant)
|
||||
ERROR_DECL (error);
|
||||
get_object_for_native_variant = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_object_for_native_variant)
|
||||
|
||||
g_assert (get_object_for_native_variant);
|
||||
|
||||
return get_object_for_native_variant;
|
||||
}
|
||||
|
||||
// FIXME There are multiple caches of "GetNativeVariantForObject".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Marshal_GetNativeVariantForObject (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_native_variant_for_object)
|
||||
|
||||
ERROR_DECL (error);
|
||||
get_native_variant_for_object = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetNativeVariantForObject", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_native_variant_for_object)
|
||||
|
||||
g_assert (get_native_variant_for_object);
|
||||
|
||||
return get_native_variant_for_object;
|
||||
}
|
||||
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Array_SetValueImpl (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, set_value_impl)
|
||||
|
||||
ERROR_DECL (error);
|
||||
set_value_impl = mono_class_get_method_from_name_checked (mono_defaults.array_class, "SetValueImpl", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, set_value_impl)
|
||||
|
||||
g_assert (set_value_impl);
|
||||
|
||||
return set_value_impl;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_COM
|
||||
|
||||
// FIXME There are multiple caches of "Clear".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Variant_Clear (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, variant_clear)
|
||||
ERROR_DECL (error);
|
||||
variant_clear = mono_class_get_method_from_name_checked (mono_class_get_variant_class (), "Clear", 0, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, variant_clear)
|
||||
|
||||
g_assert (variant_clear);
|
||||
return variant_clear;
|
||||
}
|
||||
|
||||
/* SAFEARRAY marshalling */
|
||||
int
|
||||
mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
@@ -3088,9 +3188,6 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
|
||||
int safearray_var, indices_var, empty_var, elem_var, index_var;
|
||||
guint32 label1 = 0, label2 = 0, label3 = 0;
|
||||
static MonoMethod *get_native_variant_for_object = NULL;
|
||||
static MonoMethod *get_value_impl = NULL;
|
||||
static MonoMethod *variant_clear = NULL;
|
||||
|
||||
MonoType *int_type = mono_get_int_type ();
|
||||
conv_arg = safearray_var = mono_mb_add_local (mb, mono_get_object_type ());
|
||||
@@ -3120,11 +3217,14 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
|
||||
label3 = mono_mb_get_label (mb);
|
||||
|
||||
if (!get_value_impl) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_value_impl)
|
||||
|
||||
ERROR_DECL (error);
|
||||
get_value_impl = mono_class_get_method_from_name_checked (mono_defaults.array_class, "GetValueImpl", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_value_impl)
|
||||
|
||||
g_assert (get_value_impl);
|
||||
|
||||
if (t->byref) {
|
||||
@@ -3137,31 +3237,18 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
|
||||
mono_mb_emit_managed_call (mb, get_value_impl, NULL);
|
||||
|
||||
if (!get_native_variant_for_object) {
|
||||
ERROR_DECL (error);
|
||||
get_native_variant_for_object = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetNativeVariantForObject", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
g_assert (get_native_variant_for_object);
|
||||
|
||||
elem_var = mono_mb_add_local (mb, m_class_get_byval_arg (mono_class_get_variant_class ()));
|
||||
mono_mb_emit_ldloc_addr (mb, elem_var);
|
||||
|
||||
mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetNativeVariantForObject (), NULL);
|
||||
|
||||
mono_mb_emit_ldloc (mb, safearray_var);
|
||||
mono_mb_emit_ldloc (mb, indices_var);
|
||||
mono_mb_emit_ldloc_addr (mb, elem_var);
|
||||
mono_mb_emit_icall (mb, mono_marshal_safearray_set_value);
|
||||
|
||||
if (!variant_clear) {
|
||||
ERROR_DECL (error);
|
||||
variant_clear = mono_class_get_method_from_name_checked (mono_class_get_variant_class (), "Clear", 0, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
mono_mb_emit_ldloc_addr (mb, elem_var);
|
||||
mono_mb_emit_managed_call (mb, variant_clear, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Variant_Clear (), NULL);
|
||||
|
||||
mono_mb_emit_add_to_local (mb, index_var, 1);
|
||||
|
||||
@@ -3214,8 +3301,6 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
|
||||
int result_var, indices_var, empty_var, elem_var, index_var;
|
||||
guint32 label1 = 0, label2 = 0, label3 = 0, label4 = 0;
|
||||
static MonoMethod *get_object_for_native_variant = NULL;
|
||||
static MonoMethod *set_value_impl = NULL;
|
||||
gboolean byValue = !t->byref && (t->attrs & PARAM_ATTRIBUTE_IN);
|
||||
|
||||
MonoType *object_type = mono_get_object_type ();
|
||||
@@ -3258,29 +3343,15 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
mono_mb_emit_ldloc (mb, indices_var);
|
||||
mono_mb_emit_icall (mb, mono_marshal_safearray_get_value);
|
||||
|
||||
if (!get_object_for_native_variant) {
|
||||
ERROR_DECL (error);
|
||||
get_object_for_native_variant = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
g_assert (get_object_for_native_variant);
|
||||
|
||||
if (!set_value_impl) {
|
||||
ERROR_DECL (error);
|
||||
set_value_impl = mono_class_get_method_from_name_checked (mono_defaults.array_class, "SetValueImpl", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
g_assert (set_value_impl);
|
||||
|
||||
elem_var = mono_mb_add_local (mb, object_type);
|
||||
|
||||
mono_mb_emit_managed_call (mb, get_object_for_native_variant, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetObjectForNativeVariant (), NULL);
|
||||
mono_mb_emit_stloc (mb, elem_var);
|
||||
|
||||
mono_mb_emit_ldloc (mb, result_var);
|
||||
mono_mb_emit_ldloc (mb, elem_var);
|
||||
mono_mb_emit_ldloc (mb, index_var);
|
||||
mono_mb_emit_managed_call (mb, set_value_impl, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Array_SetValueImpl (), NULL);
|
||||
|
||||
if (byValue)
|
||||
mono_mb_patch_short_branch (mb, label4);
|
||||
@@ -3333,8 +3404,6 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
|
||||
int result_var, indices_var, empty_var, elem_var, index_var;
|
||||
guint32 label1 = 0, label2 = 0, label3 = 0;
|
||||
static MonoMethod *get_object_for_native_variant = NULL;
|
||||
static MonoMethod *set_value_impl = NULL;
|
||||
|
||||
MonoType *object_type = mono_get_object_type ();
|
||||
MonoType *int_type = mono_get_int_type ();
|
||||
@@ -3367,29 +3436,15 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
|
||||
mono_mb_emit_ldloc (mb, indices_var);
|
||||
mono_mb_emit_icall (mb, mono_marshal_safearray_get_value);
|
||||
|
||||
if (!get_object_for_native_variant) {
|
||||
ERROR_DECL (error);
|
||||
get_object_for_native_variant = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
g_assert (get_object_for_native_variant);
|
||||
|
||||
if (!set_value_impl) {
|
||||
ERROR_DECL (error);
|
||||
set_value_impl = mono_class_get_method_from_name_checked (mono_defaults.array_class, "SetValueImpl", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
g_assert (set_value_impl);
|
||||
|
||||
elem_var = mono_mb_add_local (mb, object_type);
|
||||
|
||||
mono_mb_emit_managed_call (mb, get_object_for_native_variant, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetObjectForNativeVariant (), NULL);
|
||||
mono_mb_emit_stloc (mb, elem_var);
|
||||
|
||||
mono_mb_emit_ldloc (mb, result_var);
|
||||
mono_mb_emit_ldloc (mb, elem_var);
|
||||
mono_mb_emit_ldloc (mb, index_var);
|
||||
mono_mb_emit_managed_call (mb, set_value_impl, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Array_SetValueImpl (), NULL);
|
||||
|
||||
mono_mb_emit_add_to_local (mb, index_var, 1);
|
||||
|
||||
|
||||
@@ -617,17 +617,18 @@ load_cattr_value_boxed (MonoDomain *domain, MonoImage *image, MonoType *t, const
|
||||
static MonoObject*
|
||||
create_cattr_typed_arg (MonoType *t, MonoObject *val, MonoError *error)
|
||||
{
|
||||
static MonoMethod *ctor;
|
||||
MonoObject *retval;
|
||||
void *params [2], *unboxed;
|
||||
|
||||
error_init (error);
|
||||
|
||||
if (!ctor) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ctor)
|
||||
|
||||
ctor = mono_class_get_method_from_name_checked (mono_class_get_custom_attribute_typed_argument_class (), ".ctor", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ctor)
|
||||
|
||||
params [0] = mono_type_get_object_checked (mono_domain_get (), t, error);
|
||||
return_val_if_nok (error, NULL);
|
||||
|
||||
@@ -645,16 +646,17 @@ create_cattr_typed_arg (MonoType *t, MonoObject *val, MonoError *error)
|
||||
static MonoObject*
|
||||
create_cattr_named_arg (void *minfo, MonoObject *typedarg, MonoError *error)
|
||||
{
|
||||
static MonoMethod *ctor;
|
||||
MonoObject *retval;
|
||||
void *unboxed, *params [2];
|
||||
|
||||
error_init (error);
|
||||
|
||||
if (!ctor) {
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ctor)
|
||||
|
||||
ctor = mono_class_get_method_from_name_checked (mono_class_get_custom_attribute_named_argument_class (), ".ctor", 2, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ctor)
|
||||
|
||||
params [0] = minfo;
|
||||
params [1] = typedarg;
|
||||
|
||||
+10
-3
@@ -590,20 +590,27 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
|
||||
mono_fixup_exe_image (exe_image);
|
||||
#endif
|
||||
} else if (runtime_version != NULL) {
|
||||
runtimes = g_slist_prepend (runtimes, (gpointer)get_runtime_by_version (runtime_version));
|
||||
const MonoRuntimeInfo* rt = get_runtime_by_version (runtime_version);
|
||||
if (rt != NULL)
|
||||
runtimes = g_slist_prepend (runtimes, (gpointer)rt);
|
||||
}
|
||||
|
||||
if (runtimes == NULL) {
|
||||
const MonoRuntimeInfo *default_runtime = get_runtime_by_version (DEFAULT_RUNTIME_VERSION);
|
||||
g_assert (default_runtime);
|
||||
runtimes = g_slist_prepend (runtimes, (gpointer)default_runtime);
|
||||
g_print ("WARNING: The runtime version supported by this application is unavailable.\n");
|
||||
if (runtime_version != NULL)
|
||||
g_print ("WARNING: The requested runtime version \"%s\" is unavailable.\n", runtime_version);
|
||||
else
|
||||
g_print ("WARNING: The runtime version supported by this application is unavailable.\n");
|
||||
g_print ("Using default runtime: %s\n", default_runtime->runtime_version);
|
||||
}
|
||||
|
||||
/* The selected runtime will be the first one for which there is a mscrolib.dll */
|
||||
GSList *tmp = runtimes;
|
||||
while (tmp != NULL) {
|
||||
current_runtime = (MonoRuntimeInfo*)runtimes->data;
|
||||
current_runtime = (MonoRuntimeInfo*)tmp->data;
|
||||
g_assert (current_runtime);
|
||||
ass = mono_assembly_load_corlib (current_runtime, &status);
|
||||
if (status != MONO_IMAGE_OK && status != MONO_IMAGE_ERROR_ERRNO)
|
||||
break;
|
||||
|
||||
@@ -175,6 +175,7 @@ ICALL_EXPORT void ves_icall_System_GC_InternalCollect (int generation);
|
||||
ICALL_EXPORT void ves_icall_System_GC_RecordPressure (gint64);
|
||||
ICALL_EXPORT void ves_icall_System_GC_WaitForPendingFinalizers (void);
|
||||
ICALL_EXPORT void ves_icall_System_GC_GetGCMemoryInfo (gint64*, gint64*, gint64*, gint64*, gint64*);
|
||||
|
||||
#if !ENABLE_NETCORE
|
||||
ICALL_EXPORT void ves_icall_System_IO_LogcatTextWriter_Log (const char*, gint32, const char*);
|
||||
#endif
|
||||
@@ -192,6 +193,7 @@ ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ZeroMemory (guint8*, s
|
||||
ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ZeroMemory (guint8*, guint);
|
||||
#endif
|
||||
ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ecvt_s(char*, size_t, double, int, int*, int*);
|
||||
|
||||
#if defined(ENABLE_MONODROID) || defined(ENABLE_MONOTOUCH) || defined(TARGET_WASM)
|
||||
ICALL_EXPORT gpointer ves_icall_System_IO_Compression_DeflateStreamNative_CreateZStream (gint32 compress, MonoBoolean gzip, gpointer feeder, gpointer data);
|
||||
ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_CloseZStream (gpointer stream);
|
||||
@@ -199,6 +201,7 @@ ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_Flush (g
|
||||
ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_ReadZStream (gpointer stream, gpointer buffer, gint32 length);
|
||||
ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_WriteZStream (gpointer stream, gpointer buffer, gint32 length);
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_MONODROID)
|
||||
ICALL_EXPORT gpointer ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_CreateNLSocket (void);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size);
|
||||
@@ -216,27 +219,55 @@ ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_SetPriorityClas
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_SetProcessWorkingSetSize (gpointer handle, gsize min, gsize max);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_TerminateProcess (gpointer handle, gint32 exitcode);
|
||||
ICALL_EXPORT gint32 ves_icall_Microsoft_Win32_NativeMethods_WaitForInputIdle (gpointer handle, gint32 milliseconds);
|
||||
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_TlsProviderFactory_IsBtlsSupported (void);
|
||||
|
||||
ICALL_EXPORT void ves_icall_Mono_Runtime_AnnotateMicrosoftTelemetry (const char *key, const char *value);
|
||||
ICALL_EXPORT void ves_icall_Mono_Runtime_DisableMicrosoftTelemetry (void);
|
||||
ICALL_EXPORT int ves_icall_Mono_Runtime_CheckCrashReportingLog (const char *directory, MonoBoolean clear);
|
||||
ICALL_EXPORT void ves_icall_Mono_Runtime_EnableCrashReportingLog (const char *directory);
|
||||
|
||||
ICALL_EXPORT void ves_icall_System_Array_InternalCreate (MonoArray *volatile* result, MonoType* type, gint32 rank, gint32* pLengths, gint32* pLowerBounds);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Array_CanChangePrimitive (MonoReflectionType *volatile* ref_src_type_handle, MonoReflectionType *volatile* ref_dst_type_handle, MonoBoolean reliable);
|
||||
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Diagnostics_Debugger_IsAttached_internal (void);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Diagnostics_Debugger_IsLogging (void);
|
||||
ICALL_EXPORT void ves_icall_System_Diagnostics_Debugger_Log (int level, MonoString *volatile* category, MonoString *volatile* message);
|
||||
|
||||
ICALL_EXPORT void ves_icall_Mono_RuntimeGPtrArrayHandle_GPtrArrayFree (GPtrArray *ptr_array);
|
||||
ICALL_EXPORT void ves_icall_Mono_RuntimeMarshal_FreeAssemblyName (MonoAssemblyName *aname, MonoBoolean free_struct);
|
||||
ICALL_EXPORT void ves_icall_Mono_SafeStringMarshal_GFree (void *c_str);
|
||||
ICALL_EXPORT char* ves_icall_Mono_SafeStringMarshal_StringToUtf8 (MonoString *volatile* s);
|
||||
ICALL_EXPORT MonoType* ves_icall_Mono_RuntimeClassHandle_GetTypeFromClass (MonoClass *klass);
|
||||
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2*);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2*);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2*);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2*);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2*);
|
||||
ICALL_EXPORT gpointer ves_icall_System_Net_Sockets_Socket_Accept_internal (gsize, gint32*, MonoBoolean);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Available_internal (gsize, gint32*);
|
||||
|
||||
ICALL_EXPORT gpointer ves_icall_System_Net_Sockets_Socket_Accept_icall (gsize, gint32*, MonoBoolean);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Available_icall (gsize, gint32*);
|
||||
ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Blocking_icall (gsize sock, MonoBoolean block, gint32 *werror);
|
||||
ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Close_icall (gsize sock, gint32 *werror);
|
||||
ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Disconnect_icall (gsize sock, MonoBoolean reuse, gint32 *werror);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_Duplicate_icall (gpointer handle, gint32 targetProcessId, gpointer *duplicate_handle, gint32 *werror);
|
||||
ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Listen_icall (gsize sock, guint32 backlog, gint32 *werror);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_Poll_icall (gsize sock, gint mode, gint timeout, gint32 *werror);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Receive_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Receive_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Send_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking);
|
||||
ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Send_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking);
|
||||
ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Shutdown_icall (gsize sock, gint32 how, gint32 *werror);
|
||||
ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_SupportPortReuse_icall (MonoProtocolType proto);
|
||||
|
||||
ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem (int);
|
||||
ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize);
|
||||
ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (gsize);
|
||||
ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer ptr, int size);
|
||||
ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal (gpointer, gsize);
|
||||
ICALL_EXPORT char* ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2*, int);
|
||||
ICALL_EXPORT gunichar2* ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2*, int);
|
||||
|
||||
|
||||
#endif // __MONO_METADATA_ICALL_DECL_H__
|
||||
@@ -42,9 +42,7 @@ HANDLES(ARRAY_4, "FastCopy", ves_icall_System_Array_FastCopy, MonoBoolea
|
||||
HANDLES(ARRAY_4a, "GetCorElementTypeOfElementType", ves_icall_System_Array_GetCorElementTypeOfElementType, gint32, 1, (MonoArray))
|
||||
NOHANDLES(ICALL(ARRAY_5, "GetGenericValue_icall", ves_icall_System_Array_GetGenericValue_icall))
|
||||
HANDLES(ARRAY_6, "GetLength", ves_icall_System_Array_GetLength, gint32, 2, (MonoArray, gint32))
|
||||
HANDLES(ARRAY_15, "GetLongLength", ves_icall_System_Array_GetLongLength, gint64, 2, (MonoArray, gint32))
|
||||
HANDLES(ARRAY_7, "GetLowerBound", ves_icall_System_Array_GetLowerBound, gint32, 2, (MonoArray, gint32))
|
||||
HANDLES(ARRAY_8, "GetRank", ves_icall_System_Array_GetRank, gint32, 1, (MonoObject))
|
||||
HANDLES(ARRAY_9, "GetValue", ves_icall_System_Array_GetValue, MonoObject, 2, (MonoArray, MonoArray))
|
||||
HANDLES(ARRAY_10, "GetValueImpl", ves_icall_System_Array_GetValueImpl, MonoObject, 2, (MonoArray, guint32))
|
||||
NOHANDLES(ICALL(ARRAY_10a, "InternalCreate", ves_icall_System_Array_InternalCreate))
|
||||
@@ -172,8 +170,7 @@ NOHANDLES(ICALL(MATHF_19, "Sqrt", ves_icall_System_MathF_Sqrt))
|
||||
NOHANDLES(ICALL(MATHF_20, "Tan", ves_icall_System_MathF_Tan))
|
||||
NOHANDLES(ICALL(MATHF_21, "Tanh", ves_icall_System_MathF_Tanh))
|
||||
|
||||
ICALL_TYPE(OBJ, "System.Object", OBJ_1)
|
||||
HANDLES(OBJ_1, "GetType", ves_icall_System_Object_GetType, MonoReflectionType, 1, (MonoObject))
|
||||
ICALL_TYPE(OBJ, "System.Object", OBJ_3)
|
||||
HANDLES(OBJ_3, "MemberwiseClone", ves_icall_System_Object_MemberwiseClone, MonoObject, 1, (MonoObject))
|
||||
|
||||
ICALL_TYPE(ASSEM, "System.Reflection.Assembly", ASSEM_2)
|
||||
@@ -329,7 +326,6 @@ HANDLES(RUNH_3a, "PrepareMethod", ves_icall_System_Runtime_CompilerServices_Runt
|
||||
HANDLES(RUNH_4, "RunClassConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor, void, 1, (MonoType_ptr))
|
||||
HANDLES(RUNH_5, "RunModuleConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor, void, 1, (MonoImage_ptr))
|
||||
NOHANDLES(ICALL(RUNH_5h, "SufficientExecutionStack", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_SufficientExecutionStack))
|
||||
NOHANDLES(ICALL(RUNH_6, "get_OffsetToStringData", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetOffsetToStringData))
|
||||
|
||||
ICALL_TYPE(GCH, "System.Runtime.InteropServices.GCHandle", GCH_1)
|
||||
HANDLES(GCH_1, "InternalAlloc", ves_icall_System_GCHandle_InternalAlloc, gpointer, 2, (MonoObject, gint32))
|
||||
@@ -338,8 +334,8 @@ HANDLES(GCH_3, "InternalGet", ves_icall_System_GCHandle_InternalGet, MonoObject,
|
||||
HANDLES(GCH_4, "InternalSet", ves_icall_System_GCHandle_InternalSet, void, 2, (gpointer, MonoObject))
|
||||
|
||||
ICALL_TYPE(MARSHAL, "System.Runtime.InteropServices.Marshal", MARSHAL_2)
|
||||
HANDLES(MARSHAL_2, "AllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem, gpointer, 1, (int))
|
||||
HANDLES(MARSHAL_3, "AllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal, gpointer, 1, (gsize))
|
||||
NOHANDLES(ICALL(MARSHAL_2, "AllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem))
|
||||
NOHANDLES(ICALL(MARSHAL_3, "AllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal))
|
||||
NOHANDLES(ICALL(MARSHAL_50, "BufferToBSTR", ves_icall_System_Runtime_InteropServices_Marshal_BufferToBSTR))
|
||||
HANDLES(MARSHAL_4, "DestroyStructure", ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure, void, 2, (gpointer, MonoReflectionType))
|
||||
NOHANDLES(ICALL(MARSHAL_5, "FreeBSTR", ves_icall_System_Runtime_InteropServices_Marshal_FreeBSTR))
|
||||
@@ -353,8 +349,8 @@ HANDLES(MARSHAL_12, "OffsetOf", ves_icall_System_Runtime_InteropServices_Marshal
|
||||
HANDLES(MARSHAL_13, "PrelinkInternal", ves_icall_System_Runtime_InteropServices_Marshal_Prelink, void, 1, (MonoReflectionMethod))
|
||||
HANDLES(MARSHAL_17, "PtrToStringBSTR", ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringBSTR, MonoString, 1, (mono_bstr_const))
|
||||
HANDLES(MARSHAL_20, "PtrToStructureInternal", ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructureInternal, void, 3, (gconstpointer, MonoObject, MonoBoolean))
|
||||
HANDLES(MARSHAL_43, "ReAllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem, gpointer, 2, (gpointer, int))
|
||||
HANDLES(MARSHAL_23, "ReAllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal, gpointer, 2, (gpointer, gsize))
|
||||
NOHANDLES(ICALL(MARSHAL_43, "ReAllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem))
|
||||
NOHANDLES(ICALL(MARSHAL_23, "ReAllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal))
|
||||
NOHANDLES(ICALL(MARSHAL_29a, "SetLastWin32Error", ves_icall_System_Runtime_InteropServices_Marshal_SetLastWin32Error))
|
||||
HANDLES(MARSHAL_30, "SizeOf", ves_icall_System_Runtime_InteropServices_Marshal_SizeOf, guint32, 1, (MonoReflectionType))
|
||||
HANDLES(MARSHAL_31, "SizeOfHelper", ves_icall_System_Runtime_InteropServices_Marshal_SizeOfHelper, guint32, 2, (MonoReflectionType, MonoBoolean))
|
||||
@@ -505,7 +501,6 @@ HANDLES(THREAD_8, "SetName_icall", ves_icall_System_Threading_Thread_SetName_ica
|
||||
HANDLES(THREAD_9, "SetPriority", ves_icall_System_Threading_Thread_SetPriority, void, 2, (MonoThreadObject, int))
|
||||
HANDLES(THREAD_10, "SetState", ves_icall_System_Threading_Thread_SetState, void, 2, (MonoInternalThread, guint32))
|
||||
HANDLES(THREAD_11, "SleepInternal", ves_icall_System_Threading_Thread_Sleep_internal, void, 2, (gint32, MonoBoolean))
|
||||
HANDLES(THREAD_12, "SpinWait_nop", ves_icall_System_Threading_Thread_SpinWait_nop, void, 0, ())
|
||||
HANDLES(THREAD_13, "StartInternal", ves_icall_System_Threading_Thread_StartInternal, void, 1, (MonoThreadObject))
|
||||
NOHANDLES(ICALL(THREAD_14, "YieldInternal", ves_icall_System_Threading_Thread_YieldInternal))
|
||||
|
||||
|
||||
+39
-43
@@ -516,9 +516,9 @@ HANDLES(MCATTR_3, "IsDefinedInternal", ves_icall_MonoCustomAttrs_IsDefinedIntern
|
||||
|
||||
#ifndef DISABLE_SOCKETS
|
||||
ICALL_TYPE(NDNS, "System.Net.Dns", NDNS_1)
|
||||
HANDLES(NDNS_1, "GetHostByAddr_internal(string,string&,string[]&,string[]&,int)", ves_icall_System_Net_Dns_GetHostByAddr_internal, MonoBoolean, 5, (MonoString, MonoStringOut, MonoArrayOut, MonoArrayOut, gint32))
|
||||
HANDLES(NDNS_2, "GetHostByName_internal(string,string&,string[]&,string[]&,int)", ves_icall_System_Net_Dns_GetHostByName_internal, MonoBoolean, 5, (MonoString, MonoStringOut, MonoArrayOut, MonoArrayOut, gint32))
|
||||
HANDLES(NDNS_3, "GetHostName_internal(string&)", ves_icall_System_Net_Dns_GetHostName_internal, MonoBoolean, 1, (MonoStringOut))
|
||||
HANDLES(NDNS_1, "GetHostByAddr_icall", ves_icall_System_Net_Dns_GetHostByAddr, MonoBoolean, 5, (MonoString, MonoStringOut, MonoArrayOut, MonoArrayOut, gint32))
|
||||
HANDLES(NDNS_2, "GetHostByName_icall", ves_icall_System_Net_Dns_GetHostByName, MonoBoolean, 5, (MonoString, MonoStringOut, MonoArrayOut, MonoArrayOut, gint32))
|
||||
HANDLES(NDNS_3, "GetHostName_icall", ves_icall_System_Net_Dns_GetHostName, MonoBoolean, 1, (MonoStringOut))
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_MONODROID)
|
||||
@@ -530,45 +530,41 @@ NOHANDLES(ICALL(LINUXNETWORKCHANGE_3, "ReadEvents", ves_icall_System_Net_Network
|
||||
|
||||
#if !defined(DISABLE_SOCKETS)
|
||||
ICALL_TYPE(MAC_IFACE_PROPS, "System.Net.NetworkInformation.MacOsIPInterfaceProperties", MAC_IFACE_PROPS_1)
|
||||
HANDLES(MAC_IFACE_PROPS_1, "ParseRouteInfo_internal", ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal, MonoBoolean, 2, (MonoString, MonoArrayOut))
|
||||
#endif
|
||||
HANDLES(MAC_IFACE_PROPS_1, "ParseRouteInfo_icall", ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo, MonoBoolean, 2, (MonoString, MonoArrayOut))
|
||||
|
||||
#ifndef DISABLE_SOCKETS
|
||||
ICALL_TYPE(SOCK, "System.Net.Sockets.Socket", SOCK_1)
|
||||
NOHANDLES(ICALL(SOCK_1, "Accept_internal(intptr,int&,bool)", ves_icall_System_Net_Sockets_Socket_Accept_internal))
|
||||
NOHANDLES(ICALL(SOCK_2, "Available_internal(intptr,int&)", ves_icall_System_Net_Sockets_Socket_Available_internal))
|
||||
HANDLES(SOCK_3, "Bind_internal(intptr,System.Net.SocketAddress,int&)", ves_icall_System_Net_Sockets_Socket_Bind_internal, void, 3, (gsize, MonoObject, gint32_ref))
|
||||
HANDLES(SOCK_4, "Blocking_internal(intptr,bool,int&)", ves_icall_System_Net_Sockets_Socket_Blocking_internal, void, 3, (gsize, MonoBoolean, gint32_ref))
|
||||
HANDLES(SOCK_5, "Close_internal(intptr,int&)", ves_icall_System_Net_Sockets_Socket_Close_internal, void, 2, (gsize, gint32_ref))
|
||||
HANDLES(SOCK_6, "Connect_internal(intptr,System.Net.SocketAddress,int&,bool)", ves_icall_System_Net_Sockets_Socket_Connect_internal, void, 4, (gsize, MonoObject, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_6a, "Disconnect_internal(intptr,bool,int&)", ves_icall_System_Net_Sockets_Socket_Disconnect_internal, void, 3, (gsize, MonoBoolean, gint32_ref))
|
||||
HANDLES(SOCK_6b, "Duplicate_internal", ves_icall_System_Net_Sockets_Socket_Duplicate_internal, MonoBoolean, 4, (gpointer, gint32, gpointer_ref, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_1, "Accept_icall", ves_icall_System_Net_Sockets_Socket_Accept_icall))
|
||||
NOHANDLES(ICALL(SOCK_2, "Available_icall", ves_icall_System_Net_Sockets_Socket_Available_icall))
|
||||
HANDLES(SOCK_3, "Bind_icall", ves_icall_System_Net_Sockets_Socket_Bind_icall, void, 3, (gsize, MonoObject, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_4, "Blocking_icall", ves_icall_System_Net_Sockets_Socket_Blocking_icall))
|
||||
NOHANDLES(ICALL(SOCK_5, "Close_icall", ves_icall_System_Net_Sockets_Socket_Close_icall))
|
||||
HANDLES(SOCK_6, "Connect_icall", ves_icall_System_Net_Sockets_Socket_Connect_icall, void, 4, (gsize, MonoObject, gint32_ref, MonoBoolean))
|
||||
NOHANDLES(ICALL(SOCK_6a, "Disconnect_icall", ves_icall_System_Net_Sockets_Socket_Disconnect_icall))
|
||||
NOHANDLES(ICALL(SOCK_6b, "Duplicate_icall", ves_icall_System_Net_Sockets_Socket_Duplicate_icall))
|
||||
//FIXME The array is ref but the icall does not write to it.
|
||||
HANDLES(SOCK_7, "GetSocketOption_arr_internal(intptr,System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,byte[]&,int&)", ves_icall_System_Net_Sockets_Socket_GetSocketOption_arr_internal, void, 5, (gsize, gint32, gint32, MonoArray, gint32_ref))
|
||||
HANDLES(SOCK_8, "GetSocketOption_obj_internal(intptr,System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,object&,int&)", ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal, void, 5, (gsize, gint32, gint32, MonoObjectOut, gint32_ref))
|
||||
HANDLES(SOCK_21, "IOControl_internal(intptr,int,byte[],byte[],int&)", ves_icall_System_Net_Sockets_Socket_IOControl_internal, int, 5, (gsize, gint32, MonoArray, MonoArray, gint32_ref))
|
||||
HANDLES(SOCK_9, "Listen_internal(intptr,int,int&)", ves_icall_System_Net_Sockets_Socket_Listen_internal, void, 3, (gsize, guint32, gint32_ref))
|
||||
HANDLES(SOCK_10, "LocalEndPoint_internal(intptr,int,int&)", ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal, MonoObject, 3, (gsize, gint32, gint32_ref))
|
||||
HANDLES(SOCK_11, "Poll_internal", ves_icall_System_Net_Sockets_Socket_Poll_internal, MonoBoolean, 4, (gsize, int, int, gint32_ref))
|
||||
HANDLES(SOCK_13, "ReceiveFrom_internal(intptr,byte*,int,System.Net.Sockets.SocketFlags,System.Net.SocketAddress&,int&,bool)", ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal, gint32, 7, (gsize, char_ptr, gint32, gint32, MonoObjectInOut, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_11a, "Receive_internal(intptr,System.Net.Sockets.Socket/WSABUF*,int,System.Net.Sockets.SocketFlags,int&,bool)", ves_icall_System_Net_Sockets_Socket_Receive_array_internal, gint32, 6, (gsize, WSABUF_ptr, gint32, gint32, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_12, "Receive_internal(intptr,byte*,int,System.Net.Sockets.SocketFlags,int&,bool)", ves_icall_System_Net_Sockets_Socket_Receive_internal, gint32, 6, (gsize, char_ptr, gint32, gint32, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_14, "RemoteEndPoint_internal(intptr,int,int&)", ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_internal, MonoObject, 3, (gsize, gint32, gint32_ref))
|
||||
HANDLES(SOCK_15, "Select_internal(System.Net.Sockets.Socket[]&,int,int&)", ves_icall_System_Net_Sockets_Socket_Select_internal, void, 3, (MonoArrayInOut, gint32, gint32_ref))
|
||||
HANDLES(SOCK_15a, "SendFile_internal(intptr,string,byte[],byte[],System.Net.Sockets.TransmitFileOptions,int&,bool)", ves_icall_System_Net_Sockets_Socket_SendFile_internal, MonoBoolean, 7, (gsize, MonoString, MonoArray, MonoArray, int, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_16, "SendTo_internal(intptr,byte*,int,System.Net.Sockets.SocketFlags,System.Net.SocketAddress,int&,bool)", ves_icall_System_Net_Sockets_Socket_SendTo_internal, gint32, 7, (gsize, char_ptr, gint32, gint32, MonoObject, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_16a, "Send_internal(intptr,System.Net.Sockets.Socket/WSABUF*,int,System.Net.Sockets.SocketFlags,int&,bool)", ves_icall_System_Net_Sockets_Socket_Send_array_internal, gint32, 6, (gsize, WSABUF_ptr, gint32, gint32, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_17, "Send_internal(intptr,byte*,int,System.Net.Sockets.SocketFlags,int&,bool)", ves_icall_System_Net_Sockets_Socket_Send_internal, gint32, 6, (gsize, char_ptr, gint32, gint32, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_18, "SetSocketOption_internal(intptr,System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,object,byte[],int,int&)", ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal, void, 7, (gsize, gint32, gint32, MonoObject, MonoArray, gint32, gint32_ref))
|
||||
HANDLES(SOCK_19, "Shutdown_internal(intptr,System.Net.Sockets.SocketShutdown,int&)", ves_icall_System_Net_Sockets_Socket_Shutdown_internal, void, 3, (gsize, gint32, gint32_ref))
|
||||
HANDLES(SOCK_20, "Socket_internal(System.Net.Sockets.AddressFamily,System.Net.Sockets.SocketType,System.Net.Sockets.ProtocolType,int&)", ves_icall_System_Net_Sockets_Socket_Socket_internal, gpointer, 5, (MonoObject, gint32, gint32, gint32, gint32_ref))
|
||||
HANDLES(SOCK_20a, "SupportsPortReuse", ves_icall_System_Net_Sockets_Socket_SupportPortReuse, MonoBoolean, 1, (MonoProtocolType))
|
||||
HANDLES(SOCK_7, "GetSocketOption_arr_icall", ves_icall_System_Net_Sockets_Socket_GetSocketOption_arr_icall, void, 5, (gsize, gint32, gint32, MonoArray, gint32_ref))
|
||||
HANDLES(SOCK_8, "GetSocketOption_obj_icall", ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_icall, void, 5, (gsize, gint32, gint32, MonoObjectOut, gint32_ref))
|
||||
HANDLES(SOCK_21, "IOControl_icall", ves_icall_System_Net_Sockets_Socket_IOControl_icall, int, 5, (gsize, gint32, MonoArray, MonoArray, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_9, "Listen_icall", ves_icall_System_Net_Sockets_Socket_Listen_icall))
|
||||
HANDLES(SOCK_10, "LocalEndPoint_icall", ves_icall_System_Net_Sockets_Socket_LocalEndPoint_icall, MonoObject, 3, (gsize, gint32, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_11, "Poll_icall", ves_icall_System_Net_Sockets_Socket_Poll_icall))
|
||||
HANDLES(SOCK_13, "ReceiveFrom_icall", ves_icall_System_Net_Sockets_Socket_ReceiveFrom_icall, gint32, 7, (gsize, char_ptr, gint32, gint32, MonoObjectInOut, gint32_ref, MonoBoolean))
|
||||
NOHANDLES(ICALL(SOCK_11a, "Receive_array_icall", ves_icall_System_Net_Sockets_Socket_Receive_array_icall))
|
||||
NOHANDLES(ICALL(SOCK_12, "Receive_icall", ves_icall_System_Net_Sockets_Socket_Receive_icall))
|
||||
HANDLES(SOCK_14, "RemoteEndPoint_icall", ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_icall, MonoObject, 3, (gsize, gint32, gint32_ref))
|
||||
HANDLES(SOCK_15, "Select_icall", ves_icall_System_Net_Sockets_Socket_Select_icall, void, 3, (MonoArrayInOut, gint32, gint32_ref))
|
||||
HANDLES(SOCK_15a, "SendFile_icall", ves_icall_System_Net_Sockets_Socket_SendFile_icall, MonoBoolean, 7, (gsize, MonoString, MonoArray, MonoArray, int, gint32_ref, MonoBoolean))
|
||||
HANDLES(SOCK_16, "SendTo_icall", ves_icall_System_Net_Sockets_Socket_SendTo_icall, gint32, 7, (gsize, char_ptr, gint32, gint32, MonoObject, gint32_ref, MonoBoolean))
|
||||
NOHANDLES(ICALL(SOCK_16a, "Send_array_icall", ves_icall_System_Net_Sockets_Socket_Send_array_icall))
|
||||
NOHANDLES(ICALL(SOCK_17, "Send_icall", ves_icall_System_Net_Sockets_Socket_Send_icall))
|
||||
HANDLES(SOCK_18, "SetSocketOption_icall", ves_icall_System_Net_Sockets_Socket_SetSocketOption_icall, void, 7, (gsize, gint32, gint32, MonoObject, MonoArray, gint32, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_19, "Shutdown_icall", ves_icall_System_Net_Sockets_Socket_Shutdown_icall))
|
||||
HANDLES(SOCK_20, "Socket_icall", ves_icall_System_Net_Sockets_Socket_Socket_icall, gpointer, 4, (gint32, gint32, gint32, gint32_ref))
|
||||
NOHANDLES(ICALL(SOCK_20a, "SupportsPortReuse", ves_icall_System_Net_Sockets_Socket_SupportPortReuse_icall))
|
||||
HANDLES(SOCK_21a, "cancel_blocking_socket_operation", ves_icall_cancel_blocking_socket_operation, void, 1, (MonoThreadObject))
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SOCKETS
|
||||
ICALL_TYPE(SOCKEX, "System.Net.Sockets.SocketException", SOCKEX_1)
|
||||
NOHANDLES(ICALL(SOCKEX_1, "WSAGetLastError_internal", ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal))
|
||||
NOHANDLES(ICALL(SOCKEX_1, "WSAGetLastError_icall", ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_icall))
|
||||
#endif /* !DISABLE_SOCKETS */
|
||||
|
||||
ICALL_TYPE(NUMBER_FORMATTER, "System.NumberFormatter", NUMBER_FORMATTER_1)
|
||||
@@ -750,9 +746,9 @@ NOHANDLES(ICALL(MARSHAL_1, "AddRefInternal", ves_icall_System_Runtime_InteropSer
|
||||
#else
|
||||
ICALL_TYPE(MARSHAL, "System.Runtime.InteropServices.Marshal", MARSHAL_2)
|
||||
#endif
|
||||
HANDLES(MARSHAL_2, "AllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem, gpointer, 1, (int))
|
||||
HANDLES(MARSHAL_51,"AllocCoTaskMemSize(uintptr)", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize, gpointer, 1, (gsize))
|
||||
HANDLES(MARSHAL_3, "AllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal, gpointer, 1, (gsize))
|
||||
NOHANDLES(ICALL(MARSHAL_2, "AllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem))
|
||||
NOHANDLES(ICALL(MARSHAL_51,"AllocCoTaskMemSize(uintptr)", ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize))
|
||||
NOHANDLES(ICALL(MARSHAL_3, "AllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal))
|
||||
NOHANDLES(ICALL(MARSHAL_50, "BufferToBSTR", ves_icall_System_Runtime_InteropServices_Marshal_BufferToBSTR))
|
||||
HANDLES(MARSHAL_4, "DestroyStructure", ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure, void, 2, (gpointer, MonoReflectionType))
|
||||
NOHANDLES(ICALL(MARSHAL_5, "FreeBSTR", ves_icall_System_Runtime_InteropServices_Marshal_FreeBSTR))
|
||||
@@ -790,8 +786,8 @@ HANDLES(MARSHAL_21, "PtrToStructure(intptr,object)", ves_icall_System_Runtime_In
|
||||
#if !defined (DISABLE_COM) || defined (HOST_WIN32)
|
||||
NOHANDLES(ICALL(MARSHAL_22, "QueryInterfaceInternal", ves_icall_System_Runtime_InteropServices_Marshal_QueryInterfaceInternal))
|
||||
#endif
|
||||
HANDLES(MARSHAL_43, "ReAllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem, gpointer, 2, (gpointer, int))
|
||||
HANDLES(MARSHAL_23, "ReAllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal, gpointer, 2, (gpointer, gsize))
|
||||
NOHANDLES(ICALL(MARSHAL_43, "ReAllocCoTaskMem", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem))
|
||||
NOHANDLES(ICALL(MARSHAL_23, "ReAllocHGlobal", ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal))
|
||||
#ifndef DISABLE_COM
|
||||
HANDLES(MARSHAL_49, "ReleaseComObjectInternal", ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal, gint32, 1, (MonoObject))
|
||||
#endif
|
||||
@@ -801,8 +797,8 @@ NOHANDLES(ICALL(MARSHAL_29, "ReleaseInternal", ves_icall_System_Runtime_InteropS
|
||||
NOHANDLES(ICALL(MARSHAL_29a, "SetLastWin32Error", ves_icall_System_Runtime_InteropServices_Marshal_SetLastWin32Error))
|
||||
HANDLES(MARSHAL_30, "SizeOf", ves_icall_System_Runtime_InteropServices_Marshal_SizeOf, guint32, 1, (MonoReflectionType))
|
||||
HANDLES(MARSHAL_31, "SizeOfHelper", ves_icall_System_Runtime_InteropServices_Marshal_SizeOfHelper, guint32, 2, (MonoReflectionType, MonoBoolean))
|
||||
HANDLES(MARSHAL_32, "StringToHGlobalAnsi", ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi, char_ptr, 2, (const_gunichar2_ptr, int))
|
||||
HANDLES(MARSHAL_33, "StringToHGlobalUni", ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni, gunichar2_ptr, 2, (const_gunichar2_ptr, int))
|
||||
NOHANDLES(ICALL(MARSHAL_32, "StringToHGlobalAnsi", ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi))
|
||||
NOHANDLES(ICALL(MARSHAL_33, "StringToHGlobalUni", ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni))
|
||||
HANDLES(MARSHAL_34, "StructureToPtr", ves_icall_System_Runtime_InteropServices_Marshal_StructureToPtr, void, 3, (MonoObject, gpointer, MonoBoolean))
|
||||
HANDLES(MARSHAL_35, "UnsafeAddrOfPinnedArrayElement", ves_icall_System_Runtime_InteropServices_Marshal_UnsafeAddrOfPinnedArrayElement, gpointer, 2, (MonoArray, int))
|
||||
HANDLES(MARSHAL_41, "copy_from_unmanaged_fixed", ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged, void, 5, (gconstpointer, gint32, MonoArray, gint32, gpointer))
|
||||
|
||||
@@ -944,7 +944,6 @@ ves_icall_System_Array_CreateInstanceImpl (MonoReflectionTypeHandle type, MonoAr
|
||||
|
||||
return mono_array_new_full_handle (MONO_HANDLE_DOMAIN (type), aklass, sizes, lower_bounds, error);
|
||||
}
|
||||
#endif
|
||||
|
||||
gint32
|
||||
ves_icall_System_Array_GetRank (MonoObjectHandle arr, MonoError *error)
|
||||
@@ -955,6 +954,7 @@ ves_icall_System_Array_GetRank (MonoObjectHandle arr, MonoError *error)
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
gint32
|
||||
@@ -996,6 +996,7 @@ ves_icall_System_Array_GetLength (MonoArrayHandle arr, gint32 dimension, MonoErr
|
||||
return (gint32)length;
|
||||
}
|
||||
|
||||
#ifndef ENABLE_NETCORE
|
||||
gint64
|
||||
ves_icall_System_Array_GetLongLength (MonoArrayHandle arr, gint32 dimension, MonoError *error)
|
||||
{
|
||||
@@ -1003,6 +1004,7 @@ ves_icall_System_Array_GetLongLength (MonoArrayHandle arr, gint32 dimension, Mon
|
||||
|
||||
return (gint64)mono_array_get_length (arr, dimension, error);
|
||||
}
|
||||
#endif
|
||||
|
||||
gint32
|
||||
ves_icall_System_Array_GetLowerBound (MonoArrayHandle arr, gint32 dimension, MonoError *error)
|
||||
@@ -1640,6 +1642,7 @@ ves_icall_System_ValueType_Equals (MonoObjectHandle this_obj, MonoObjectHandle t
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ENABLE_NETCORE
|
||||
MonoReflectionTypeHandle
|
||||
ves_icall_System_Object_GetType (MonoObjectHandle obj, MonoError *error)
|
||||
{
|
||||
@@ -1661,6 +1664,7 @@ ves_icall_System_Object_GetType (MonoObjectHandle obj, MonoError *error)
|
||||
#endif
|
||||
return mono_type_get_object_handle (domain, m_class_get_byval_arg (klass), error);
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
get_executing (MonoMethod *m, gint32 no, gint32 ilo, gboolean managed, gpointer data)
|
||||
|
||||
@@ -82,6 +82,7 @@ static GENERATE_TRY_GET_CLASS_WITH_CACHE (marshal, "System.Runtime.InteropServic
|
||||
static MonoMethod *sh_dangerous_add_ref;
|
||||
static MonoMethod *sh_dangerous_release;
|
||||
|
||||
// FIXME Consolidate the multiple functions named get_method_nofail.
|
||||
static MonoMethod*
|
||||
get_method_nofail (MonoClass *klass, const char *method_name, int num_params, int flags)
|
||||
{
|
||||
@@ -96,10 +97,8 @@ get_method_nofail (MonoClass *klass, const char *method_name, int num_params, in
|
||||
static void
|
||||
init_safe_handle (void)
|
||||
{
|
||||
sh_dangerous_add_ref = get_method_nofail (
|
||||
mono_class_try_get_safehandle_class (), "DangerousAddRef", 1, 0);
|
||||
sh_dangerous_release = get_method_nofail (
|
||||
mono_class_try_get_safehandle_class (), "DangerousRelease", 0, 0);
|
||||
mono_atomic_store_seq (&sh_dangerous_add_ref, get_method_nofail (mono_class_try_get_safehandle_class (), "DangerousAddRef", 1, 0));
|
||||
mono_atomic_store_seq (&sh_dangerous_release, get_method_nofail (mono_class_try_get_safehandle_class (), "DangerousRelease", 0, 0));
|
||||
}
|
||||
|
||||
static MonoImage*
|
||||
@@ -934,6 +933,48 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_COM
|
||||
|
||||
// FIXME There are multiple caches of "Clear".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Variant_Clear (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, variant_clear)
|
||||
variant_clear = get_method_nofail (mono_class_get_variant_class (), "Clear", 0, 0);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, variant_clear)
|
||||
|
||||
g_assert (variant_clear);
|
||||
return variant_clear;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// FIXME There are multiple caches of "GetObjectForNativeVariant".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Marshal_GetObjectForNativeVariant (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_object_for_native_variant)
|
||||
get_object_for_native_variant = get_method_nofail (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_object_for_native_variant)
|
||||
|
||||
g_assert (get_object_for_native_variant);
|
||||
return get_object_for_native_variant;
|
||||
}
|
||||
|
||||
// FIXME There are multiple caches of "GetNativeVariantForObject".
|
||||
G_GNUC_UNUSED
|
||||
static MonoMethod*
|
||||
mono_get_Marshal_GetNativeVariantForObject (void)
|
||||
{
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_native_variant_for_object)
|
||||
get_native_variant_for_object = get_method_nofail (mono_defaults.marshal_class, "GetNativeVariantForObject", 2, 0);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, get_native_variant_for_object)
|
||||
|
||||
g_assert (get_native_variant_for_object);
|
||||
return get_native_variant_for_object;
|
||||
}
|
||||
|
||||
static void
|
||||
emit_struct_conv_full (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_object,
|
||||
@@ -1105,31 +1146,19 @@ emit_struct_conv_full (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_obje
|
||||
case MONO_TYPE_OBJECT: {
|
||||
#ifndef DISABLE_COM
|
||||
if (to_object) {
|
||||
static MonoMethod *variant_clear = NULL;
|
||||
static MonoMethod *get_object_for_native_variant = NULL;
|
||||
|
||||
if (!variant_clear)
|
||||
variant_clear = get_method_nofail (mono_class_get_variant_class (), "Clear", 0, 0);
|
||||
if (!get_object_for_native_variant)
|
||||
get_object_for_native_variant = get_method_nofail (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0);
|
||||
mono_mb_emit_ldloc (mb, 1);
|
||||
mono_mb_emit_ldloc (mb, 0);
|
||||
mono_mb_emit_managed_call (mb, get_object_for_native_variant, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetObjectForNativeVariant (), NULL);
|
||||
mono_mb_emit_byte (mb, CEE_STIND_REF);
|
||||
|
||||
mono_mb_emit_ldloc (mb, 0);
|
||||
mono_mb_emit_managed_call (mb, variant_clear, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Variant_Clear (), NULL);
|
||||
}
|
||||
else {
|
||||
static MonoMethod *get_native_variant_for_object = NULL;
|
||||
|
||||
if (!get_native_variant_for_object)
|
||||
get_native_variant_for_object = get_method_nofail (mono_defaults.marshal_class, "GetNativeVariantForObject", 2, 0);
|
||||
|
||||
mono_mb_emit_ldloc (mb, 0);
|
||||
mono_mb_emit_byte(mb, CEE_LDIND_REF);
|
||||
mono_mb_emit_ldloc (mb, 1);
|
||||
mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetNativeVariantForObject (), NULL);
|
||||
}
|
||||
#else
|
||||
char *msg = g_strdup_printf ("COM support was disabled at compilation time.");
|
||||
@@ -4339,16 +4368,14 @@ emit_thunk_invoke_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, Mono
|
||||
static void
|
||||
emit_marshal_custom_get_instance (MonoMethodBuilder *mb, MonoClass *klass, MonoMarshalSpec *spec)
|
||||
{
|
||||
static MonoClass *Marshal = NULL;
|
||||
static MonoMethod *get_instance;
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, get_instance)
|
||||
|
||||
if (!Marshal) {
|
||||
Marshal = mono_class_try_get_marshal_class ();
|
||||
MonoClass *Marshal = mono_class_try_get_marshal_class ();
|
||||
g_assert (Marshal);
|
||||
|
||||
get_instance = get_method_nofail (Marshal, "GetCustomMarshalerInstance", 2, 0);
|
||||
g_assert (get_instance);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoClass, get_instance)
|
||||
|
||||
// HACK: We cannot use ldtoken in this type of wrapper.
|
||||
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
|
||||
@@ -4405,10 +4432,13 @@ emit_marshal_custom_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
|
||||
cleanup_native = get_method_nofail (klass, "CleanUpNativeData", 1, 0);
|
||||
g_assert (cleanup_native);
|
||||
|
||||
cleanup_managed = get_method_nofail (klass, "CleanUpManagedData", 1, 0);
|
||||
g_assert (cleanup_managed);
|
||||
|
||||
marshal_managed_to_native = get_method_nofail (klass, "MarshalManagedToNative", 1, 0);
|
||||
g_assert (marshal_managed_to_native);
|
||||
|
||||
marshal_native_to_managed = get_method_nofail (klass, "MarshalNativeToManaged", 1, 0);
|
||||
g_assert (marshal_native_to_managed);
|
||||
|
||||
@@ -4699,11 +4729,6 @@ emit_marshal_vtype_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
case MARSHAL_ACTION_CONV_IN:
|
||||
if (klass == date_time_class) {
|
||||
/* Convert it to an OLE DATE type */
|
||||
static MonoMethod *to_oadate;
|
||||
|
||||
if (!to_oadate)
|
||||
to_oadate = get_method_nofail (date_time_class, "ToOADate", 0, 0);
|
||||
g_assert (to_oadate);
|
||||
|
||||
conv_arg = mono_mb_add_local (mb, double_type);
|
||||
|
||||
@@ -4716,6 +4741,11 @@ emit_marshal_vtype_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
if (!t->byref)
|
||||
m->csig->params [argnum - m->csig->hasthis] = double_type;
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, to_oadate)
|
||||
to_oadate = get_method_nofail (date_time_class, "ToOADate", 0, 0);
|
||||
g_assert (to_oadate);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, to_oadate)
|
||||
|
||||
mono_mb_emit_ldarg_addr (mb, argnum);
|
||||
mono_mb_emit_managed_call (mb, to_oadate, NULL);
|
||||
mono_mb_emit_stloc (mb, conv_arg);
|
||||
@@ -4801,14 +4831,16 @@ emit_marshal_vtype_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
case MARSHAL_ACTION_CONV_OUT:
|
||||
if (klass == date_time_class) {
|
||||
/* Convert from an OLE DATE type */
|
||||
static MonoMethod *from_oadate;
|
||||
|
||||
if (!t->byref)
|
||||
break;
|
||||
|
||||
if (!((t->attrs & PARAM_ATTRIBUTE_IN) && !(t->attrs & PARAM_ATTRIBUTE_OUT))) {
|
||||
if (!from_oadate)
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, from_oadate)
|
||||
from_oadate = get_method_nofail (date_time_class, "FromOADate", 1, 0);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, from_oadate)
|
||||
|
||||
g_assert (from_oadate);
|
||||
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
@@ -5003,10 +5035,6 @@ emit_marshal_string_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
}
|
||||
|
||||
if (encoding == MONO_NATIVE_VBBYREFSTR) {
|
||||
static MonoMethod *m;
|
||||
|
||||
if (!m)
|
||||
m = get_method_nofail (mono_defaults.string_class, "get_Length", -1, 0);
|
||||
|
||||
if (!t->byref) {
|
||||
char *msg = g_strdup ("VBByRefStr marshalling requires a ref parameter.");
|
||||
@@ -5014,6 +5042,12 @@ emit_marshal_string_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
break;
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, m)
|
||||
|
||||
m = get_method_nofail (mono_defaults.string_class, "get_Length", -1, 0);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, m)
|
||||
|
||||
/*
|
||||
* Have to allocate a new string with the same length as the original, and
|
||||
* copy the contents of the buffer pointed to by CONV_ARG into it.
|
||||
@@ -5891,7 +5925,6 @@ emit_marshal_object_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
return conv_arg;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
MonoMarshalSpec *spec,
|
||||
@@ -5900,20 +5933,10 @@ emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
{
|
||||
#ifndef DISABLE_COM
|
||||
MonoMethodBuilder *mb = m->mb;
|
||||
static MonoMethod *get_object_for_native_variant = NULL;
|
||||
static MonoMethod *get_native_variant_for_object = NULL;
|
||||
MonoType *variant_type = m_class_get_byval_arg (mono_class_get_variant_class ());
|
||||
MonoType *variant_type_byref = m_class_get_this_arg (mono_class_get_variant_class ());
|
||||
MonoType *object_type = mono_get_object_type ();
|
||||
|
||||
if (!get_object_for_native_variant)
|
||||
get_object_for_native_variant = get_method_nofail (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1, 0);
|
||||
g_assert (get_object_for_native_variant);
|
||||
|
||||
if (!get_native_variant_for_object)
|
||||
get_native_variant_for_object = get_method_nofail (mono_defaults.marshal_class, "GetNativeVariantForObject", 2, 0);
|
||||
g_assert (get_native_variant_for_object);
|
||||
|
||||
switch (action) {
|
||||
case MARSHAL_ACTION_CONV_IN: {
|
||||
conv_arg = mono_mb_add_local (mb, variant_type);
|
||||
@@ -5930,27 +5953,20 @@ emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
if (t->byref)
|
||||
mono_mb_emit_byte(mb, CEE_LDIND_REF);
|
||||
mono_mb_emit_ldloc_addr (mb, conv_arg);
|
||||
mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetNativeVariantForObject (), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
case MARSHAL_ACTION_CONV_OUT: {
|
||||
static MonoMethod *variant_clear = NULL;
|
||||
|
||||
if (!variant_clear)
|
||||
variant_clear = get_method_nofail (mono_class_get_variant_class (), "Clear", 0, 0);
|
||||
g_assert (variant_clear);
|
||||
|
||||
|
||||
if (t->byref && (t->attrs & PARAM_ATTRIBUTE_OUT || !(t->attrs & PARAM_ATTRIBUTE_IN))) {
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
mono_mb_emit_ldloc_addr (mb, conv_arg);
|
||||
mono_mb_emit_managed_call (mb, get_object_for_native_variant, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetObjectForNativeVariant (), NULL);
|
||||
mono_mb_emit_byte (mb, CEE_STIND_REF);
|
||||
}
|
||||
|
||||
mono_mb_emit_ldloc_addr (mb, conv_arg);
|
||||
mono_mb_emit_managed_call (mb, variant_clear, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Variant_Clear (), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5982,7 +5998,7 @@ emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
else
|
||||
mono_mb_emit_ldarg_addr (mb, argnum);
|
||||
mono_mb_emit_managed_call (mb, get_object_for_native_variant, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetObjectForNativeVariant (), NULL);
|
||||
mono_mb_emit_stloc (mb, conv_arg);
|
||||
break;
|
||||
}
|
||||
@@ -5991,7 +6007,7 @@ emit_marshal_variant_ilgen (EmitMarshalContext *m, int argnum, MonoType *t,
|
||||
if (t->byref && (t->attrs & PARAM_ATTRIBUTE_OUT || !(t->attrs & PARAM_ATTRIBUTE_IN))) {
|
||||
mono_mb_emit_ldloc (mb, conv_arg);
|
||||
mono_mb_emit_ldarg (mb, argnum);
|
||||
mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
|
||||
mono_mb_emit_managed_call (mb, mono_get_Marshal_GetNativeVariantForObject (), NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
MonoObjectHandle
|
||||
mono_marshal_xdomain_copy_value_handle (MonoObjectHandle val, MonoError *error);
|
||||
|
||||
// On Windows platform implementation of bellow methods are hosted in separate source file
|
||||
// marshal-windows.c or marshal-windows-*.c. On other platforms the implementation is still keept
|
||||
// in marshal.c still declared as static and in some places even inlined.
|
||||
#ifdef HOST_WIN32
|
||||
void*
|
||||
mono_marshal_alloc_co_task_mem (size_t size);
|
||||
|
||||
@@ -26,16 +22,17 @@ mono_marshal_free_co_task_mem (void *ptr);
|
||||
gpointer
|
||||
mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size);
|
||||
|
||||
void*
|
||||
mono_marshal_alloc_hglobal (size_t size, MonoError *error);
|
||||
void
|
||||
mono_marshal_free_hglobal (void *ptr);
|
||||
|
||||
gpointer
|
||||
mono_marshal_realloc_hglobal (gpointer ptr, size_t size);
|
||||
|
||||
void
|
||||
mono_marshal_free_hglobal (void *ptr);
|
||||
void*
|
||||
mono_marshal_alloc_hglobal (size_t size);
|
||||
|
||||
#endif // HOST_WIN32
|
||||
void*
|
||||
mono_marshal_alloc_hglobal_error (gsize size, MonoError*);
|
||||
|
||||
typedef enum {
|
||||
TYPECHECK_OBJECT_ARG_POS = 0,
|
||||
|
||||
@@ -10,16 +10,14 @@
|
||||
#include "mono/utils/mono-compiler.h"
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
|
||||
#include <windows.h>
|
||||
#include "mono/metadata/marshal-windows-internals.h"
|
||||
|
||||
void *
|
||||
mono_marshal_alloc_hglobal (size_t size, MonoError *error)
|
||||
mono_marshal_alloc_hglobal (size_t size)
|
||||
{
|
||||
void* p = HeapAlloc (GetProcessHeap (), 0, size);
|
||||
if (!p)
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return p;
|
||||
return HeapAlloc (GetProcessHeap (), 0, size);
|
||||
}
|
||||
|
||||
gpointer
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <glib.h>
|
||||
|
||||
#if defined(HOST_WIN32)
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <objbase.h>
|
||||
@@ -16,13 +17,11 @@
|
||||
#include "icall-decl.h"
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
|
||||
void*
|
||||
mono_marshal_alloc_hglobal (size_t size, MonoError *error)
|
||||
mono_marshal_alloc_hglobal (size_t size)
|
||||
{
|
||||
void* p = GlobalAlloc (GMEM_FIXED, size);
|
||||
if (!p)
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return p;
|
||||
return GlobalAlloc (GMEM_FIXED, size);
|
||||
}
|
||||
|
||||
gpointer
|
||||
@@ -36,6 +35,7 @@ mono_marshal_free_hglobal (gpointer ptr)
|
||||
{
|
||||
GlobalFree (ptr);
|
||||
}
|
||||
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
void*
|
||||
@@ -57,30 +57,34 @@ mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size)
|
||||
}
|
||||
|
||||
char*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length, MonoError *error);
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length);
|
||||
|
||||
char*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length)
|
||||
{
|
||||
g_assert_not_netcore ();
|
||||
|
||||
// FIXME pass mono_utf16_to_utf8 an allocator to avoid double alloc/copy.
|
||||
|
||||
ERROR_DECL (error);
|
||||
size_t len = 0;
|
||||
char* ret = NULL;
|
||||
char* tres = mono_utf16_to_utf8 (s, length, error);
|
||||
return_val_if_nok (error, NULL);
|
||||
if (!tres)
|
||||
return tres;
|
||||
if (!tres || !is_ok (error))
|
||||
goto exit;
|
||||
|
||||
/*
|
||||
* mono_utf16_to_utf8() returns a memory area at least as large as length,
|
||||
* even if it contains NULL characters. The copy we allocate here has to be equally
|
||||
* large.
|
||||
*/
|
||||
size_t len = MAX (strlen (tres) + 1, length);
|
||||
char* ret = (char*)ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (len, error);
|
||||
len = MAX (strlen (tres) + 1, length);
|
||||
ret = (char*)mono_marshal_alloc_hglobal_error (len, error);
|
||||
if (ret)
|
||||
memcpy (ret, tres, len);
|
||||
exit:
|
||||
g_free (tres);
|
||||
mono_error_set_pending_exception (error);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+99
-60
@@ -4245,7 +4245,6 @@ MonoMethod *
|
||||
mono_marshal_get_struct_to_ptr (MonoClass *klass)
|
||||
{
|
||||
MonoMethodBuilder *mb;
|
||||
static MonoMethod *stoptr = NULL;
|
||||
MonoMethod *res;
|
||||
WrapperInfo *info;
|
||||
|
||||
@@ -4254,14 +4253,18 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
|
||||
mono_marshal_load_type_info (klass);
|
||||
|
||||
MonoMarshalType *marshal_info = mono_class_get_marshal_info (klass);
|
||||
if (marshal_info->str_to_ptr)
|
||||
return marshal_info->str_to_ptr;
|
||||
|
||||
if (!stoptr) {
|
||||
if ((res = marshal_info->str_to_ptr))
|
||||
return res;
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, stoptr)
|
||||
|
||||
ERROR_DECL (error);
|
||||
stoptr = mono_class_get_method_from_name_checked (mono_defaults.marshal_class, "StructureToPtr", 3, 0, error);
|
||||
mono_error_assert_ok (error);
|
||||
}
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, stoptr)
|
||||
|
||||
g_assert (stoptr);
|
||||
|
||||
mb = mono_mb_new (klass, stoptr->name, MONO_WRAPPER_OTHER);
|
||||
@@ -4403,7 +4406,6 @@ emit_synchronized_wrapper_noilgen (MonoMethodBuilder *mb, MonoMethod *method, Mo
|
||||
MonoMethod *
|
||||
mono_marshal_get_synchronized_wrapper (MonoMethod *method)
|
||||
{
|
||||
static MonoMethod *enter_method, *exit_method, *gettypefromhandle_method;
|
||||
MonoMethodSignature *sig;
|
||||
MonoMethodBuilder *mb;
|
||||
MonoMethod *res;
|
||||
@@ -4453,24 +4455,26 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
|
||||
|
||||
mono_marshal_lock ();
|
||||
|
||||
if (!enter_method) {
|
||||
MonoMethodDesc *desc;
|
||||
|
||||
desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, enter_method)
|
||||
MonoMethodDesc *desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
|
||||
enter_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
|
||||
g_assert (enter_method);
|
||||
mono_method_desc_free (desc);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, enter_method)
|
||||
|
||||
desc = mono_method_desc_new ("Monitor:Exit", FALSE);
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, exit_method)
|
||||
MonoMethodDesc *desc = mono_method_desc_new ("Monitor:Exit", FALSE);
|
||||
exit_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
|
||||
g_assert (exit_method);
|
||||
mono_method_desc_free (desc);
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, exit_method)
|
||||
|
||||
desc = mono_method_desc_new ("Type:GetTypeFromHandle", FALSE);
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, gettypefromhandle_method)
|
||||
MonoMethodDesc *desc = mono_method_desc_new ("Type:GetTypeFromHandle", FALSE);
|
||||
gettypefromhandle_method = mono_method_desc_search_in_class (desc, mono_defaults.systemtype_class);
|
||||
g_assert (gettypefromhandle_method);
|
||||
mono_method_desc_free (desc);
|
||||
}
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, gettypefromhandle_method)
|
||||
|
||||
mono_marshal_unlock ();
|
||||
|
||||
@@ -4700,16 +4704,13 @@ emit_stelemref_noilgen (MonoMethodBuilder *mb)
|
||||
MonoMethod*
|
||||
mono_marshal_get_stelemref (void)
|
||||
{
|
||||
static MonoMethod* ret = NULL;
|
||||
MonoMethodSignature *sig;
|
||||
MonoMethodBuilder *mb;
|
||||
WrapperInfo *info;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ret)
|
||||
|
||||
mb = mono_mb_new (mono_defaults.object_class, "stelemref", MONO_WRAPPER_STELEMREF);
|
||||
|
||||
|
||||
sig = mono_metadata_signature_alloc (mono_defaults.corlib, 3);
|
||||
|
||||
@@ -4730,6 +4731,8 @@ mono_marshal_get_stelemref (void)
|
||||
ret = mono_mb_create (mb, sig, 4, info);
|
||||
mono_mb_free (mb);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ret)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4748,13 +4751,11 @@ mb_emit_byte_noilgen (MonoMethodBuilder *mb, guint8 op)
|
||||
MonoMethod*
|
||||
mono_marshal_get_gsharedvt_in_wrapper (void)
|
||||
{
|
||||
static MonoMethod* ret = NULL;
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ret)
|
||||
|
||||
MonoMethodSignature *sig;
|
||||
MonoMethodBuilder *mb;
|
||||
WrapperInfo *info;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mb = mono_mb_new (mono_defaults.object_class, "gsharedvt_in", MONO_WRAPPER_OTHER);
|
||||
|
||||
@@ -4770,6 +4771,8 @@ mono_marshal_get_gsharedvt_in_wrapper (void)
|
||||
ret = mono_mb_create (mb, sig, 4, info);
|
||||
mono_mb_free (mb);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ret)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4781,13 +4784,11 @@ mono_marshal_get_gsharedvt_in_wrapper (void)
|
||||
MonoMethod*
|
||||
mono_marshal_get_gsharedvt_out_wrapper (void)
|
||||
{
|
||||
static MonoMethod* ret = NULL;
|
||||
MONO_STATIC_POINTER_INIT (MonoMethod, ret)
|
||||
|
||||
MonoMethodSignature *sig;
|
||||
MonoMethodBuilder *mb;
|
||||
WrapperInfo *info;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mb = mono_mb_new (mono_defaults.object_class, "gsharedvt_out", MONO_WRAPPER_OTHER);
|
||||
|
||||
@@ -4803,6 +4804,8 @@ mono_marshal_get_gsharedvt_out_wrapper (void)
|
||||
ret = mono_mb_create (mb, sig, 4, info);
|
||||
mono_mb_free (mb);
|
||||
|
||||
MONO_STATIC_POINTER_INIT_END (MonoMethod, ret)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4976,7 +4979,8 @@ mono_marshal_get_array_accessor_wrapper (MonoMethod *method)
|
||||
}
|
||||
|
||||
#ifndef HOST_WIN32
|
||||
static void*
|
||||
|
||||
void*
|
||||
mono_marshal_alloc_co_task_mem (size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
@@ -4998,6 +5002,7 @@ mono_marshal_alloc (gsize size, MonoError *error)
|
||||
error_init (error);
|
||||
|
||||
res = mono_marshal_alloc_co_task_mem (size);
|
||||
|
||||
if (!res)
|
||||
mono_error_set_out_of_memory (error, "Could not allocate %" G_GSIZE_FORMAT " bytes", size);
|
||||
|
||||
@@ -5012,11 +5017,13 @@ ves_icall_marshal_alloc_impl (gsize size, MonoError *error)
|
||||
}
|
||||
|
||||
#ifndef HOST_WIN32
|
||||
static void
|
||||
|
||||
void
|
||||
mono_marshal_free_co_task_mem (void *ptr)
|
||||
{
|
||||
g_free (ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -5469,43 +5476,51 @@ ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf (MonoReflectionTypeHan
|
||||
#ifndef HOST_WIN32
|
||||
|
||||
char*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length, MonoError *error);
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *utf16, int length);
|
||||
|
||||
char*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *utf16, int length)
|
||||
{
|
||||
g_assert_not_netcore ();
|
||||
|
||||
return mono_utf16_to_utf8 (s, length, error);
|
||||
ERROR_DECL (error);
|
||||
|
||||
char * const utf8 = mono_utf16_to_utf8 (utf16, length, error);
|
||||
|
||||
mono_error_set_pending_exception (error);
|
||||
|
||||
return utf8;
|
||||
}
|
||||
|
||||
static void *
|
||||
mono_marshal_alloc_hglobal (size_t size, MonoError *error)
|
||||
void *
|
||||
mono_marshal_alloc_hglobal (size_t size)
|
||||
{
|
||||
void* p = g_try_malloc (size);
|
||||
if (!p)
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return p;
|
||||
return g_try_malloc (size);
|
||||
}
|
||||
|
||||
#endif /* !HOST_WIN32 */
|
||||
|
||||
gunichar2*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2 *s, int length, MonoError *error);
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2 *s, int length);
|
||||
|
||||
gunichar2*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2 *s, int length, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2 *s, int length)
|
||||
{
|
||||
g_assert_not_netcore ();
|
||||
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
ERROR_DECL (error);
|
||||
|
||||
gsize const len = ((gsize)length + 1) * 2;
|
||||
gunichar2 *res = (gunichar2*)mono_marshal_alloc_hglobal (len, error);
|
||||
gunichar2 *res = (gunichar2*)mono_marshal_alloc_hglobal_error (len, error);
|
||||
if (res) {
|
||||
memcpy (res, s, length * 2);
|
||||
res [length] = 0;
|
||||
}
|
||||
|
||||
mono_error_set_pending_exception (error);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -5587,45 +5602,59 @@ ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure (gpointer src,
|
||||
}
|
||||
|
||||
void*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (gsize size, MonoError *error)
|
||||
mono_marshal_alloc_hglobal_error (gsize size, MonoError *error)
|
||||
{
|
||||
if (size == 0)
|
||||
/* This returns a valid pointer for size 0 on MS.NET */
|
||||
size = 4;
|
||||
|
||||
return mono_marshal_alloc_hglobal (size, error);
|
||||
void* p = mono_marshal_alloc_hglobal (size);
|
||||
if (!p)
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return p;
|
||||
}
|
||||
|
||||
void*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (gsize size)
|
||||
{
|
||||
ERROR_DECL (error);
|
||||
void* result = mono_marshal_alloc_hglobal_error (size, error);
|
||||
mono_error_set_pending_exception (error);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef HOST_WIN32
|
||||
static gpointer
|
||||
|
||||
gpointer
|
||||
mono_marshal_realloc_hglobal (gpointer ptr, size_t size)
|
||||
{
|
||||
return g_try_realloc (ptr, size);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
gpointer
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal (gpointer ptr, gsize size, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal (gpointer ptr, gsize size)
|
||||
{
|
||||
if (ptr == NULL) {
|
||||
gpointer res = ptr ? mono_marshal_realloc_hglobal (ptr, size) : NULL;
|
||||
|
||||
if (!res) {
|
||||
ERROR_DECL (error);
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return NULL;
|
||||
mono_error_set_pending_exception (error);
|
||||
}
|
||||
|
||||
gpointer const res = mono_marshal_realloc_hglobal (ptr, size);
|
||||
|
||||
if (!res)
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef HOST_WIN32
|
||||
static void
|
||||
|
||||
void
|
||||
mono_marshal_free_hglobal (gpointer ptr)
|
||||
{
|
||||
g_free (ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
@@ -5635,28 +5664,34 @@ ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal (void *ptr)
|
||||
}
|
||||
|
||||
void*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem (int size, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem (int size)
|
||||
{
|
||||
void *res = mono_marshal_alloc_co_task_mem (size);
|
||||
|
||||
if (!res)
|
||||
if (!res) {
|
||||
ERROR_DECL (error);
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
mono_error_set_pending_exception (error);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize size, MonoError *error);
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize size);
|
||||
|
||||
void*
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize size, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize size)
|
||||
{
|
||||
g_assert_not_netcore ();
|
||||
|
||||
void *res = mono_marshal_alloc_co_task_mem (size);
|
||||
|
||||
if (!res)
|
||||
if (!res) {
|
||||
ERROR_DECL (error);
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
mono_error_set_pending_exception (error);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -5668,7 +5703,8 @@ ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem (void *ptr)
|
||||
}
|
||||
|
||||
#ifndef HOST_WIN32
|
||||
static gpointer
|
||||
|
||||
gpointer
|
||||
mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size)
|
||||
{
|
||||
return g_try_realloc (ptr, size);
|
||||
@@ -5676,14 +5712,16 @@ mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size)
|
||||
#endif
|
||||
|
||||
gpointer
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer ptr, int size, MonoError *error)
|
||||
ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer ptr, int size)
|
||||
{
|
||||
void *res = mono_marshal_realloc_co_task_mem (ptr, size);
|
||||
|
||||
if (!res) {
|
||||
ERROR_DECL (error);
|
||||
mono_error_set_out_of_memory (error, "");
|
||||
return NULL;
|
||||
mono_error_set_pending_exception (error);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -5901,6 +5939,7 @@ mono_marshal_load_type_info (MonoClass* klass)
|
||||
++class_marshal_info_count;
|
||||
info2 = info;
|
||||
}
|
||||
|
||||
mono_marshal_unlock ();
|
||||
|
||||
return info2;
|
||||
|
||||
Loaded 100 of 201 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user