diff options
102 files changed, 1727 insertions, 545 deletions
diff --git a/mcs/.gitignore b/mcs/.gitignore index ee0bcdccdd8..cee481c8137 100644 --- a/mcs/.gitignore +++ b/mcs/.gitignore @@ -3,8 +3,8 @@ *.dll *.pidb *.userprefs -*_test_*.dll.config -*_test_*.xml +*_test.dll.config +*_test.xml *.o *.resources TestResult-*.log diff --git a/mcs/build/config-default.make b/mcs/build/config-default.make index 124bb2a3f81..8dcbbdc628d 100644 --- a/mcs/build/config-default.make +++ b/mcs/build/config-default.make @@ -23,7 +23,7 @@ mono_libdir = $(exec_prefix)/lib sysconfdir = $(prefix)/etc #RUNTIME = mono RUNTIME = false -TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug +TEST_RUNTIME = MONO_PATH="./:$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug # In case you want to add MCS_FLAGS, this lets you not have to # keep track of the default value diff --git a/mcs/build/gensources.sh b/mcs/build/gensources.sh index db7bf638bed..2eb4995bdd8 100644 --- a/mcs/build/gensources.sh +++ b/mcs/build/gensources.sh @@ -54,10 +54,22 @@ if test -n "$extexcfile"; then fi if test -f $outfile.exc; then + # So what we're doing below with uniq -u is that we take + # lines that have not been duplicated. This computes the + # symmetric difference between the files. This is not + # what we want. If a file is in the excludes but not in + # the sources, we want that file not to show up. By duplicating the + # excludes, we ensure that we won't end up in this failure state. sort -u $outfile.exc > $outfile.exc_s - rm -f $outfile.exc - sort -m $outfile.inc_s $outfile.exc_s | uniq -u > $outfile - rm -f $outfile.inc_s $outfile.exc_s + + # Duplicate excludes + cat $outfile.exc_s >> $outfile.exc_s_dup + cat $outfile.exc_s >> $outfile.exc_s_dup + + rm -f $outfile.exc $outfile.exc_s + + cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile + rm -f $outfile.inc_s $outfile.exc_s_dup else mv $outfile.inc_s $outfile fi diff --git a/mcs/build/library.make b/mcs/build/library.make index c9c01246717..5954ba2e316 100644 --- a/mcs/build/library.make +++ b/mcs/build/library.make @@ -295,17 +295,13 @@ library_CLEAN_FILES += $(PROFILE)_aot.log ifdef PLATFORM_AOT_SUFFIX Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";) -$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib) - $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(the_lib) -endif - -ifdef ENABLE_AOT -ifneq (,$(filter $(AOT_IN_PROFILES), $(PROFILE))) -all-local: $(the_lib)$(PLATFORM_AOT_SUFFIX) +$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib) + $(Q_AOT) MONO_PATH='$(the_libdir_base)' > $(PROFILE)_$(LIBRARY_NAME)_aot.log 2>&1 $(RUNTIME) $(AOT_BUILD_FLAGS) --debug $(the_lib) +all-local-aot: $(the_lib)$(PLATFORM_AOT_SUFFIX) endif -endif + makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY_SUBDIR)_$(LIBRARY).makefrag library_CLEAN_FILES += $(makefrag) diff --git a/mcs/build/profiles/mobile_static.make b/mcs/build/profiles/mobile_static.make index 86d5a747949..f68e07be883 100644 --- a/mcs/build/profiles/mobile_static.make +++ b/mcs/build/profiles/mobile_static.make @@ -39,3 +39,22 @@ NUNIT_LITE = yes NO_INSTALL = yes MOBILE_STATIC = yes MOBILE_PROFILE = yes +NO_VTS_TEST = yes + +# Note need for trailing comma. If you add, keep it +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking, + +ifndef MONO_DISABLE_GSHAREDVT +GSHAREDVT_FLAG = -O=gsharedvt +endif + +ifeq ($(MONO_LLVMONLY),TRUE) +AOT_BUILD_FLAGS_PREFIX = --aot=llvmonly, +AOT_RUN_FLAGS = --llvmonly +else +AOT_BUILD_FLAGS_PREFIX = $(GSHAREDVT_FLAG) --aot=full, +AOT_RUN_FLAGS = --full-aot +endif + +ALWAYS_AOT = yes + diff --git a/mcs/build/rules.make b/mcs/build/rules.make index 88170948f67..7ff27755ec1 100644 --- a/mcs/build/rules.make +++ b/mcs/build/rules.make @@ -75,6 +75,7 @@ default: all include $(topdir)/build/config-default.make -include $(topdir)/build/pre-config.make +-include $(topdir)/build/config.make # Default PLATFORM and PROFILE if they're not already defined. @@ -112,7 +113,6 @@ PROFILE = $(DEFAULT_PROFILE) endif include $(topdir)/build/profiles/$(PROFILE).make --include $(topdir)/build/config.make # If the profile is using nunit-lite, use it ifdef NUNIT_LITE @@ -122,14 +122,70 @@ endif # Make sure propagates export TEST_HARNESS +# If the profile is using nunit-lite, use it +ifdef NUNIT_LITE +TEST_HARNESS=$(topdir)/class/lib/$(PROFILE)/nunit-lite-console.exe +endif + +# Make sure propagates +export TEST_HARNESS + +# start aot config + +# We set the prefix of the aot build flags +# in the profile. This determines the aot type, +# whether it be llvmonly or full. To this we append the +# options which do not change between them, the INVARIANT_AOT_OPTIONS +ifndef AOT_BUILD_FLAGS_PREFIX +AOT_BUILD_FLAGS_PREFIX = --aot= +endif + +# Set the options for building and running AOT +# The trampoline numbers are provisional, they are what is required +# to run the corlib test suite. They should be considered a lower bound. +INVARIANT_AOT_OPTIONS=bind-to-runtime-version,nimt-trampolines=900,ntrampolines=8000 + +ifndef MONO_DISABLE_GSHAREDVT +INVARIANT_AOT_OPTIONS:=$(INVARIANT_AOT_OPTIONS),ngsharedvt-trampolines=900 +endif + +AOT_BUILD_FLAGS = $(AOT_BUILD_FLAGS_PREFIX)$(INVARIANT_AOT_OPTIONS) + +# end AOT config + ifdef BCL_OPTIMIZE PROFILE_MCS_FLAGS += -optimize endif +# Design: +# Problem: We want to be able to build aot +# assemblies as part of the build system. +# +# For this to be done safely, we really need two passes. This +# ensures that all of the .dlls are compiled before trying to +# aot them. Because we want this to be the +# default target for some profiles(mobile_static) we have a +# two-level build system. The do-all-aot target is what +# gets invoked at the top-level when someone tries to build with aot. +# It will invoke the do-all target, and will set TOP_LEVEL_DO for this +# recursive make call in order to prevent this recursive call from trying +# to build aot in each of the subdirs. After this is done, we will aot +# everything that our building produced by aoting everything in +# mcs/class/lib/$(PROFILE)/ +ifndef TOP_LEVEL_DO + +ifdef ALWAYS_AOT +TOP_LEVEL_DO = do-all-aot +else +TOP_LEVEL_DO = do-all +endif # ALWAYS_AOT + +endif # !TOP_LEVEL_DO + ifdef OVERRIDE_TARGET_ALL all: all.override else -all: do-all +all: $(TOP_LEVEL_DO) endif ifdef NO_INSTALL @@ -143,6 +199,19 @@ STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update $(STD_TARGETS): %: do-% +ifdef PLATFORM_AOT_SUFFIX +Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] AOT All Assemblies";) +LIST_ALL_PROFILE_ASSEMBLIES = find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml' +COMPILE_ALL_PROFILE_ASSEMBLIES = $(LIST_ALL_PROFILE_ASSEMBLIES) | MONO_PATH="./" xargs -I '{}' $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) '{}' + +do-all-aot: + $(MAKE) do-all TOP_LEVEL_DO=do-all + $(MAKE) aot-all-profile + +aot-all-profile: + $(Q_AOT) cd $(topdir)/class/lib/$(PROFILE)/ && $(COMPILE_ALL_PROFILE_ASSEMBLIES) &> $(PROFILE)-aot.log +endif + do-run-test: ok=:; $(MAKE) run-test-recursive || ok=false; $(MAKE) run-test-local || ok=false; $$ok diff --git a/mcs/build/tests.make b/mcs/build/tests.make index f44e0574c96..e8d52d00332 100644 --- a/mcs/build/tests.make +++ b/mcs/build/tests.make @@ -29,8 +29,15 @@ test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/%) test_nunit_ref = $(test_nunit_dep:%=-r:%) tests_CLEAN_FILES += TestResult*.xml -test_lib = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test_$(PROFILE).dll) +test_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources) + +ifeq ($(wildcard $(test_sourcefile)),) test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources) +endif + +test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll) +test_sourcefile_excludes = $(test_lib).excludes + test_pdb = $(test_lib:.dll=.pdb) test_response = $(depsdir)/$(test_lib).response test_makefrag = $(depsdir)/$(test_lib).makefrag @@ -41,7 +48,9 @@ ifndef HAVE_CS_TESTS HAVE_CS_TESTS := $(wildcard $(test_sourcefile)) endif -endif +HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes)) + +endif # !NO_TEST ifndef NO_TEST $(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp @@ -72,8 +81,18 @@ test-local: $(test_assemblies) run-test-local: run-test-lib run-test-ondotnet-local: run-test-ondotnet-lib -TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess -TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS +TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess +TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotDotNet,CAS + +ifdef NUNIT_LITE +NOSHADOW_FLAG = +NUNIT_XML_FLAG = -format:nunit2 -result: +OUTPUT_FILE_FLAG=-out +else +OUTPUT_FILE_FLAG=-output +NOSHADOW_FLAG = -noshadow +NUNIT_XML_FLAG = -xml= +endif ifdef NUNIT_LITE NOSHADOW_FLAG = @@ -105,10 +124,19 @@ ifdef TESTNAME TESTNAME_ARG = -run=MonoTests.$(TESTNAME) endif +ifdef ALWAYS_AOT +test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp + PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) $(test_assemblies) + +else +test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp + +endif # ALWAYS_AOT + ## FIXME: i18n problem in the 'sed' command below -run-test-lib: test-local +run-test-lib: test-local test-local-aot-compile ok=:; \ - PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) $(NUNIT_XML_FLAG)TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \ + PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) $(NUNIT_XML_FLAG)TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \ if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \ $(TEST_HARNESS_POSTPROC) ; $$ok @@ -133,9 +161,16 @@ ifdef HAVE_CS_TESTS $(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep) $(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response) -$(test_response): $(test_sourcefile) +test_response_preprocessed = $(test_response)_preprocessed + +# This handles .excludes/.sources pairs, as well as resolving the +# includes that occur in .sources files +$(test_response_preprocessed): $(test_sourcefile) + $(SHELL) $(topdir)/build/gensources.sh $@ '$(test_sourcefile)' '$(test_sourcefile_excludes)' + +$(test_response): $(test_response_preprocessed) # @echo Creating $@ ... - @sed -e '/^$$/d' -e 's,^,Test/,' $(test_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@ + @sed -e '/^$$/d' -e 's,^,Test/,' $(test_response_preprocessed) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@ $(test_makefrag): $(test_response) # @echo Creating $@ ... diff --git a/mcs/class/Facades/Makefile b/mcs/class/Facades/Makefile index 2f8847d707a..12f045eebd8 100644 --- a/mcs/class/Facades/Makefile +++ b/mcs/class/Facades/Makefile @@ -38,3 +38,6 @@ doc-update-recursive: @echo "do not recurse the Facades folder" System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Runtime.Serialization System.XML System.ComponentModel.Composition System.ServiceModel System.Xml.Linq: + +all-local-aot: + diff --git a/mcs/class/I18N/Makefile b/mcs/class/I18N/Makefile index d6fa41fe65b..b7d4788608e 100644 --- a/mcs/class/I18N/Makefile +++ b/mcs/class/I18N/Makefile @@ -12,6 +12,6 @@ DISTFILES = \ tools/ucm2cp.c \ tools/uni2tab.c -all-local install-local clean-local test-local run-test-local run-test-ondotnet-local uninstall-local doc-update-local csproj-local: +all-local install-local clean-local test-local run-test-local run-test-ondotnet-local uninstall-local doc-update-local csproj-local all-local-aot: dist-local: dist-default diff --git a/mcs/class/Makefile b/mcs/class/Makefile index a0dd126efac..60048068cf2 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -334,6 +334,8 @@ DISTFILES = \ all-local $(STD_TARGETS:=-local): @: +all-local-aot: + # Files needed to bootstrap C# compiler basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll monolite_files = $(basic_files:%=lib/monolite/%) diff --git a/mcs/class/System.Configuration/System.Configuration_test_net_4_x.dll.config b/mcs/class/System.Configuration/net_4_x_System.Configuration_test.dll.config index 6f31b34dcaa..6f31b34dcaa 120000 --- a/mcs/class/System.Configuration/System.Configuration_test_net_4_x.dll.config +++ b/mcs/class/System.Configuration/net_4_x_System.Configuration_test.dll.config diff --git a/mcs/class/System.Core/mobile_static_System.Core.dll.sources b/mcs/class/System.Core/mobile_static_System.Core.dll.sources index 7d32d44a88b..832b60883c7 100644 --- a/mcs/class/System.Core/mobile_static_System.Core.dll.sources +++ b/mcs/class/System.Core/mobile_static_System.Core.dll.sources @@ -1,2 +1,19 @@ #include common_System.Core.dll.sources #include interpreter_System.Core.dll.sources + +System.Security.Cryptography/AesCryptoServiceProvider.cs +System.Security.Cryptography/AesTransform.cs +System.Security.Cryptography/CngAlgorithm.cs +System.Security.Cryptography/CngAlgorithmGroup.cs +System.Security.Cryptography/MD5Cng.cs +System.Security.Cryptography/SHA1Cng.cs +System.Security.Cryptography/SHA256Cng.cs +System.Security.Cryptography/SHA256CryptoServiceProvider.cs +System.Security.Cryptography/SHA384Cng.cs +System.Security.Cryptography/SHA384CryptoServiceProvider.cs +System.Security.Cryptography/SHA512Cng.cs +System.Security.Cryptography/SHA512CryptoServiceProvider.cs + +../../../external/referencesource/System.Core/System/Security/Cryptography/AesManaged.cs +../../../external/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs +../../../external/referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs diff --git a/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes b/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes new file mode 100644 index 00000000000..f98bf051bef --- /dev/null +++ b/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes @@ -0,0 +1 @@ +System.IO.Pipes/PipeSecurityTest.cs diff --git a/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources b/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources new file mode 100644 index 00000000000..33e2a105847 --- /dev/null +++ b/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources @@ -0,0 +1 @@ +#include System.Core_test.dll.sources diff --git a/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes b/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes new file mode 100644 index 00000000000..0022a9e9f1b --- /dev/null +++ b/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes @@ -0,0 +1,18 @@ +System.Data.Odbc/OdbcCommandBuilderTest.cs +System.Data.Odbc/OdbcCommandTest.cs +System.Data.Odbc/OdbcConnectionStringBuilderTest.cs +System.Data.Odbc/OdbcConnectionTest.cs +System.Data.Odbc/OdbcDataAdapterTest.cs +System.Data.Odbc/OdbcDataReaderTest.cs +System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs +System.Data.Odbc/OdbcParameterCollectionTest.cs +System.Data.Odbc/OdbcParameterTest.cs +System.Data.Odbc/OdbcPermissionAttributeTest.cs +System.Data.Odbc/OdbcPermissionTest.cs +System.Data.OleDb/OleDbCommandTest.cs +System.Data.OleDb/OleDbConnectionTest.cs +System.Data.OleDb/OleDbDataAdapterTest.cs +System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs +System.Data.OleDb/OleDbParameterCollectionTest.cs +System.Data.OleDb/OleDbPermissionAttributeTest.cs +System.Data.OleDb/OleDbPermissionTest.cs diff --git a/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources b/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources new file mode 100644 index 00000000000..310b8c2fb3d --- /dev/null +++ b/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources @@ -0,0 +1 @@ +#include System.Data_test.dll.sources diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpResponseMessage.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpResponseMessage.cs index bf39da68917..25c9743fbc7 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/HttpResponseMessage.cs +++ b/mcs/class/System.Net.Http/System.Net.Http/HttpResponseMessage.cs @@ -66,7 +66,7 @@ namespace System.Net.Http public string ReasonPhrase { get { - return reasonPhrase ?? HttpListenerResponse.GetStatusDescription ((int) statusCode); + return reasonPhrase ?? HttpListenerResponseHelper.GetStatusDescription ((int) statusCode); } set { reasonPhrase = value; diff --git a/mcs/class/System.Web.DynamicData/Test/WebPages/web.config.4.x b/mcs/class/System.Web.DynamicData/Test/WebPages/web.config.4.x index 11c789d906b..79ce9adc67f 100644 --- a/mcs/class/System.Web.DynamicData/Test/WebPages/web.config.4.x +++ b/mcs/class/System.Web.DynamicData/Test/WebPages/web.config.4.x @@ -68,8 +68,8 @@ <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.DynamicData" assembly="System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add tagPrefix="test" namespace="MonoTests.DataSource" assembly="System.Web.DynamicData_test_net_4_x"/> - <add tagPrefix="test" namespace="MonoTests.Common" assembly="System.Web.DynamicData_test_net_4_x"/> + <add tagPrefix="test" namespace="MonoTests.DataSource" assembly="net_4_x_System.Web.DynamicData_test"/> + <add tagPrefix="test" namespace="MonoTests.Common" assembly="net_4_x_System.Web.DynamicData_test"/> </controls> </pages> <httpHandlers> diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs index c8bb51a7799..8dc9e38c43b 100644 --- a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs +++ b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs @@ -431,7 +431,7 @@ namespace MonoTests.System.Web.Script.Serialization public void TestDeserializeTypeResolver () { #if NET_4_6 - string expected = "{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+X, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"z\":8,\"ch\":\"v\",\"ch_null\":null,\"str\":\"vwF59g\",\"b\":253,\"sb\":-48,\"sh\":-32740,\"ush\":65511,\"i\":-234235453,\"ui\":4294733061,\"l\":-9223372036854775780,\"ul\":18446744073709551612,\"f\":NaN,\"f1\":-Infinity,\"f2\":Infinity,\"f3\":-3.40282347E+38,\"f4\":3.40282347E+38,\"d\":NaN,\"d1\":-Infinity,\"d2\":Infinity,\"d3\":-1.7976931348623157E+308,\"d4\":1.7976931348623157E+308,\"de\":-1,\"de1\":0,\"de2\":1,\"de3\":-79228162514264337593543950335,\"de4\":79228162514264337593543950335,\"g\":\"000000ea-0002-0162-0102-030405060708\",\"nb\":null,\"dbn\":null,\"uri\":\"http://kostat@mainsoft/adfasdf/asdfasdf.aspx/asda/ads?a=b&c=d\",\"hash\":{\"mykey\":{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}},\"point\":{\"__type\":\"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\",\"IsEmpty\":false,\"X\":150,\"Y\":150},\"MyEnum\":[1,10,345],\"MyEnum1\":[1,10,345],\"AA\":5,\"AA1\":[{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10},{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}],\"BB\":18446744073709551610,\"YY\":[{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10},{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, System.Web.Extensions_test_net_4_x, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}]}"; + string expected = "{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+X, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"z\":8,\"ch\":\"v\",\"ch_null\":null,\"str\":\"vwF59g\",\"b\":253,\"sb\":-48,\"sh\":-32740,\"ush\":65511,\"i\":-234235453,\"ui\":4294733061,\"l\":-9223372036854775780,\"ul\":18446744073709551612,\"f\":NaN,\"f1\":-Infinity,\"f2\":Infinity,\"f3\":-3.40282347E+38,\"f4\":3.40282347E+38,\"d\":NaN,\"d1\":-Infinity,\"d2\":Infinity,\"d3\":-1.7976931348623157E+308,\"d4\":1.7976931348623157E+308,\"de\":-1,\"de1\":0,\"de2\":1,\"de3\":-79228162514264337593543950335,\"de4\":79228162514264337593543950335,\"g\":\"000000ea-0002-0162-0102-030405060708\",\"nb\":null,\"dbn\":null,\"uri\":\"http://kostat@mainsoft/adfasdf/asdfasdf.aspx/asda/ads?a=b&c=d\",\"hash\":{\"mykey\":{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}},\"point\":{\"__type\":\"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\",\"IsEmpty\":false,\"X\":150,\"Y\":150},\"MyEnum\":[1,10,345],\"MyEnum1\":[1,10,345],\"AA\":5,\"AA1\":[{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10},{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}],\"BB\":18446744073709551610,\"YY\":[{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10},{\"__type\":\"MonoTests.System.Web.Script.Serialization.JavaScriptSerializerTest+Y, net_4_x_System.Web.Extensions_test, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\",\"BB\":10}]}"; #else #error "Unknown profile" #endif diff --git a/mcs/class/System.Web.Extensions/Test/resources/profile.config.4.x b/mcs/class/System.Web.Extensions/Test/resources/profile.config.4.x index 126cacca577..baa65c84cbf 100644 --- a/mcs/class/System.Web.Extensions/Test/resources/profile.config.4.x +++ b/mcs/class/System.Web.Extensions/Test/resources/profile.config.4.x @@ -3,6 +3,6 @@ <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> - <add tagPrefix="t" namespace="MonoTests.System.Web.UI.WebControls" assembly="System.Web.Extensions_test_net_4_x"/> + <add tagPrefix="t" namespace="MonoTests.System.Web.UI.WebControls" assembly="net_4_x_System.Web.Extensions_test"/> </controls> </pages> diff --git a/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes new file mode 100644 index 00000000000..645326dff9a --- /dev/null +++ b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes @@ -0,0 +1,8 @@ +System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs +System.Web.Services/Test/System.Web.Services.Configuration/XmlFormatExtensionAttributeTest.cs diff --git a/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources new file mode 100644 index 00000000000..915ba6cbbec --- /dev/null +++ b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources @@ -0,0 +1 @@ +#include System.Web.Services_test.dll.sources diff --git a/mcs/class/System.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.Web/Assembly/AssemblyInfo.cs index 67619f02097..72eb774c611 100644 --- a/mcs/class/System.Web/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.Web/Assembly/AssemblyInfo.cs @@ -85,7 +85,7 @@ using System.Web.UI; #endif [assembly: InternalsVisibleTo ("SystemWebTestShim, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] -[assembly: InternalsVisibleTo ("System.Web_test_net_4_x, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo ("net_4_x_System.Web_test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] // Resources [assembly: WebResource ("TreeView_noexpand.gif", "image/gif")] diff --git a/mcs/class/System.Web/Documentation/en/index.xml b/mcs/class/System.Web/Documentation/en/index.xml index 9990989b927..610e3c3c1cf 100644 --- a/mcs/class/System.Web/Documentation/en/index.xml +++ b/mcs/class/System.Web/Documentation/en/index.xml @@ -135,7 +135,7 @@ <AttributeName>System.Web.UI.WebResource("TreeView_noexpand.gif", "image/gif")</AttributeName> </Attribute> <Attribute> - <AttributeName>System.Runtime.CompilerServices.InternalsVisibleTo("System.Web_test_net_2_0, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")</AttributeName> + <AttributeName>System.Runtime.CompilerServices.InternalsVisibleTo("net_4_x_System.Web_test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")</AttributeName> </Attribute> <Attribute> <AttributeName>System.Runtime.CompilerServices.InternalsVisibleTo("System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")</AttributeName> diff --git a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs index 604b418f5e2..9c36368ba7d 100644 --- a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs @@ -135,8 +135,8 @@ namespace MonoTests.System.Web.Caching #else static readonly byte[] memoryResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4D,0x65,0x6D,0x6F,0x72,0x79,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x2,0x0,0x0,0x0,0x17,0x3C,0x42,0x75,0x66,0x66,0x65,0x72,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x17,0x3C,0x4C,0x65,0x6E,0x67,0x74,0x68,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x7,0x0,0x2,0x9,0x2,0x0,0x0,0x0,0x9,0x3,0x0,0x0,0x0,0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF,0x3,0x0,0x0,0x0,0xC,0x0,0x0,0x0,0x2,0x45,0x6E,0x63,0x6F,0x64,0x65,0x64,0x20,0x64,0x61,0x74,0x61,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; static readonly byte[] fileResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x26,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x46,0x69,0x6C,0x65,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x17,0x3C,0x4C,0x65,0x6E,0x67,0x74,0x68,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x17,0x3C,0x4F,0x66,0x66,0x73,0x65,0x74,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x15,0x3C,0x50,0x61,0x74,0x68,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x0,0x0,0x1,0x9,0x9,0x2,0x0,0x0,0x0,0xD2,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x11,0x2F,0x70,0x61,0x74,0x68,0x2F,0x74,0x6F,0x2F,0x66,0x69,0x6C,0x65,0x2E,0x74,0x78,0x74,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; - static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x3,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x78,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x78,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x7,0x0,0x0,0x0,0x4,0x4E,0x61,0x6D,0x65,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0x32,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0x4,0x0,0x0,0x0,0x9,0xA,0x0,0x0,0x0,0x9,0xB,0x0,0x0,0x0,0x6,0xF,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x6,0x10,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; - static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x3,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x78,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x78,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x78,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x7,0x0,0x0,0x0,0x4,0x4E,0x61,0x6D,0x65,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0x32,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0x4,0x0,0x0,0x0,0x9,0xD,0x0,0x0,0x0,0x9,0xE,0x0,0x0,0x0,0x6,0x12,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x6,0x13,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; + static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x3,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x6e,0x65,0x74,0x5f,0x34,0x5f,0x78,0x5f,0x53,0x79,0x73,0x74,0x65,0x6d,0x2e,0x57,0x65,0x62,0x5f,0x74,0x65,0x73,0x74,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x6e,0x65,0x74,0x5f,0x34,0x5f,0x78,0x5f,0x53,0x79,0x73,0x74,0x65,0x6d,0x2e,0x57,0x65,0x62,0x5f,0x74,0x65,0x73,0x74,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x7,0x0,0x0,0x0,0x4,0x4E,0x61,0x6D,0x65,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0x32,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0x4,0x0,0x0,0x0,0x9,0xA,0x0,0x0,0x0,0x9,0xB,0x0,0x0,0x0,0x6,0xF,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x6,0x10,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; + static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x3,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x6e,0x65,0x74,0x5f,0x34,0x5f,0x78,0x5f,0x53,0x79,0x73,0x74,0x65,0x6d,0x2e,0x57,0x65,0x62,0x5f,0x74,0x65,0x73,0x74,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x5A,0x6e,0x65,0x74,0x5f,0x34,0x5f,0x78,0x5f,0x53,0x79,0x73,0x74,0x65,0x6d,0x2e,0x57,0x65,0x62,0x5f,0x74,0x65,0x73,0x74,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x6e,0x65,0x74,0x5f,0x34,0x5f,0x78,0x5f,0x53,0x79,0x73,0x74,0x65,0x6d,0x2e,0x57,0x65,0x62,0x5f,0x74,0x65,0x73,0x74,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x7,0x0,0x0,0x0,0x4,0x4E,0x61,0x6D,0x65,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0x32,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0x4,0x0,0x0,0x0,0x9,0xD,0x0,0x0,0x0,0x9,0xE,0x0,0x0,0x0,0x6,0x12,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x6,0x13,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; #endif static readonly object[] serializeObjects = { diff --git a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs index a0241b7a65c..868d0115acd 100644 --- a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs +++ b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs @@ -39,7 +39,7 @@ using System.Threading; namespace MonoTests.System.Web { [TestFixture] - [Ignore ("adapters.browser depends on System.Web_test_net_2_0.dll")] + [Ignore ("adapters.browser depends on net_4_x_System.Web_test.dll")] public class AppBrowsersTest { [TestFixtureSetUp] diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config index 069cb11642b..fab29b2d0c5 100755 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config @@ -10,7 +10,7 @@ <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> - <section name="CustomTags" restartOnExternalChanges="false" type="MonoTests.SystemWeb.Framework.CustomSection, System.Web_test_net_2_0" /> + <section name="CustomTags" restartOnExternalChanges="false" type="MonoTests.SystemWeb.Framework.CustomSection, net_4_x_System.Web_test" /> </sectionGroup> </configSections> <appSettings> diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 index db81e2e19de..14b2f4d2d85 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> - <section name="CustomTags" restartOnExternalChanges="false" type="MonoTests.SystemWeb.Framework.CustomSection, System.Web_test_net_4_0" /> + <section name="CustomTags" restartOnExternalChanges="false" type="MonoTests.SystemWeb.Framework.CustomSection, net_4_x_System.Web_test" /> </configSections> <appSettings> <add key="strvalue" value="str" /> diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/adapters.browser b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/adapters.browser index e289c1b993d..120365147c8 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/adapters.browser +++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/adapters.browser @@ -7,10 +7,10 @@ <capture> <userAgent match="^(?'refuacapturename'.*)$" /> </capture> - <controlAdapters markupTextWriterType="MonoTests.System.Web.CustomHtmlTextWriter, System.Web_test_net_2_0"> + <controlAdapters markupTextWriterType="MonoTests.System.Web.CustomHtmlTextWriter, net_4_x_System.Web_test"> <adapter - controlType="MonoTests.System.Web.UI.Customadaptercontrol, System.Web_test_net_2_0" - adapterType="MonoTests.System.Web.UI.Customadapter, System.Web_test_net_2_0" + controlType="MonoTests.System.Web.UI.Customadaptercontrol, net_4_x_System.Web_test" + adapterType="MonoTests.System.Web.UI.Customadapter, net_4_x_System.Web_test" /> </controlAdapters> <capabilities> diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs index aded011e986..f70bd99464b 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs @@ -646,8 +646,15 @@ namespace System.Xml.Serialization { if (memberValue == null) return null; Type type = memberValue.GetType(); - foreach (XmlTypeMapElementInfo elem in _itemInfo) - if (elem.TypeData.Type == type) return elem; + XmlTypeMapElementInfo bestMatch = null; + foreach (XmlTypeMapElementInfo elem in _itemInfo) { + if (elem.TypeData.Type == type) + return elem; + if (elem.TypeData.Type.IsAssignableFrom (type) && + (bestMatch == null || elem.TypeData.Type.IsAssignableFrom (bestMatch.TypeData.Type))) + bestMatch = elem; + } + return bestMatch; } return null; } diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs index 597acd1df54..116bbe323ad 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs @@ -711,6 +711,13 @@ namespace MonoTests.System.Xml.TestClasses public object data; } + public class SubclassTestList + { + [XmlElement ("a", typeof (SimpleClass))] + [XmlElement ("b", typeof (SubclassTestBase))] + public List<object> Items; + } + public class DictionaryWithIndexer : DictionaryBase { public TimeSpan this[int index] diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs index 4e51eceae03..bdd08aa7c69 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs @@ -1939,6 +1939,17 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (Infoset (res), WriterText); } + [Test] // Covers #36829 + public void TestSubclassElementList () + { + var o = new SubclassTestList () { Items = new List<object> () { new SubclassTestSub () } }; + Serialize (o); + + string res = "<SubclassTestList xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>"; + res += "<b xsi:type=\"SubclassTestSub\"/></SubclassTestList>"; + Assert.AreEqual (Infoset (res), WriterText); + } + [Test] [ExpectedException (typeof (InvalidOperationException))] public void TestArrayAttributeWithWrongDataType () diff --git a/mcs/class/System.Xaml/Test/System.Xaml/XamlObjectWriterTest.cs b/mcs/class/System.Xaml/Test/System.Xaml/XamlObjectWriterTest.cs index 73dcf6f927d..1aadbebcbb4 100755 --- a/mcs/class/System.Xaml/Test/System.Xaml/XamlObjectWriterTest.cs +++ b/mcs/class/System.Xaml/Test/System.Xaml/XamlObjectWriterTest.cs @@ -719,7 +719,7 @@ namespace MonoTests.System.Xaml XamlServices.Transform (new XamlObjectReader (obj), xxw); Console.Error.WriteLine (sw); */ - var xml = "<TestClass3 xmlns='clr-namespace:MonoTests.System.Xaml;assembly=System.Xaml_test_net_4_0' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'><TestClass3.Nested><TestClass3 Nested='{x:Null}' /></TestClass3.Nested></TestClass3>".Replace ("net_4_0", ver); + var xml = "<TestClass3 xmlns='clr-namespace:MonoTests.System.Xaml;assembly=System.Xaml_test_net_4_0' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'><TestClass3.Nested><TestClass3 Nested='{x:Null}' /></TestClass3.Nested></TestClass3>".Replace ("System.Xaml_test_net_4_0", ver + "_System.Xaml_test"); var settings = new XamlObjectWriterSettings (); bool invoked = false; settings.XamlSetValueHandler = (sender, e) => { @@ -835,7 +835,7 @@ namespace MonoTests.System.Xaml XamlReader GetReader (string filename) { const string ver = "net_4_x"; - string xml = File.ReadAllText (Path.Combine ("Test/XmlFiles", filename)).Replace ("net_4_0", ver); + string xml = File.ReadAllText (Path.Combine ("Test/XmlFiles", filename)).Replace ("System.Xaml_test_net_4_0", ver + "_System.Xaml_test"); return new XamlXmlReader (XmlReader.Create (new StringReader (xml))); } diff --git a/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlReaderTest.cs b/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlReaderTest.cs index 70b26b87c5a..85a4a59e286 100755 --- a/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlReaderTest.cs +++ b/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlReaderTest.cs @@ -46,7 +46,7 @@ namespace MonoTests.System.Xaml XamlReader GetReader (string filename) { const string ver = "net_4_x"; - string xml = File.ReadAllText (Path.Combine ("Test/XmlFiles", filename)).Replace ("net_4_0", ver); + string xml = File.ReadAllText (Path.Combine ("Test/XmlFiles", filename)).Replace ("System.Xaml_test_net_4_0", ver + "_System.Xaml_test"); return new XamlXmlReader (XmlReader.Create (new StringReader (xml))); } diff --git a/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlWriterTest.cs b/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlWriterTest.cs index eaf0f28c257..e46771c9b31 100755 --- a/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlWriterTest.cs +++ b/mcs/class/System.Xaml/Test/System.Xaml/XamlXmlWriterTest.cs @@ -637,7 +637,7 @@ namespace MonoTests.System.Xaml string ReadXml (string name) { string ver = "net_4_x"; - return File.ReadAllText ("Test/XmlFiles/" + name).Trim ().Replace (">\n", ">\r\n").Replace ("net_4_0", ver).Replace ("\r\n", Environment.NewLine); + return File.ReadAllText ("Test/XmlFiles/" + name).Trim ().Replace (">\n", ">\r\n").Replace ("System.Xaml_test_net_4_0", ver + "_System.Xaml_test").Replace ("\r\n", Environment.NewLine); } [Test] diff --git a/mcs/class/System/System.Net.Configuration/SmtpSection.cs b/mcs/class/System/System.Net.Configuration/SmtpSection.cs index 9d5f74bd0c1..705dc920d57 100644 --- a/mcs/class/System/System.Net.Configuration/SmtpSection.cs +++ b/mcs/class/System/System.Net.Configuration/SmtpSection.cs @@ -44,6 +44,12 @@ namespace System.Net.Configuration { set { base ["deliveryMethod"] = value; } } + [ConfigurationProperty ("deliveryFormat", DefaultValue = SmtpDeliveryFormat.SevenBit)] + public SmtpDeliveryFormat DeliveryFormat { + get { return (SmtpDeliveryFormat) base ["deliveryFormat"]; } + set { base ["deliveryFormat"] = value; } + } + [ConfigurationProperty ("from")] public string From { get { return (string) base ["from"]; } diff --git a/mcs/class/System/System.Net/HttpConnection.cs b/mcs/class/System/System.Net/HttpConnection.cs index 2be693f5b16..885eaf3ea3d 100644 --- a/mcs/class/System/System.Net/HttpConnection.cs +++ b/mcs/class/System/System.Net/HttpConnection.cs @@ -397,7 +397,7 @@ namespace System.Net { HttpListenerResponse response = context.Response; response.StatusCode = status; response.ContentType = "text/html"; - string description = HttpListenerResponse.GetStatusDescription (status); + string description = HttpListenerResponseHelper.GetStatusDescription (status); string str; if (msg != null) str = String.Format ("<h1>{0} ({1})</h1>", description, msg); diff --git a/mcs/class/System/System.Net/HttpListenerResponse.cs b/mcs/class/System/System.Net/HttpListenerResponse.cs index dcc553036e1..807c9dd393a 100644 --- a/mcs/class/System/System.Net/HttpListenerResponse.cs +++ b/mcs/class/System/System.Net/HttpListenerResponse.cs @@ -218,63 +218,10 @@ namespace System.Net { if (value < 100 || value > 999) throw new ProtocolViolationException ("StatusCode must be between 100 and 999."); status_code = value; - status_description = GetStatusDescription (value); + status_description = HttpListenerResponseHelper.GetStatusDescription (value); } } - internal static string GetStatusDescription (int code) - { - switch (code){ - case 100: return "Continue"; - case 101: return "Switching Protocols"; - case 102: return "Processing"; - case 200: return "OK"; - case 201: return "Created"; - case 202: return "Accepted"; - case 203: return "Non-Authoritative Information"; - case 204: return "No Content"; - case 205: return "Reset Content"; - case 206: return "Partial Content"; - case 207: return "Multi-Status"; - case 300: return "Multiple Choices"; - case 301: return "Moved Permanently"; - case 302: return "Found"; - case 303: return "See Other"; - case 304: return "Not Modified"; - case 305: return "Use Proxy"; - case 307: return "Temporary Redirect"; - case 400: return "Bad Request"; - case 401: return "Unauthorized"; - case 402: return "Payment Required"; - case 403: return "Forbidden"; - case 404: return "Not Found"; - case 405: return "Method Not Allowed"; - case 406: return "Not Acceptable"; - case 407: return "Proxy Authentication Required"; - case 408: return "Request Timeout"; - case 409: return "Conflict"; - case 410: return "Gone"; - case 411: return "Length Required"; - case 412: return "Precondition Failed"; - case 413: return "Request Entity Too Large"; - case 414: return "Request-Uri Too Long"; - case 415: return "Unsupported Media Type"; - case 416: return "Requested Range Not Satisfiable"; - case 417: return "Expectation Failed"; - case 422: return "Unprocessable Entity"; - case 423: return "Locked"; - case 424: return "Failed Dependency"; - case 500: return "Internal Server Error"; - case 501: return "Not Implemented"; - case 502: return "Bad Gateway"; - case 503: return "Service Unavailable"; - case 504: return "Gateway Timeout"; - case 505: return "Http Version Not Supported"; - case 507: return "Insufficient Storage"; - } - return ""; - } - public string StatusDescription { get { return status_description; } set { @@ -552,6 +499,64 @@ namespace System.Net { cookies.Add (cookie); } } + + // do not inline into HttpListenerResponse as this recursively brings everything that's + // reachable by IDisposable.Dispose (and that's quite a lot in this case). + static class HttpListenerResponseHelper { + + internal static string GetStatusDescription (int code) + { + switch (code){ + case 100: return "Continue"; + case 101: return "Switching Protocols"; + case 102: return "Processing"; + case 200: return "OK"; + case 201: return "Created"; + case 202: return "Accepted"; + case 203: return "Non-Authoritative Information"; + case 204: return "No Content"; + case 205: return "Reset Content"; + case 206: return "Partial Content"; + case 207: return "Multi-Status"; + case 300: return "Multiple Choices"; + case 301: return "Moved Permanently"; + case 302: return "Found"; + case 303: return "See Other"; + case 304: return "Not Modified"; + case 305: return "Use Proxy"; + case 307: return "Temporary Redirect"; + case 400: return "Bad Request"; + case 401: return "Unauthorized"; + case 402: return "Payment Required"; + case 403: return "Forbidden"; + case 404: return "Not Found"; + case 405: return "Method Not Allowed"; + case 406: return "Not Acceptable"; + case 407: return "Proxy Authentication Required"; + case 408: return "Request Timeout"; + case 409: return "Conflict"; + case 410: return "Gone"; + case 411: return "Length Required"; + case 412: return "Precondition Failed"; + case 413: return "Request Entity Too Large"; + case 414: return "Request-Uri Too Long"; + case 415: return "Unsupported Media Type"; + case 416: return "Requested Range Not Satisfiable"; + case 417: return "Expectation Failed"; + case 422: return "Unprocessable Entity"; + case 423: return "Locked"; + case 424: return "Failed Dependency"; + case 500: return "Internal Server Error"; + case 501: return "Not Implemented"; + case 502: return "Bad Gateway"; + case 503: return "Service Unavailable"; + case 504: return "Gateway Timeout"; + case 505: return "Http Version Not Supported"; + case 507: return "Insufficient Storage"; + } + return ""; + } + } } #endif diff --git a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs index 7842d5c3fe8..7b0b3ac8152 100644 --- a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs +++ b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs @@ -284,7 +284,7 @@ namespace MonoTests.System.Configuration { [Test] public void TestSettings2_Properties () { - string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_4_x, Version=0.0.0.0"; + string expected = "MonoTests.System.Configuration.ProviderPoker, net_4_x_System_test, Version=0.0.0.0"; Assert.AreEqual (expected, new SettingsProviderAttribute (typeof (ProviderPoker)).ProviderTypeName.Substring (0, expected.Length), "#1"); TestSettings2 settings = new TestSettings2 (); diff --git a/mcs/class/System/mobile_static_System_test.dll.excludes b/mcs/class/System/mobile_static_System_test.dll.excludes new file mode 100644 index 00000000000..8f84347cde9 --- /dev/null +++ b/mcs/class/System/mobile_static_System_test.dll.excludes @@ -0,0 +1,190 @@ +Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs +Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs +Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs +Microsoft.CSharp/CodeGeneratorFromStatementTest.cs +Microsoft.CSharp/CodeGeneratorFromTypeTest.cs +Microsoft.CSharp/CodeGeneratorIdentifierTest.cs +Microsoft.CSharp/CodeGeneratorTestBase.cs +Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs +Microsoft.CSharp/CSharpCodeProviderCas.cs +Microsoft.CSharp/CSharpCodeProviderTest.cs +Microsoft.VisualBasic/CodeGeneratorFromBinaryOperatorTest.cs +Microsoft.VisualBasic/CodeGeneratorFromCompileUnitTest.cs +Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs +Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs +Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs +Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs +Microsoft.VisualBasic/CodeGeneratorTestBase.cs +Microsoft.VisualBasic/VBCodeProviderCas.cs +Microsoft.VisualBasic/VBCodeProviderTest.cs +System.CodeDom/CodeArgumentReferenceExpressionCas.cs +System.CodeDom/CodeArgumentReferenceExpressionTest.cs +System.CodeDom/CodeArrayCreateExpressionCas.cs +System.CodeDom/CodeArrayCreateExpressionTest.cs +System.CodeDom/CodeArrayIndexerExpressionCas.cs +System.CodeDom/CodeAssignStatementCas.cs +System.CodeDom/CodeAttachEventStatementCas.cs +System.CodeDom/CodeAttachEventStatementTest.cs +System.CodeDom/CodeAttributeArgumentCas.cs +System.CodeDom/CodeAttributeArgumentCollectionCas.cs +System.CodeDom/CodeAttributeArgumentCollectionTest.cs +System.CodeDom/CodeAttributeArgumentTest.cs +System.CodeDom/CodeAttributeDeclarationCas.cs +System.CodeDom/CodeAttributeDeclarationCollectionCas.cs +System.CodeDom/CodeAttributeDeclarationCollectionTest.cs +System.CodeDom/CodeAttributeDeclarationTest.cs +System.CodeDom/CodeBaseReferenceExpressionCas.cs +System.CodeDom/CodeBinaryOperatorExpressionCas.cs +System.CodeDom/CodeCastExpressionCas.cs +System.CodeDom/CodeCastExpressionTest.cs +System.CodeDom/CodeCatchClauseCas.cs +System.CodeDom/CodeCatchClauseCollectionCas.cs +System.CodeDom/CodeCatchClauseCollectionTest.cs +System.CodeDom/CodeCatchClauseTest.cs +System.CodeDom/CodeChecksumPragmaCas.cs +System.CodeDom/CodeChecksumPragmaTest.cs +System.CodeDom/CodeCommentStatementCas.cs +System.CodeDom/CodeCommentStatementCollectionCas.cs +System.CodeDom/CodeCommentStatementCollectionTest.cs +System.CodeDom/CodeCompileUnitCas.cs +System.CodeDom/CodeConditionStatementCas.cs +System.CodeDom/CodeConstructorCas.cs +System.CodeDom/CodeConstructorTest.cs +System.CodeDom/CodeDefaultValueExpressionCas.cs +System.CodeDom/CodeDefaultValueExpressionTest.cs +System.CodeDom/CodeDelegateCreateExpressionCas.cs +System.CodeDom/CodeDelegateCreateExpressionTest.cs +System.CodeDom/CodeDelegateInvokeExpressionCas.cs +System.CodeDom/CodeDirectionExpressionCas.cs +System.CodeDom/CodeDirectiveCas.cs +System.CodeDom/CodeDirectiveCollectionCas.cs +System.CodeDom/CodeDirectiveCollectionTest.cs +System.CodeDom/CodeEntryPointMethodCas.cs +System.CodeDom/CodeEventReferenceExpressionCas.cs +System.CodeDom/CodeEventReferenceExpressionTest.cs +System.CodeDom/CodeExpressionCas.cs +System.CodeDom/CodeExpressionCollectionCas.cs +System.CodeDom/CodeExpressionCollectionTest.cs +System.CodeDom/CodeExpressionStatementCas.cs +System.CodeDom/CodeFieldReferenceExpressionCas.cs +System.CodeDom/CodeGotoStatementCas.cs +System.CodeDom/CodeGotoStatementTest.cs +System.CodeDom/CodeIndexerExpressionCas.cs +System.CodeDom/CodeIterationStatementCas.cs +System.CodeDom/CodeLabeledStatementTest.cs +System.CodeDom/CodeLinePragmaCas.cs +System.CodeDom/CodeLinePragmaTest.cs +System.CodeDom/CodeMemberEventCas.cs +System.CodeDom/CodeMemberFieldCas.cs +System.CodeDom/CodeMemberFieldTest.cs +System.CodeDom/CodeMemberMethodCas.cs +System.CodeDom/CodeMemberMethodTest.cs +System.CodeDom/CodeMemberPropertyCas.cs +System.CodeDom/CodeMemberPropertyTest.cs +System.CodeDom/CodeMethodInvokeExpressionCas.cs +System.CodeDom/CodeMethodInvokeExpressionTest.cs +System.CodeDom/CodeMethodReferenceExpressionCas.cs +System.CodeDom/CodeMethodReferenceExpressionTest.cs +System.CodeDom/CodeMethodReturnStatementCas.cs +System.CodeDom/CodeNamespaceCas.cs +System.CodeDom/CodeNamespaceCollectionCas.cs +System.CodeDom/CodeNamespaceCollectionTest.cs +System.CodeDom/CodeNamespaceImportCas.cs +System.CodeDom/CodeNamespaceImportCollectionCas.cs +System.CodeDom/CodeNamespaceImportCollectionTest.cs +System.CodeDom/CodeNamespaceImportTest.cs +System.CodeDom/CodeNamespaceTest.cs +System.CodeDom/CodeObjectCas.cs +System.CodeDom/CodeObjectCreateExpressionCas.cs +System.CodeDom/CodeObjectCreateExpressionTest.cs +System.CodeDom/CodeParameterDeclarationExpressionCas.cs +System.CodeDom/CodeParameterDeclarationExpressionCollectionCas.cs +System.CodeDom/CodeParameterDeclarationExpressionCollectionTest.cs +System.CodeDom/CodeParameterDeclarationExpressionTest.cs +System.CodeDom/CodePrimitiveExpressionCas.cs +System.CodeDom/CodePropertyReferenceExpressionCas.cs +System.CodeDom/CodePropertyReferenceExpressionTest.cs +System.CodeDom/CodePropertySetValueReferenceExpressionCas.cs +System.CodeDom/CodeRegionDirectiveCas.cs +System.CodeDom/CodeRegionDirectiveTest.cs +System.CodeDom/CodeRemoveEventStatementCas.cs +System.CodeDom/CodeRemoveEventStatementTest.cs +System.CodeDom/CodeSnippetCompileUnitCas.cs +System.CodeDom/CodeSnippetCompileUnitTest.cs +System.CodeDom/CodeSnippetExpressionCas.cs +System.CodeDom/CodeSnippetExpressionTest.cs +System.CodeDom/CodeSnippetStatementCas.cs +System.CodeDom/CodeSnippetStatementTest.cs +System.CodeDom/CodeSnippetTypeMemberCas.cs +System.CodeDom/CodeSnippetTypeMemberTest.cs +System.CodeDom/CodeStatementCas.cs +System.CodeDom/CodeStatementCollectionCas.cs +System.CodeDom/CodeStatementCollectionTest.cs +System.CodeDom/CodeThisReferenceExpressionCas.cs +System.CodeDom/CodeThrowExceptionStatementCas.cs +System.CodeDom/CodeTryCatchFinallyStatementCas.cs +System.CodeDom/CodeTypeConstructorCas.cs +System.CodeDom/CodeTypeConstructorTest.cs +System.CodeDom/CodeTypeDeclarationCas.cs +System.CodeDom/CodeTypeDeclarationCollectionCas.cs +System.CodeDom/CodeTypeDeclarationCollectionTest.cs +System.CodeDom/CodeTypeDelegateCas.cs +System.CodeDom/CodeTypeDelegateTest.cs +System.CodeDom/CodeTypeMemberCas.cs +System.CodeDom/CodeTypeMemberCollectionCas.cs +System.CodeDom/CodeTypeMemberCollectionTest.cs +System.CodeDom/CodeTypeOfExpressionCas.cs +System.CodeDom/CodeTypeOfExpressionTest.cs +System.CodeDom/CodeTypeParameterCas.cs +System.CodeDom/CodeTypeParameterCollectionTest.cs +System.CodeDom/CodeTypeParameterTest.cs +System.CodeDom/CodeTypeReferenceCas.cs +System.CodeDom/CodeTypeReferenceCollectionCas.cs +System.CodeDom/CodeTypeReferenceCollectionTest.cs +System.CodeDom/CodeTypeReferenceExpressionCas.cs +System.CodeDom/CodeTypeReferenceExpressionTest.cs +System.CodeDom/CodeTypeReferenceTest.cs +System.CodeDom/CodeVariableDeclarationStatementCas.cs +System.CodeDom/CodeVariableDeclarationStatementTest.cs +System.CodeDom/CodeVariableReferenceExpressionCas.cs +System.CodeDom/CodeVariableReferenceExpressionTest.cs +System.CodeDom.Compiler/CodeCompilerCas.cs +System.CodeDom.Compiler/CodeDomProviderCas.cs +System.CodeDom.Compiler/CodeGeneratorCas.cs +System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs +System.CodeDom.Compiler/CodeGeneratorGenerateFromCompileUnitTest.cs +System.CodeDom.Compiler/CodeGeneratorOptionsCas.cs +System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs +System.CodeDom.Compiler/CodeGeneratorTest.cs +System.CodeDom.Compiler/CodeGeneratorTestBase.cs +System.CodeDom.Compiler/CodeParserCas.cs +System.CodeDom.Compiler/CompilerErrorCas.cs +System.CodeDom.Compiler/CompilerErrorCollectionCas.cs +System.CodeDom.Compiler/CompilerInfoCas.cs +System.CodeDom.Compiler/CompilerParametersCas.cs +System.CodeDom.Compiler/CompilerResultsCas.cs +System.CodeDom.Compiler/ExecutorCas.cs +System.CodeDom.Compiler/ExecutorTest.cs +System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs +System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs +System.CodeDom.Compiler/IndentedTextWriterCas.cs +System.CodeDom.Compiler/IndentedTextWriterTest.cs +System.CodeDom.Compiler/TempFileCollectionCas.cs +System.CodeDom.Compiler/TempFileCollectionTest.cs +System.Configuration/ApplicationSettingsBaseTest.cs +System.Configuration/ConfigurationExceptionTest.cs +System.Configuration/ConfigXmlDocumentTest.cs +System.Configuration/LocalFileSettingsProviderTest.cs +System.Configuration/SettingElementTest.cs +System.Configuration/SettingsBaseTest.cs +System.Configuration/SettingsPropertyCollectionTest.cs +System.Configuration/SettingsPropertyTest.cs +System.Configuration/SettingsPropertyValueCollectionTest.cs +System.Configuration/SettingsPropertyValueTest.cs +System.Configuration.Provider +System.Configuration.Provider/ProviderBaseTest.cs +System.IO.Ports/SerialPortTest.cs +System.Web/AspNetHostingPermissionAttributeCas.cs +System.Web/AspNetHostingPermissionAttributeTest.cs +System.Web/AspNetHostingPermissionCas.cs +System.Web/AspNetHostingPermissionTest.cs diff --git a/mcs/class/System/mobile_static_System_test.dll.sources b/mcs/class/System/mobile_static_System_test.dll.sources new file mode 100644 index 00000000000..3944a95be6a --- /dev/null +++ b/mcs/class/System/mobile_static_System_test.dll.sources @@ -0,0 +1 @@ +#include System_test.dll.sources diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index 4e557d1ee29..9fc807acc27 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -60,8 +60,14 @@ WARNING_ABOUT_DISABLED_WARNING=1635 LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) DEFAULT_REFERENCES = +ifdef MOBILE_STATIC +CORLIB_MONO_POSIX_REF = +else +CORLIB_MONO_POSIX_REF = -r:Mono.Posix.dll +endif + # System.IO/DirectoryInfoTest.cs needs Mono.Posix -TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll \ +TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe $(CORLIB_MONO_POSIX_REF) -r:System.Core.dll \ -define:MONO_DATACONVERTER_STATIC_METHODS $(TEST_RESX_RESOURCES:%=-resource:%) EXTRA_DISTFILES = \ @@ -168,9 +174,17 @@ run-test-vts: test-vts @echo Running vts tests... PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(NOSHADOW_FLAG) \ $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe -ifndef NO_TEST + +ifdef NO_TEST +NO_VTS_TEST = yes +endif + +ifndef NO_VTS_TEST test: test-vts run-test: run-test-vts +else +test: +run-test: endif EXTRA_DISTFILES += \ diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs index b9cc49f1464..92826796908 100755 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs @@ -169,7 +169,11 @@ namespace System.Security.Cryptography { name = "System.Security.Cryptography.X509Certificates.X509Chain, System"; break; case "aes": +#if MOBILE_STATIC + name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core"; +#else name = "System.Security.Cryptography.AesManaged, System.Core"; +#endif break; } diff --git a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs index 64ee5872b83..b17cfd62c55 100644 --- a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs +++ b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs @@ -17,7 +17,7 @@ using System.IO; using System.Text;
using System.Threading;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using Mono.Unix;
#endif
using NUnit.Framework;
@@ -47,7 +47,7 @@ public class DirectoryTest if (Directory.Exists (TempFolder))
Directory.Delete (TempFolder, true);
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test] //BXC #12461
public void EnumerateFilesListSymlinks ()
{
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs index b88423a68f3..77e8e6df1af 100644 --- a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs @@ -5,7 +5,7 @@ // (C) 2004 Ximian, Inc. http://www.ximian.com // -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System; using System.Threading; diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs index 7d561f4f9e5..de8f4bdbca5 100644 --- a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs @@ -37,7 +37,7 @@ using System.Configuration.Assemblies; using System.Globalization; using System.IO; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Threading; @@ -197,7 +197,7 @@ namespace MonoTests.System.Reflection #endif } -#if !MONOTOUCH // Reflection.Emit is not supported. +#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported. [Test] [Category("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter public void GetModules_MissingFile () @@ -249,7 +249,7 @@ namespace MonoTests.System.Reflection public void Corlib_test () { Assembly corlib_test = Assembly.GetExecutingAssembly (); -#if MONODROID +#if MONODROID || MOBILE_STATIC Assert.IsNull (corlib_test.EntryPoint, "EntryPoint"); Assert.IsNull (corlib_test.Evidence, "Evidence"); #elif MOBILE @@ -457,7 +457,18 @@ namespace MonoTests.System.Reflection [Test] public void LoadWithPartialName () { - string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "corlib_test_net_4_x", "corlib_plattest", "mscorlibtests", "BclTests" }; +// FIXME? +// So the problem here is that if we load an assembly +// in a fully aot mode and then cannot load the +// dylib, we will assert. This test is incompatible +// with the semantics of aot'ed assembly loading, as +// aot may assert when loading. This assumes that it's +// safe to greedly load everything. +#if MOBILE_STATIC + string [] names = { "mobile_static_corlib_test" }; +#else + string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "net_4_x_corlib_test", "corlib_plattest", "mscorlibtests", "BclTests" }; +#endif foreach (string s in names) if (Assembly.LoadWithPartialName (s) != null) @@ -502,7 +513,7 @@ namespace MonoTests.System.Reflection } } -#if !MONOTOUCH // Reflection.Emit is not supported. +#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported. [Test] public void Location_Empty() { string assemblyFileName = Path.Combine ( @@ -1175,7 +1186,7 @@ namespace MonoTests.System.Reflection Assert.AreEqual ("MonoModule", module.GetType ().Name, "#2"); -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC Assert.AreEqual ("mscorlib.dll", module.Name, "#3"); #endif Assert.IsFalse (module.IsResource (), "#4"); diff --git a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs index 410c4c239a0..f06debd8ebb 100644 --- a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs @@ -31,7 +31,7 @@ using System; using System.Threading; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.InteropServices; diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs index 17ddddd3e04..53617c4e70f 100644 --- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs @@ -33,7 +33,7 @@ using NUnit.Framework; using System; using System.Threading; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.InteropServices; @@ -54,7 +54,7 @@ namespace MonoTests.System.Reflection [TestFixture] public class MethodInfoTest { -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC // use an existing symbol - so we can build without dlsym. It does not matter that the signature does not match for the test [DllImport ("libc", EntryPoint="readlink", CharSet=CharSet.Unicode, ExactSpelling=false, PreserveSig=true, SetLastError=true, BestFitMapping=true, ThrowOnUnmappableChar=true)] #else @@ -115,7 +115,7 @@ namespace MonoTests.System.Reflection DllImportAttribute attr = (DllImportAttribute)((t.GetMethod ("dllImportMethod").GetCustomAttributes (typeof (DllImportAttribute), true)) [0]); Assert.AreEqual (CallingConvention.Winapi, attr.CallingConvention, "#1"); -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC Assert.AreEqual ("readlink", attr.EntryPoint, "#2"); Assert.AreEqual ("libc", attr.Value, "#3"); #else @@ -397,7 +397,7 @@ namespace MonoTests.System.Reflection [Test] public void GetMethodBody () { -#if MONOTOUCH && !DEBUG +#if (MONOTOUCH || MOBILE_STATIC) && !DEBUG Assert.Ignore ("Release app (on devices) are stripped of (managed) IL so this test would fail"); #endif MethodBody mb = typeof (MethodInfoTest).GetMethod ("locals_method").GetMethodBody (); @@ -600,7 +600,7 @@ namespace MonoTests.System.Reflection } catch (InvalidOperationException ex) { } } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC public TFoo SimpleGenericMethod2<TFoo, TBar> () { return default (TFoo); } /*Test for the uggly broken behavior of SRE.*/ [Test] @@ -854,7 +854,7 @@ namespace MonoTests.System.Reflection } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC class GenericClass<T> { public void Method () diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs index 04c941a9526..c93fecfa422 100644 --- a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs @@ -10,7 +10,7 @@ using System; using System.Threading; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.Serialization; @@ -93,7 +93,7 @@ public class ModuleTest } // Some of these tests overlap with the tests for ModuleBuilder -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] [Category("NotDotNet")] // path length can cause suprious failures public void TestGlobalData () { @@ -328,7 +328,7 @@ public class ModuleTest Module m = typeof (ModuleTest).Module; m.GetObjectData (null, new StreamingContext (StreamingContextStates.All)); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] [Category ("AndroidNotWorking")] // Mono.CompilerServices.SymbolWriter not available for Xamarin.Android public void GetTypes () diff --git a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs index 9db8bda20fd..d31b99fa495 100644 --- a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs @@ -7,7 +7,7 @@ // Copyright 2011 Xamarin Inc (http://www.xamarin.com). // -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System; using System.Collections; diff --git a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs index dd38e16b7e5..2fe870111ca 100644 --- a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs @@ -31,7 +31,7 @@ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Threading; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.IO; @@ -355,7 +355,7 @@ namespace MonoTests.System.Reflection get { return 99; } } } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void ConstantValue () { /*This test looks scary because we can't generate a default value with C# */ diff --git a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs index c1fc39a59c3..6c6cb45a406 100644 --- a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs @@ -28,7 +28,7 @@ using System; using System.Threading; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif diff --git a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs index 3dcb3ae2480..fcf64a19300 100644 --- a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs @@ -24,7 +24,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System; using System.Linq; diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs index d6216f73dbe..42abe682ac8 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs @@ -38,7 +38,7 @@ namespace MonoTests.System.Runtime.CompilerServices [TestFixture] public class AsyncTaskMethodBuilderTest { -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC // For some reason MT excludes CallContext handling [Test] diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs index 69ba983eeac..57b1d2c2764 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs @@ -248,6 +248,7 @@ namespace MonoTests.System.Runtime.CompilerServices return res.Result; } +#if !MOBILE_STATIC [Test] public void FinishedTaskOnCompleted () { @@ -272,6 +273,8 @@ namespace MonoTests.System.Runtime.CompilerServices Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");; } +#endif + [Test] public void CompletionOnSameCustomSynchronizationContext () { diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs index 27c77f182c9..1c7cb95ad32 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs @@ -128,7 +128,7 @@ namespace MonoTests.System.Runtime.InteropServices gch.Free (); } } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] [Category("MobileNotWorking")] // SIGSEGV, probably on AppDomain.Unload public void WeakHandleWorksOnNonRootDomain () diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs index e15cb30a839..55e95b91231 100644 --- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs @@ -43,7 +43,7 @@ namespace MonoTests.System.Runtime.Serialization } #endif -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void DelegateSerializationTest () { diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs index 8d20e6f091e..e93744c0fd8 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs @@ -44,6 +44,7 @@ namespace MonoTests.System.Security.Cryptography { [Test] [Category ("AndroidNotWorking")] // Exception is thrown: CryptographicException : Bad PKCS7 padding. Invalid length 236. + [Category ("MobileNotWorking")] // On mobile_static, above exception is thrown as well public void Roundtrip () { // that will return a AesCryptoServiceProvider @@ -283,4 +284,4 @@ namespace MonoTests.System.Security.Cryptography { { -2130705088, "23-28-F4-38-74-11-EA-D8-8A-E6-AB-F8-FD-8C-8B-19" }, }; } -}
\ No newline at end of file +} diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs index aefa9ab4108..87b6d3e662f 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs @@ -193,6 +193,7 @@ namespace MonoTests.System.Threading } [Test] + [Category ("NotWorking")] // Finalizers aren't guaranteed public void DisposeOnThreadExit () { var threadLocal = new ThreadLocal<SetMreOnFinalize>(); @@ -210,7 +211,7 @@ namespace MonoTests.System.Threading }, 500); if (!mres.IsSet) - Assert.Fail (); + Assert.Fail ("Finalizer didn't run after thread termination"); } } } diff --git a/mcs/class/corlib/Test/System/ActivatorTest.cs b/mcs/class/corlib/Test/System/ActivatorTest.cs index a2bf6ab3d32..74661fd6f7e 100644 --- a/mcs/class/corlib/Test/System/ActivatorTest.cs +++ b/mcs/class/corlib/Test/System/ActivatorTest.cs @@ -13,7 +13,7 @@ using System; using System.Globalization; using System.IO; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.InteropServices; @@ -311,7 +311,7 @@ namespace MonoTests.System { Assert.AreEqual (7, objCOMTest.Id, "#A05"); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] [ExpectedException (typeof (MissingMethodException))] public void CreateInstance_TypeBuilder () @@ -513,7 +513,7 @@ namespace MonoTests.System { null, null); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void CreateInstanceCustomDomain () { diff --git a/mcs/class/corlib/Test/System/AttributeTest.cs b/mcs/class/corlib/Test/System/AttributeTest.cs index 53a8af742b8..d609c188831 100644 --- a/mcs/class/corlib/Test/System/AttributeTest.cs +++ b/mcs/class/corlib/Test/System/AttributeTest.cs @@ -12,7 +12,7 @@ using System; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.InteropServices; @@ -846,7 +846,7 @@ namespace MonoTests.System Assert.IsTrue (custom [2].GetType () == typeof (SerializableAttribute)); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void GetCustomAttributeOnNewSreTypes () { diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs index 2458b9831a6..0d164f57272 100644 --- a/mcs/class/corlib/Test/System/DelegateTest.cs +++ b/mcs/class/corlib/Test/System/DelegateTest.cs @@ -5,7 +5,7 @@ using System; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Threading; @@ -26,7 +26,7 @@ namespace MonoTests.System [Test] //See bug #372406 -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #10539 #endif public void CreateDelegate1_Method_Private_Instance () @@ -64,7 +64,7 @@ namespace MonoTests.System } [Test] // CreateDelegate (Type, MethodInfo) -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #14163 #endif public void CreateDelegate1_Method_Instance () @@ -925,7 +925,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #10539 #endif public void Virtual () @@ -956,7 +956,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #14163 #endif public void NullTarget_Instance () @@ -1021,7 +1021,7 @@ namespace MonoTests.System } [Test] // #617161 -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #10539 #endif public void ClosedOverNullReferenceStaticMethod () @@ -1045,7 +1045,7 @@ namespace MonoTests.System } [Test] // #475962 -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] // #10539 #endif public void ClosedOverNullReferenceInstanceMethod () @@ -1079,7 +1079,7 @@ namespace MonoTests.System delegate int ByRefDelegate (ref FooStruct s, int a, int b, int c, int d); -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [Category ("NotWorking")] #endif [Test] @@ -1279,7 +1279,7 @@ namespace MonoTests.System { string retarg (string s); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void CreateDelegateWithLdFtnAndAbstractMethod () { @@ -1388,7 +1388,7 @@ namespace MonoTests.System Assert.IsTrue (d (0, 0)); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC public static void DynInvokeWithClosedFirstArg (object a, object b) { } diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs index 19e2cb5c49d..358298f91e5 100644 --- a/mcs/class/corlib/Test/System/TimeZoneTest.cs +++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs @@ -349,12 +349,15 @@ public class TimeZoneTest { // now it fails on Snow Leopard the same way (incomplete data) with iOS5 simulator (OS update ?) // but it *never*ever* failed on devices incomplete_data_on_simulator_only_bug = true; +#if XAMCORE_2_0 || MONOTOUCH + #if XAMCORE_2_0 if (ObjCRuntime.Runtime.Arch == ObjCRuntime.Arch.SIMULATOR) -#else +#elif MONOTOUCH if (MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.SIMULATOR) #endif Assert.Ignore ("known to fail on some iOS simulator versions - see source comments"); +#endif // XAMCORE_2_0 || MONOTOUCH } } #endif diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs index 19dbff4804c..4279cee8ec9 100644 --- a/mcs/class/corlib/Test/System/TypeTest.cs +++ b/mcs/class/corlib/Test/System/TypeTest.cs @@ -16,7 +16,7 @@ using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC using System.Reflection.Emit; #endif using System.Runtime.InteropServices; @@ -261,7 +261,7 @@ namespace MonoTests.System [TestFixture] public class TypeTest { -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC private ModuleBuilder module; #endif const string ASSEMBLY_NAME = "MonoTests.System.TypeTest"; @@ -272,7 +272,7 @@ namespace MonoTests.System { AssemblyName assemblyName = new AssemblyName (); assemblyName.Name = ASSEMBLY_NAME; -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC var assembly = AppDomain.CurrentDomain.DefineDynamicAssembly ( assemblyName, AssemblyBuilderAccess.RunAndSave, Path.GetTempPath ()); module = assembly.DefineDynamicModule ("module1"); @@ -3091,7 +3091,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [ExpectedException (typeof (NotSupportedException))] #endif public void MakeGenericType_UserDefinedType () @@ -3108,7 +3108,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [ExpectedException (typeof (NotSupportedException))] #endif public void MakeGenericType_NestedUserDefinedType () @@ -3125,7 +3125,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [ExpectedException (typeof (NotSupportedException))] #endif public void TestMakeGenericType_UserDefinedType_DotNet20SP1 () @@ -3138,7 +3138,7 @@ namespace MonoTests.System } [Test] -#if MONOTOUCH +#if MONOTOUCH || MOBILE_STATIC [ExpectedException (typeof (NotSupportedException))] #endif public void MakeGenericType_BadUserType () @@ -3274,7 +3274,7 @@ namespace MonoTests.System Assert.AreEqual (t1, t2); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void SpaceAfterComma () { string strType = "System.Collections.Generic.Dictionary`2[[System.Int32,mscorlib], [System.String,mscorlib]],mscorlib"; @@ -3282,7 +3282,7 @@ namespace MonoTests.System } #endif -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] public void Bug506757 () { @@ -4152,7 +4152,7 @@ namespace MonoTests.System Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32"), null, "#15"); } -#if !MONOTOUCH +#if !MONOTOUCH && !MOBILE_STATIC [Test] [Category ("AndroidNotWorking")] // requires symbol writer public void FullNameGetTypeParseEscapeRoundtrip () // bug #26384 diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources index 70454d6e5ec..b7cf0d04b3a 100644 --- a/mcs/class/corlib/corlib_test.dll.sources +++ b/mcs/class/corlib/corlib_test.dll.sources @@ -355,17 +355,17 @@ System.Security.Policy/ApplicationSecurityManagerTest.cs System.Security.Policy/ApplicationTrustTest.cs System.Security.Policy/CodeGroupTest.cs System.Security.Policy/EvidenceTest.cs -System.Security.Policy/FileCodeGroupTest.cs +System.Security.Policy/FileCodeGroupTest.cs System.Security.Policy/FirstMatchCodeGroupTest.cs System.Security.Policy/GacMembershipConditionTest.cs System.Security.Policy/GacTest.cs System.Security.Policy/HashMembershipConditionTest.cs System.Security.Policy/HashTest.cs System.Security.Policy/IBuiltInEvidenceTest.cs -System.Security.Policy/NetCodeGroupTest.cs -System.Security.Policy/PermissionRequestEvidenceTest.cs -System.Security.Policy/PolicyLevelTest.cs -System.Security.Policy/PolicyStatementTest.cs +System.Security.Policy/NetCodeGroupTest.cs +System.Security.Policy/PermissionRequestEvidenceTest.cs +System.Security.Policy/PolicyLevelTest.cs +System.Security.Policy/PolicyStatementTest.cs System.Security.Policy/PublisherMembershipConditionTest.cs System.Security.Policy/PublisherTest.cs System.Security.Policy/SiteMembershipConditionTest.cs diff --git a/mcs/class/corlib/mobile_static_corlib_test.dll.excludes b/mcs/class/corlib/mobile_static_corlib_test.dll.excludes new file mode 100644 index 00000000000..eb17a105b75 --- /dev/null +++ b/mcs/class/corlib/mobile_static_corlib_test.dll.excludes @@ -0,0 +1,131 @@ +Microsoft.Win32/RegistryKeyTest.cs +System.Diagnostics.Contracts/ContractAssertTest.cs +System.Diagnostics.Contracts/ContractAssumeTest.cs +System.Diagnostics.Contracts/ContractCollectionMethodsTest.cs +System.Diagnostics.Contracts/ContractHelperTest.cs +System.Diagnostics.Contracts/ContractMarkerMethodsTest.cs +System.Diagnostics.Contracts/ContractMustUseRewriterTest.cs +System.Diagnostics.Contracts/Helpers/RunAgainstReferenceAttribute.cs +System.Diagnostics.Contracts/Helpers/TestContractBase.cs +System.Reflection.Emit/AssemblyBuilderAccessTest.cs +System.Reflection.Emit/AssemblyBuilderTest.cs +System.Reflection.Emit/ConstructorBuilderTest.cs +System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs +System.Reflection.Emit/CustomAttributeBuilderTest.cs +System.Reflection.Emit/DerivedTypesTest.cs +System.Reflection.Emit/DynamicILInfoTest.cs +System.Reflection.Emit/DynamicMethodTest.cs +System.Reflection.Emit/EnumBuilderTest.cs +System.Reflection.Emit/EventBuilderTest.cs +System.Reflection.Emit/FieldBuilderTest.cs +System.Reflection.Emit/GenericTypeParameterBuilderTest.cs +System.Reflection.Emit/ILGeneratorTest.cs +System.Reflection.Emit/MethodBuilderTest.cs +System.Reflection.Emit/MethodBuilderTestIL.cs +System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs +System.Reflection.Emit/MethodRentalCas.cs +System.Reflection.Emit/MethodRentalTest.cs +System.Reflection.Emit/ModuleBuilderTest.cs +System.Reflection.Emit/ParameterBuilderTest.cs +System.Reflection.Emit/PropertyBuilderTest.cs +System.Reflection.Emit/SignatureHelperTest.cs +System.Reflection.Emit/TypeBuilderTest.cs +System.Runtime.Remoting/ContextTest.cs +System.Runtime.Remoting/RemotingConfigurationTest.cs +System.Runtime.Remoting/RemotingServicesTest.cs +System.Runtime.Remoting/SoapServicesTest.cs +System.Runtime.Remoting/SynchronizationAttributeTest.cs +System.Runtime.Remoting.Channels/ChannelServicesTest.cs +System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs +System.Runtime.Remoting.Messaging/CallContextTest.cs +System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs +System.Security.AccessControl/AuthorizationRuleTest.cs +System.Security.AccessControl/CommonAceTest.cs +System.Security.AccessControl/CommonAclTest.cs +System.Security.AccessControl/CommonObjectSecurityTest.cs +System.Security.AccessControl/CommonSecurityDescriptorTest.cs +System.Security.AccessControl/CryptoKeyAccessRuleTest.cs +System.Security.AccessControl/DirectoryObjectSecurityTest.cs +System.Security.AccessControl/DirectorySecurityTest.cs +System.Security.AccessControl/DiscretionaryAclTest.cs +System.Security.AccessControl/EventWaitHandleSecurityTest.cs +System.Security.AccessControl/FileSecurityTest.cs +System.Security.AccessControl/MutexAccessRuleTest.cs +System.Security.AccessControl/MutexSecurityTest.cs +System.Security.AccessControl/ObjectAceTest.cs +System.Security.AccessControl/ObjectSecurity_TTest.cs +System.Security.AccessControl/ObjectSecurityTest.cs +System.Security.AccessControl/RawAclTest.cs +System.Security.AccessControl/RawSecurityDescriptorTest.cs +System.Security.AccessControl/RegistrySecurityTest.cs +System.Security.AccessControl/SystemAclTest.cs +System.Security.Permissions/CodeAccessSecurityAttributeTest.cs +System.Security.Permissions/EnvironmentPermissionAttributeTest.cs +System.Security.Permissions/EnvironmentPermissionTest.cs +System.Security.Permissions/FileDialogPermissionAttributeTest.cs +System.Security.Permissions/FileDialogPermissionTest.cs +System.Security.Permissions/FileIOPermissionAttributeTest.cs +System.Security.Permissions/FileIOPermissionTest.cs +System.Security.Permissions/GacIdentityPermissionAttributeTest.cs +System.Security.Permissions/GacIdentityPermissionTest.cs +System.Security.Permissions/HostProtectionAttributeTest.cs +System.Security.Permissions/IBuiltInPermissionTest.cs +System.Security.Permissions/IsolatedStorageFilePermissionAttributeTest.cs +System.Security.Permissions/IsolatedStorageFilePermissionTest.cs +System.Security.Permissions/IsolatedStoragePermissionAttributeTest.cs +System.Security.Permissions/KeyContainerPermissionAttributeTest.cs +System.Security.Permissions/PermissionSetAttributeTest.cs +System.Security.Permissions/PrincipalPermissionAttributeTest.cs +System.Security.Permissions/PrincipalPermissionTest.cs +System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs +System.Security.Permissions/PublisherIdentityPermissionTest.cs +System.Security.Permissions/ReflectionPermissionAttributeTest.cs +System.Security.Permissions/ReflectionPermissionTest.cs +System.Security.Permissions/RegistryPermissionAttributeTest.cs +System.Security.Permissions/RegistryPermissionTest.cs +System.Security.Permissions/SecurityAttributeTest.cs +System.Security.Permissions/SecurityPermissionAttributeTest.cs +System.Security.Permissions/SecurityPermissionTest.cs +System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs +System.Security.Permissions/SiteIdentityPermissionTest.cs +System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs +System.Security.Permissions/StrongNameIdentityPermissionTest.cs +System.Security.Permissions/StrongNamePublicKeyBlobTest.cs +System.Security.Permissions/UIPermissionAttributeTest.cs +System.Security.Permissions/UIPermissionTest.cs +System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs +System.Security.Permissions/UrlIdentityPermissionTest.cs +System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs +System.Security.Permissions/ZoneIdentityPermissionTest.cs +System.Security.Policy/AllMembershipConditionTest.cs +System.Security.Policy/ApplicationDirectoryMembershipConditionTest.cs +System.Security.Policy/ApplicationDirectoryTest.cs +System.Security.Policy/ApplicationMembershipConditionTest.cs +System.Security.Policy/ApplicationSecurityManagerCas.cs +System.Security.Policy/ApplicationSecurityManagerTest.cs +System.Security.Policy/ApplicationTrustTest.cs +System.Security.Policy/CodeGroupTest.cs +System.Security.Policy/DomainApplicationMembershipConditionTest.cs +System.Security.Policy/EvidenceTest.cs +System.Security.Policy/FileCodeGroupTest.cs +System.Security.Policy/FirstMatchCodeGroupTest.cs +System.Security.Policy/GacMembershipConditionTest.cs +System.Security.Policy/GacTest.cs +System.Security.Policy/HashMembershipConditionTest.cs +System.Security.Policy/HashTest.cs +System.Security.Policy/IBuiltInEvidenceTest.cs +System.Security.Policy/NetCodeGroupTest.cs +System.Security.Policy/PermissionRequestEvidenceTest.cs +System.Security.Policy/PolicyLevelTest.cs +System.Security.Policy/PolicyStatementTest.cs +System.Security.Policy/PublisherMembershipConditionTest.cs +System.Security.Policy/PublisherTest.cs +System.Security.Policy/SiteMembershipConditionTest.cs +System.Security.Policy/SiteTest.cs +System.Security.Policy/StrongNameMembershipConditionTest.cs +System.Security.Policy/StrongNameTest.cs +System.Security.Policy/UnionCodeGroupTest.cs +System.Security.Policy/UrlMembershipConditionTest.cs +System.Security.Policy/UrlTest.cs +System.Security.Policy/ZoneMembershipConditionTest.cs +System.Security.Policy/ZoneTest.cs diff --git a/mcs/class/corlib/mobile_static_corlib_test.dll.sources b/mcs/class/corlib/mobile_static_corlib_test.dll.sources new file mode 100644 index 00000000000..011effe162c --- /dev/null +++ b/mcs/class/corlib/mobile_static_corlib_test.dll.sources @@ -0,0 +1 @@ +#include corlib_test.dll.sources diff --git a/mcs/class/reference-assemblies/Makefile b/mcs/class/reference-assemblies/Makefile index e4b660ba5df..20ff20005ca 100644 --- a/mcs/class/reference-assemblies/Makefile +++ b/mcs/class/reference-assemblies/Makefile @@ -4,16 +4,18 @@ include ../../build/rules.make all-local: -PROFILE_DIR=$(DESTDIR)$(mono_libdir)/mono/ +PROFILE_DIR=$(DESTDIR)$(mono_libdir)/mono install-local: - $(MKINSTALLDIRS) $(PROFILE_DIR)/2.0 - $(MKINSTALLDIRS) $(PROFILE_DIR)/3.5 - $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0 - $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/* $(PROFILE_DIR)/2.0 - $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/* $(PROFILE_DIR)/3.5 - $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/* $(PROFILE_DIR)/4.0 + $(MKINSTALLDIRS) $(PROFILE_DIR)/2.0-api + $(MKINSTALLDIRS) $(PROFILE_DIR)/3.5-api + $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0-api + $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api + $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/* $(PROFILE_DIR)/2.0-api + $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/* $(PROFILE_DIR)/3.5-api + $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/* $(PROFILE_DIR)/4.0-api + $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/* $(PROFILE_DIR)/4.5-api -DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.0/*) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*) Makefile +DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.5/*) $(wildcard ../../../external/binary-reference-assemblies/v4.0/*) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*) Makefile dist-local: dist-default diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs index 3b2a5b4b18d..09d78302854 100644 --- a/mcs/mcs/dynamic.cs +++ b/mcs/mcs/dynamic.cs @@ -13,6 +13,11 @@ using System; using System.Linq; using SLE = System.Linq.Expressions; using System.Dynamic; +#if STATIC +using IKVM.Reflection.Emit; +#else +using System.Reflection.Emit; +#endif namespace Mono.CSharp { @@ -314,6 +319,50 @@ namespace Mono.CSharp EmitCall (ec, binder_expr, arguments, true); } + protected void EmitConditionalAccess (EmitContext ec) + { + var a_expr = arguments [0].Expr; + + var des = a_expr as DynamicExpressionStatement; + if (des != null) { + des.EmitConditionalAccess (ec); + } + + if (HasConditionalAccess ()) { + var NullOperatorLabel = ec.DefineLabel (); + + if (ExpressionAnalyzer.IsInexpensiveLoad (a_expr)) { + a_expr.Emit (ec); + } else { + var lt = new LocalTemporary (a_expr.Type); + lt.EmitAssign (ec, a_expr, true, false); + + Arguments [0].Expr = lt; + } + + ec.Emit (OpCodes.Brtrue_S, NullOperatorLabel); + + if (!ec.ConditionalAccess.Statement) { + if (ec.ConditionalAccess.Type.IsNullableType) + Nullable.LiftedNull.Create (ec.ConditionalAccess.Type, Location.Null).Emit (ec); + else + ec.EmitNull (); + } + + ec.Emit (OpCodes.Br, ec.ConditionalAccess.EndLabel); + ec.MarkLabel (NullOperatorLabel); + + return; + } + + if (a_expr.HasConditionalAccess ()) { + var lt = new LocalTemporary (a_expr.Type); + lt.EmitAssign (ec, a_expr, false, false); + + Arguments [0].Expr = lt; + } + } + protected void EmitCall (EmitContext ec, Expression binder, Arguments arguments, bool isStatement) { // @@ -502,6 +551,24 @@ namespace Mono.CSharp StatementExpression s = new StatementExpression (new SimpleAssign (site_field_expr, new Invocation (new MemberAccess (instanceAccessExprType, "Create"), args))); using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { + + var conditionalAccessReceiver = IsConditionalAccessReceiver; + var ca = ec.ConditionalAccess; + + if (conditionalAccessReceiver) { + ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ()) { + Statement = isStatement + }; + + // + // Emit conditional access expressions before dynamic call + // is initialized. It pushes site_field_expr on stack before + // the actual instance argument is emited which would cause + // jump from non-empty stack. + // + EmitConditionalAccess (ec); + } + if (s.Resolve (bc)) { Statement init = new If (new Binary (Binary.Operator.Equality, site_field_expr, new NullLiteral (loc)), s, loc); init.Emit (ec); @@ -526,9 +593,15 @@ namespace Mono.CSharp } } - Expression target = new DelegateInvocation (new MemberAccess (site_field_expr, "Target", loc).Resolve (bc), args, false, loc).Resolve (bc); - if (target != null) + var target = new DelegateInvocation (new MemberAccess (site_field_expr, "Target", loc).Resolve (bc), args, false, loc).Resolve (bc); + if (target != null) { target.Emit (ec); + } + + if (conditionalAccessReceiver) { + ec.CloseConditionalAccess (!isStatement && type.IsNullableType ? type : null); + ec.ConditionalAccess = ca; + } } } @@ -547,6 +620,12 @@ namespace Mono.CSharp { return new MemberAccess (new TypeExpression (binder_type, loc), name, loc); } + + protected virtual bool IsConditionalAccessReceiver { + get { + return false; + } + } } // @@ -671,14 +750,18 @@ namespace Mono.CSharp class DynamicIndexBinder : DynamicMemberAssignable { bool can_be_mutator; + readonly bool conditional_access_receiver; + readonly bool conditional_access; - public DynamicIndexBinder (Arguments args, Location loc) + public DynamicIndexBinder (Arguments args, bool conditionalAccessReceiver, bool conditionalAccess, Location loc) : base (args, loc) { + this.conditional_access_receiver = conditionalAccessReceiver; + this.conditional_access = conditionalAccess; } public DynamicIndexBinder (CSharpBinderFlags flags, Arguments args, Location loc) - : this (args, loc) + : this (args, false, false, loc) { base.flags = flags; } @@ -732,22 +815,35 @@ namespace Mono.CSharp setter_args.Add (new Argument (rhs)); return setter_args; } + + protected override bool IsConditionalAccessReceiver { + get { + return conditional_access_receiver; + } + } + + public override bool HasConditionalAccess () + { + return conditional_access; + } } class DynamicInvocation : DynamicExpressionStatement, IDynamicBinder { readonly ATypeNameExpression member; + readonly bool conditional_access_receiver; - public DynamicInvocation (ATypeNameExpression member, Arguments args, Location loc) + public DynamicInvocation (ATypeNameExpression member, Arguments args, bool conditionalAccessReceiver, Location loc) : base (null, args, loc) { base.binder = this; this.member = member; + this.conditional_access_receiver = conditionalAccessReceiver; } public static DynamicInvocation CreateSpecialNameInvoke (ATypeNameExpression member, Arguments args, Location loc) { - return new DynamicInvocation (member, args, loc) { + return new DynamicInvocation (member, args, false, loc) { flags = CSharpBinderFlags.InvokeSpecialName }; } @@ -805,11 +901,36 @@ namespace Mono.CSharp flags |= CSharpBinderFlags.ResultDiscarded; base.EmitStatement (ec); } + + protected override bool IsConditionalAccessReceiver { + get { + return conditional_access_receiver; + } + } + + public override bool HasConditionalAccess () + { + return member is ConditionalMemberAccess; + } + } + + class DynamicConditionalMemberBinder : DynamicMemberBinder + { + public DynamicConditionalMemberBinder (string name, Arguments args, Location loc) + : base (name, args, loc) + { + } + + public override bool HasConditionalAccess () + { + return true; + } } class DynamicMemberBinder : DynamicMemberAssignable { readonly string name; + bool conditionalAccessReceiver; public DynamicMemberBinder (string name, Arguments args, Location loc) : base (args, loc) @@ -835,6 +956,20 @@ namespace Mono.CSharp isSet |= (flags & CSharpBinderFlags.ValueFromCompoundAssignment) != 0; return new Invocation (GetBinder (isSet ? "SetMember" : "GetMember", loc), binder_args); } + + protected override Expression DoResolve (ResolveContext rc) + { + if (!rc.HasSet (ResolveContext.Options.DontSetConditionalAccessReceiver)) + conditionalAccessReceiver = HasConditionalAccess () || Arguments [0].Expr.HasConditionalAccess (); + + return base.DoResolve (rc); + } + + protected override bool IsConditionalAccessReceiver { + get { + return conditionalAccessReceiver; + } + } } // diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs index e8938153c80..c5139d57f67 100644 --- a/mcs/mcs/expression.cs +++ b/mcs/mcs/expression.cs @@ -110,7 +110,6 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext rc) { Expression res = null; - using (rc.With (ResolveContext.Options.DontSetConditionalAccessReceiver, false)) { res = expr.Resolve (rc); } @@ -7182,7 +7181,7 @@ namespace Mono.CSharp } } - return new DynamicInvocation (expr as ATypeNameExpression, args, loc).Resolve (ec); + return new DynamicInvocation (expr as ATypeNameExpression, args, conditional_access_receiver, loc).Resolve (ec); } protected virtual MethodGroupExpr DoResolveOverload (ResolveContext ec) @@ -9720,6 +9719,8 @@ namespace Mono.CSharp return retval; } + var cma = this as ConditionalMemberAccess; + MemberExpr me; TypeSpec expr_type = expr.Type; if (expr_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { @@ -9729,10 +9730,13 @@ namespace Mono.CSharp Arguments args = new Arguments (1); args.Add (new Argument (expr)); + + if (cma != null) + return new DynamicConditionalMemberBinder (Name, args, loc); + return new DynamicMemberBinder (Name, args, loc); } - var cma = this as ConditionalMemberAccess; if (cma != null) { if (!IsNullPropagatingValid (expr.Type)) { expr.Error_OperatorCannotBeApplied (rc, loc, "?", expr.Type); @@ -10863,7 +10867,7 @@ namespace Mono.CSharp args.AddRange (arguments); best_candidate = null; - return new DynamicIndexBinder (args, loc); + return new DynamicIndexBinder (args, conditional_access_receiver, ConditionalAccess, loc); } // @@ -11671,7 +11675,6 @@ namespace Mono.CSharp args.Add (new Argument (rc.CurrentInitializerVariable)); target = new DynamicMemberBinder (Name, args, loc); } else { - var member = MemberLookup (rc, false, t, Name, 0, MemberLookupRestrictions.ExactArity, loc); if (member == null) { member = Expression.MemberLookup (rc, true, t, Name, 0, MemberLookupRestrictions.ExactArity, loc); diff --git a/mcs/tests/dtest-null-operator-01.cs b/mcs/tests/dtest-null-operator-01.cs new file mode 100644 index 00000000000..de6013ca044 --- /dev/null +++ b/mcs/tests/dtest-null-operator-01.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +class X +{ + public string Prop; + public A A = new A (); +} + +class A +{ + public string B; +} + +class MainClass +{ + static void NullCheckTest () + { + dynamic dyn = null; + dynamic res; + + res = dyn?.ToString (); + res = dyn?.GetHashCode (); + res = dyn?.DD.Length?.GetHashCode (); + + dyn?.ToString (); + + res = dyn?.Prop; + res = dyn?.Prop?.Prop2; + res = dyn?[0]; + } + + static void Test_1 () + { + dynamic dyn = new X (); + dynamic res; + + res = dyn.Prop?.Length; + res = dyn.A.B?.C.D?.E.F; + } + + static dynamic Test_2 (IEnumerable<dynamic> collection) + { + return collection?.FirstOrDefault ().Length; + } + + public static void Main () + { + NullCheckTest (); + + Test_1 (); + Test_2 (null); + } +} + +
\ No newline at end of file diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml index 56be2d26469..dcd5f610003 100644 --- a/mcs/tests/ver-il-net_4_x.xml +++ b/mcs/tests/ver-il-net_4_x.xml @@ -3468,6 +3468,35 @@ </method> </type> </test> + <test name="dtest-null-operator-01.cs"> + <type name="X"> + <method name="Void .ctor()" attrs="6278"> + <size>18</size> + </method> + </type> + <type name="A"> + <method name="Void .ctor()" attrs="6278"> + <size>7</size> + </method> + </type> + <type name="MainClass"> + <method name="Void NullCheckTest()" attrs="145"> + <size>890</size> + </method> + <method name="Void Test_1()" attrs="145"> + <size>672</size> + </method> + <method name="System.Object Test_2(System.Collections.Generic.IEnumerable`1[System.Object])" attrs="145"> + <size>103</size> + </method> + <method name="Void Main()" attrs="150"> + <size>19</size> + </method> + <method name="Void .ctor()" attrs="6278"> + <size>7</size> + </method> + </type> + </test> <test name="dtest-optional-01.cs"> <type name="G`1[T]"> <method name="System.Object M1(T)" attrs="134"> diff --git a/mcs/tools/corcompare/Util.cs b/mcs/tools/corcompare/Util.cs index 782280535dd..fa643ed20f8 100644 --- a/mcs/tools/corcompare/Util.cs +++ b/mcs/tools/corcompare/Util.cs @@ -83,5 +83,112 @@ namespace CorCompare { { return att.AttributeType.Resolve (); } + + static bool IsOverride (MethodDefinition method) + { + return method.IsVirtual && !method.IsNewSlot; + } + + public static MethodDefinition GetBaseMethodInTypeHierarchy (MethodDefinition method) + { + if (!IsOverride (method)) + return method; + + var @base = GetBaseType (method.DeclaringType); + while (@base != null) { + MethodDefinition base_method = TryMatchMethod (@base.Resolve (), method); + if (base_method != null) + return GetBaseMethodInTypeHierarchy (base_method) ?? base_method; + + @base = GetBaseType (@base); + } + + return method; + } + + static MethodDefinition TryMatchMethod (TypeDefinition type, MethodDefinition method) + { + if (!type.HasMethods) + return null; + + foreach (MethodDefinition candidate in type.Methods) + if (MethodMatch (candidate, method)) + return candidate; + + return null; + } + + static bool MethodMatch (MethodDefinition candidate, MethodDefinition method) + { + if (!candidate.IsVirtual) + return false; + + if (candidate.Name != method.Name) + return false; + + if (!TypeMatch (candidate.ReturnType, method.ReturnType)) + return false; + + if (candidate.Parameters.Count != method.Parameters.Count) + return false; + + for (int i = 0; i < candidate.Parameters.Count; i++) + if (!TypeMatch (candidate.Parameters [i].ParameterType, method.Parameters [i].ParameterType)) + return false; + + return true; + } + + public static bool TypeMatch (IModifierType a, IModifierType b) + { + if (!TypeMatch (a.ModifierType, b.ModifierType)) + return false; + + return TypeMatch (a.ElementType, b.ElementType); + } + + public static bool TypeMatch (TypeSpecification a, TypeSpecification b) + { + if (a is GenericInstanceType) + return TypeMatch ((GenericInstanceType) a, (GenericInstanceType) b); + + if (a is IModifierType) + return TypeMatch ((IModifierType) a, (IModifierType) b); + + return TypeMatch (a.ElementType, b.ElementType); + } + + public static bool TypeMatch (GenericInstanceType a, GenericInstanceType b) + { + if (!TypeMatch (a.ElementType, b.ElementType)) + return false; + + if (a.GenericArguments.Count != b.GenericArguments.Count) + return false; + + if (a.GenericArguments.Count == 0) + return true; + + for (int i = 0; i < a.GenericArguments.Count; i++) + if (!TypeMatch (a.GenericArguments [i], b.GenericArguments [i])) + return false; + + return true; + } + + public static bool TypeMatch (TypeReference a, TypeReference b) + { + if (a is GenericParameter) + return true; + + if (a is TypeSpecification || b is TypeSpecification) { + if (a.GetType () != b.GetType ()) + return false; + + return TypeMatch ((TypeSpecification) a, (TypeSpecification) b); + } + + return a.FullName == b.FullName; + } } } diff --git a/mcs/tools/corcompare/WellFormedXmlWriter.cs b/mcs/tools/corcompare/WellFormedXmlWriter.cs index 334c57fab33..8f663c657c1 100644 --- a/mcs/tools/corcompare/WellFormedXmlWriter.cs +++ b/mcs/tools/corcompare/WellFormedXmlWriter.cs @@ -15,11 +15,6 @@ namespace CorCompare { public class WellFormedXmlWriter : DefaultXmlWriter { - public static bool IsValid (int ch) - { - return !IsInvalid (ch); - } - public static bool IsInvalid (int ch) { switch (ch) { diff --git a/mcs/tools/corcompare/mono-api-html/ApiChange.cs b/mcs/tools/corcompare/mono-api-html/ApiChange.cs index 72e905b8c58..1d902cacfad 100644 --- a/mcs/tools/corcompare/mono-api-html/ApiChange.cs +++ b/mcs/tools/corcompare/mono-api-html/ApiChange.cs @@ -21,15 +21,9 @@ namespace Xamarin.ApiDiff public ApiChange AppendAdded (string text, bool breaking = false) { - if (breaking) - Member.Append ("<span style='text-decoration: underline'>"); - if (State.Colorize) - Member.Append ("<span style='color:green'>"); + Member.Append ("<span class='added ").Append (breaking ? "added-breaking-inline" : string.Empty).Append ("'>"); Member.Append (text); - if (State.Colorize) - Member.Append ("</span>"); - if (breaking) - Member.Append ("</span>"); + Member.Append ("</span>"); Breaking |= breaking; AnyChange = true; return this; @@ -37,12 +31,8 @@ namespace Xamarin.ApiDiff public ApiChange AppendRemoved (string text, bool breaking = true) { - Member.Append ("<span style='text-decoration: line-through'>"); - if (State.Colorize && breaking) - Member.Append ("<span style='color:red'>"); + Member.Append ("<span class='removed removed-inline ").Append (breaking ? "removed-breaking-inline" : string.Empty).Append ("'>"); Member.Append (text); - if (State.Colorize && breaking) - Member.Append ("</span>"); Member.Append ("</span>"); Breaking |= breaking; AnyChange = true; diff --git a/mcs/tools/corcompare/mono-api-html/ApiDiff.cs b/mcs/tools/corcompare/mono-api-html/ApiDiff.cs index 69454e1184c..8fe27844852 100644 --- a/mcs/tools/corcompare/mono-api-html/ApiDiff.cs +++ b/mcs/tools/corcompare/mono-api-html/ApiDiff.cs @@ -168,12 +168,98 @@ namespace Xamarin.ApiDiff { } if (diffHtml.Length > 0) { using (var file = new StreamWriter (diff)) { + file.WriteLine ("<div>"); + if (State.Colorize) { + file.WriteLine ("<style scoped>"); + file.WriteLine ("\t.obsolete { color: gray; }"); + file.WriteLine ("\t.added { color: green; }"); + file.WriteLine ("\t.removed-inline { text-decoration: line-through; }"); + file.WriteLine ("\t.removed-breaking-inline { color: red;}"); + file.WriteLine ("\t.added-breaking-inline { text-decoration: underline; }"); + file.WriteLine ("\t.nonbreaking { color: black; }"); + file.WriteLine ("\t.breaking { color: red; }"); + file.WriteLine ("</style>"); + } + file.WriteLine ( +@"<script type=""text/javascript""> + // Only some elements have 'data-is-[non-]breaking' attributes. Here we + // iterate over all descendents elements, and set 'data-is-[non-]breaking' + // depending on whether there are any descendents with that attribute. + function propagateDataAttribute (element) + { + if (element.hasAttribute ('data-is-propagated')) + return; + + var i; + var any_breaking = element.hasAttribute ('data-is-breaking'); + var any_non_breaking = element.hasAttribute ('data-is-non-breaking'); + for (i = 0; i < element.children.length; i++) { + var el = element.children [i]; + propagateDataAttribute (el); + any_breaking |= el.hasAttribute ('data-is-breaking'); + any_non_breaking |= el.hasAttribute ('data-is-non-breaking'); + } + + if (any_breaking) + element.setAttribute ('data-is-breaking', null); + else if (any_non_breaking) + element.setAttribute ('data-is-non-breaking', null); + element.setAttribute ('data-is-propagated', null); + } + + function hideNonBreakingChanges () + { + var topNodes = document.querySelectorAll ('[data-is-topmost]'); + var n; + var i; + for (n = 0; n < topNodes.length; n++) { + propagateDataAttribute (topNodes [n]); + var elements = topNodes [n].querySelectorAll ('[data-is-non-breaking]'); + for (i = 0; i < elements.length; i++) { + var el = elements [i]; + if (!el.hasAttribute ('data-original-display')) + el.setAttribute ('data-original-display', el.style.display); + el.style.display = 'none'; + } + } + + var links = document.getElementsByClassName ('hide-nonbreaking'); + for (i = 0; i < links.length; i++) + links [i].style.display = 'none'; + links = document.getElementsByClassName ('restore-nonbreaking'); + for (i = 0; i < links.length; i++) + links [i].style.display = ''; + } + + function showNonBreakingChanges () + { + var elements = document.querySelectorAll ('[data-original-display]'); + var i; + for (i = 0; i < elements.length; i++) { + var el = elements [i]; + el.style.display = el.getAttribute ('data-original-display'); + } + + var links = document.getElementsByClassName ('hide-nonbreaking'); + for (i = 0; i < links.length; i++) + links [i].style.display = ''; + links = document.getElementsByClassName ('restore-nonbreaking'); + for (i = 0; i < links.length; i++) + links [i].style.display = 'none'; + } +</script>"); if (ac.SourceAssembly == ac.TargetAssembly) { file.WriteLine ("<h1>{0}.dll</h1>", ac.SourceAssembly); } else { file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly); } + file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>"); + file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>"); + file.WriteLine ("<br/>"); + file.WriteLine ("<div data-is-topmost>"); file.Write (diffHtml); + file.WriteLine ("</div> <!-- end topmost div -->"); + file.WriteLine ("</div>"); } } } else { diff --git a/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs b/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs index ff5326d9c8b..adbd862eb92 100644 --- a/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs @@ -57,7 +57,7 @@ namespace Xamarin.ApiDiff { State.Assembly = current.GetAttribute ("name"); } - public override void Added (XElement target) + public override void Added (XElement target, bool wasParentAdded) { // one assembly per xml file } diff --git a/mcs/tools/corcompare/mono-api-html/ClassComparer.cs b/mcs/tools/corcompare/mono-api-html/ClassComparer.cs index 761f87a5552..a3399fbef04 100644 --- a/mcs/tools/corcompare/mono-api-html/ClassComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/ClassComparer.cs @@ -67,16 +67,18 @@ namespace Xamarin.ApiDiff { Compare (s.Elements ("class"), t.Elements ("class")); } - public override void Added (XElement target) + public override void Added (XElement target, bool wasParentAdded) { string name = target.Attribute ("name").Value; if (State.IgnoreNew.Any (re => re.IsMatch (name))) return; + Output.WriteLine ("<div> <!-- start type {0} -->", name); Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, name); - Output.WriteLine (State.Colorize ? "<pre style='color: green'>" : "<pre>"); + Output.WriteLine ("<pre class='added' data-is-non-breaking>"); State.Indent = 0; AddedInner (target); Output.WriteLine ("</pre>"); + Output.WriteLine ("</div> <!-- end type {0} -->", name); } public void AddedInner (XElement target) @@ -149,7 +151,7 @@ namespace Xamarin.ApiDiff { if (t != null) { Indent ().WriteLine ("\t// constructors"); foreach (var ctor in t.Elements ("constructor")) - ccomparer.Added (ctor); + ccomparer.Added (ctor, true); } t = target.Element ("fields"); @@ -159,28 +161,28 @@ namespace Xamarin.ApiDiff { else SetContext (target); foreach (var field in t.Elements ("field")) - fcomparer.Added (field); + fcomparer.Added (field, true); } t = target.Element ("properties"); if (t != null) { Indent ().WriteLine ("\t// properties"); foreach (var property in t.Elements ("property")) - pcomparer.Added (property); + pcomparer.Added (property, true); } t = target.Element ("events"); if (t != null) { Indent ().WriteLine ("\t// events"); foreach (var evnt in t.Elements ("event")) - ecomparer.Added (evnt); + ecomparer.Added (evnt, true); } t = target.Element ("methods"); if (t != null) { Indent ().WriteLine ("\t// methods"); foreach (var method in t.Elements ("method")) - mcomparer.Added (method); + mcomparer.Added (method, true); } t = target.Element ("classes"); @@ -226,17 +228,17 @@ namespace Xamarin.ApiDiff { var s = (Output as StringWriter).ToString (); State.Output = output; if (s.Length > 0) { + var tn = GetTypeName (target); + Output.WriteLine ("<!-- start type {0} --> <div>", tn); Output.WriteLine ("<h3>Type Changed: {0}.{1}</h3>", State.Namespace, GetTypeName (target)); Output.WriteLine (s); + Output.WriteLine ("</div> <!-- end type {0} -->", tn); } } public override void Removed (XElement source) { - var style = string.Empty; - if (State.Colorize) - style = "style='color: red'"; - Output.Write ("<h3>Removed Type <span {0}>{1}.{2}</span></h3>", style, State.Namespace, GetTypeName (source)); + Output.Write ("<h3>Removed Type <span class='breaking' data-is-breaking>{0}.{1}</span></h3>", State.Namespace, GetTypeName (source)); } public virtual string GetTypeName (XElement type) diff --git a/mcs/tools/corcompare/mono-api-html/Comparer.cs b/mcs/tools/corcompare/mono-api-html/Comparer.cs index 8c692a03a9a..4210b9b95fb 100644 --- a/mcs/tools/corcompare/mono-api-html/Comparer.cs +++ b/mcs/tools/corcompare/mono-api-html/Comparer.cs @@ -48,7 +48,7 @@ namespace Xamarin.ApiDiff { return State.Output; } - public abstract void Added (XElement target); + public abstract void Added (XElement target, bool wasParentAdded); public abstract void Modified (XElement source, XElement target, ApiChanges changes); public abstract void Removed (XElement source); @@ -90,7 +90,7 @@ namespace Xamarin.ApiDiff { if (target != null) { foreach (var item in target) { SetContext (item); - Added (item); + Added (item, false); } } } diff --git a/mcs/tools/corcompare/mono-api-html/FieldComparer.cs b/mcs/tools/corcompare/mono-api-html/FieldComparer.cs index bb4f6c6b075..a2b0225b448 100644 --- a/mcs/tools/corcompare/mono-api-html/FieldComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/FieldComparer.cs @@ -189,8 +189,9 @@ namespace Xamarin.ApiDiff { { first = true; if (State.BaseType == "System.Enum") { + Output.WriteLine ("<div>"); Output.WriteLine ("<p>Added value{0}:</p>", list.Count () > 1 ? "s" : String.Empty); - Output.WriteLine (State.Colorize ? "<pre style='color: green'>" : "<pre>"); + Output.WriteLine ("<pre class='added' data-is-non-breaking>"); } else { base.BeforeAdding (list); } @@ -201,7 +202,7 @@ namespace Xamarin.ApiDiff { first = true; if (State.BaseType == "System.Enum") { Output.WriteLine ("<p>Removed value{0}:</p>", list.Count () > 1 ? "s" : String.Empty); - Output.WriteLine (State.Colorize ? "<pre style='color: red'>" : "<pre>"); + Output.WriteLine ("<pre class='removed' data-is-breaking>"); } else { base.BeforeRemoving (list); } diff --git a/mcs/tools/corcompare/mono-api-html/MemberComparer.cs b/mcs/tools/corcompare/mono-api-html/MemberComparer.cs index dee528ebc7a..d12d86625c2 100644 --- a/mcs/tools/corcompare/mono-api-html/MemberComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/MemberComparer.cs @@ -41,6 +41,11 @@ namespace Xamarin.ApiDiff { public abstract string GroupName { get; } public abstract string ElementName { get; } + protected virtual bool IsBreakingRemoval (XElement e) + { + return true; + } + public void Compare (XElement source, XElement target) { var s = source.Element (GroupName); @@ -124,7 +129,7 @@ namespace Xamarin.ApiDiff { BeforeAdding (elements); a = true; } - Added (item); + Added (item, false); } if (a) AfterAdding (); @@ -136,8 +141,10 @@ namespace Xamarin.ApiDiff { Output.WriteLine ("<p>{0}:</p>", changes.Key); Output.WriteLine ("<pre>"); foreach (var element in changes.Value) { + Output.Write ("<div {0}>", element.Breaking ? "data-is-breaking" : "data-is-non-breaking"); foreach (var line in element.Member.ToString ().Split ('\n')) Output.WriteLine ("\t{0}", line); + Output.Write ("</div>"); } Output.WriteLine ("</pre>"); @@ -192,24 +199,28 @@ namespace Xamarin.ApiDiff { public virtual void BeforeAdding (IEnumerable<XElement> list) { first = true; + Output.WriteLine ("<div>"); Output.WriteLine ("<p>Added {0}:</p>", list.Count () > 1 ? GroupName : ElementName); - - bool isInterface = list.Count () > 0 && IsInInterface (list.First ()); - Output.WriteLine (State.Colorize ? string.Format ("<pre style='color: {0}'>", isInterface ? "red" : "green") : "<pre>"); + Output.WriteLine ("<pre>"); } - public override void Added (XElement target) + public override void Added (XElement target, bool wasParentAdded) { var o = GetObsoleteMessage (target); if (!first && (o.Length > 0)) Output.WriteLine (); - Indent ().WriteLine ("\t{0}{1}", o, GetDescription (target)); + Indent (); + bool isInterfaceBreakingChange = !wasParentAdded && IsInInterface (target); + Output.Write ("\t<span class='added added-{0} {1}' {2}>", ElementName, isInterfaceBreakingChange ? "breaking" : string.Empty, isInterfaceBreakingChange ? "data-is-breaking" : "data-is-non-breaking"); + Output.Write ("{0}{1}", o, GetDescription (target)); + Output.WriteLine ("</span>"); first = false; } public virtual void AfterAdding () { - Output.WriteLine ("</pre>");; + Output.WriteLine ("</pre>"); + Output.WriteLine ("</div>"); } public override void Modified (XElement source, XElement target, ApiChanges change) @@ -220,7 +231,7 @@ namespace Xamarin.ApiDiff { { first = true; Output.WriteLine ("<p>Removed {0}:</p>\n", list.Count () > 1 ? GroupName : ElementName); - Output.WriteLine (State.Colorize ? "<pre style='color: red'>" : "<pre>"); + Output.WriteLine ("<pre>"); } public override void Removed (XElement source) @@ -228,7 +239,13 @@ namespace Xamarin.ApiDiff { var o = GetObsoleteMessage (source); if (!first && (o.Length > 0)) Output.WriteLine (); - Indent ().WriteLine ("\t{0}{1}", o, GetDescription (source)); + + bool is_breaking = IsBreakingRemoval (source); + + Indent (); + Output.Write ("\t<span class='removed removed-{0} {2}' {1}>", ElementName, is_breaking ? "data-is-breaking" : "data-is-non-breaking", is_breaking ? "breaking" : string.Empty); + Output.Write ("{0}{1}", o, GetDescription (source)); + Output.WriteLine ("</span>"); first = false; } @@ -558,15 +575,13 @@ namespace Xamarin.ApiDiff { return; // neither is obsolete var change = new ApiChange (); change.Header = "Obsoleted " + GroupName; - if (State.Colorize) - change.Append ("<span style='color:gray'>"); + change.Append (string.Format ("<span class='obsolete obsolete-{0}' data-is-non-breaking>", ElementName)); change.Append ("[Obsolete ("); if (tgtObsolete != string.Empty) change.Append ("\"").Append (tgtObsolete).Append ("\""); change.Append (")]\n"); change.Append (GetDescription (target)); - if (State.Colorize) - change.Append ("</span>"); + change.Append ("</span>"); change.AnyChange = true; changes.Add (source, target, change); } else if (tgtObsolete == null) { diff --git a/mcs/tools/corcompare/mono-api-html/MethodComparer.cs b/mcs/tools/corcompare/mono-api-html/MethodComparer.cs index 1dffa17dfcc..4c893e757ec 100644 --- a/mcs/tools/corcompare/mono-api-html/MethodComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/MethodComparer.cs @@ -26,6 +26,7 @@ using System; using System.Linq; +using System.Reflection; using System.Xml.Linq; namespace Xamarin.ApiDiff { @@ -62,5 +63,15 @@ namespace Xamarin.ApiDiff { return eGPs.Count () == sGPs.Count (); } } + + protected override bool IsBreakingRemoval (XElement e) + { + // Removing virtual methods that override another method is not a breaking change. + var is_override = e.Attribute ("is-override"); + if (is_override != null) + return is_override.Value != "true"; + + return true; // all other removals are breaking changes + } } }
\ No newline at end of file diff --git a/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs b/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs index 258374c6b9d..063e34ecbf7 100644 --- a/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs +++ b/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs @@ -55,17 +55,19 @@ namespace Xamarin.ApiDiff { State.Namespace = current.Attribute ("name").Value; } - public override void Added (XElement target) + public override void Added (XElement target, bool wasParentAdded) { string name = target.Attribute ("name").Value; if (State.IgnoreNew.Any (re => re.IsMatch (name))) return; + Output.WriteLine ("<!-- start namespace {0} --> <div> ", name); Output.WriteLine ("<h2>New Namespace {0}</h2>", name); Output.WriteLine (); // list all new types foreach (var addedType in target.Element ("classes").Elements ("class")) - comparer.Added (addedType); + comparer.Added (addedType, true); + Output.WriteLine ("</div> <!-- end namespace {0} -->", name); Output.WriteLine (); } @@ -78,18 +80,24 @@ namespace Xamarin.ApiDiff { var s = Output.ToString (); State.Output = output; if (s.Length > 0) { - Output.WriteLine ("<h2>Namespace {0}</h2>", target.Attribute ("name").Value); + var name = target.Attribute ("name").Value; + Output.WriteLine ("<!-- start namespace {0} --> <div> ", name); + Output.WriteLine ("<h2>Namespace {0}</h2>", name); Output.WriteLine (s); + Output.WriteLine ("</div> <!-- end namespace {0} -->", name); } } public override void Removed (XElement source) { - Output.WriteLine ("<h2>Removed Namespace {0}</h2>", source.Attribute ("name").Value); + var name = source.Attribute ("name").Value; + Output.WriteLine ("<!-- start namespace {0} --> <div>", name); + Output.WriteLine ("<h2>Removed Namespace {0}</h2>", name); Output.WriteLine (); // list all removed types foreach (var removedType in source.Element ("classes").Elements ("class")) comparer.Removed (removedType); + Output.WriteLine ("</div> <!-- end namespace {0} -->", name); Output.WriteLine (); } } diff --git a/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj b/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj index 286a4d0192a..6ac0f241ade 100644 --- a/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj +++ b/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj @@ -19,7 +19,6 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> - <Commandlineparameters>/Developer/MonoTouch/Source/monotouch/tools/apidiff/references/compat/monotouch.xml /Developer/MonoTouch/Source/monotouch/tools/apidiff/temp/compat/monotouch.xml -i INSObjectProtocol /tmp/diff.html</Commandlineparameters> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>full</DebugType> diff --git a/mcs/tools/corcompare/mono-api-info.cs b/mcs/tools/corcompare/mono-api-info.cs index c43437fe40d..8b1ad945095 100644 --- a/mcs/tools/corcompare/mono-api-info.cs +++ b/mcs/tools/corcompare/mono-api-info.cs @@ -31,6 +31,7 @@ namespace CorCompare bool showHelp = false; AbiMode = false; FollowForwarders = false; + string output = null; var acoll = new AssemblyCollection (); @@ -52,6 +53,9 @@ namespace CorCompare { "r=", "Read and register the file {ASSEMBLY}, and add the directory containing ASSEMBLY to the search path.", v => TypeHelper.Resolver.ResolveFile (v) }, + { "o=", + "The output file. If not specified the output will be written to stdout.", + v => output = v }, { "h|?|help", "Show this message and exit.", v => showHelp = v != null }, @@ -89,14 +93,24 @@ namespace CorCompare } } - XmlDocument doc = new XmlDocument (); - acoll.Document = doc; - acoll.DoOutput (); - - var writer = new WellFormedXmlWriter (new XmlTextWriter (Console.Out) { Formatting = Formatting.Indented }); - XmlNode decl = doc.CreateXmlDeclaration ("1.0", "utf-8", null); - doc.InsertBefore (decl, doc.DocumentElement); - doc.WriteTo (writer); + StreamWriter outputStream = null; + if (!string.IsNullOrEmpty (output)) + outputStream = new StreamWriter (output); + try { + TextWriter outStream = outputStream ?? Console.Out; + var settings = new XmlWriterSettings (); + settings.Indent = true; + var textWriter = XmlWriter.Create (outStream, settings); + var writer = new WellFormedXmlWriter (textWriter); + writer.WriteStartDocument (); + acoll.Writer = writer; + acoll.DoOutput (); + writer.WriteEndDocument (); + writer.Flush (); + } finally { + if (outputStream != null) + outputStream.Dispose (); + } return 0; } @@ -105,6 +119,7 @@ namespace CorCompare } public class Utils { + static char[] CharsToCleanup = new char[] { '<', '>', '/' }; public static string CleanupTypeName (TypeReference type) { @@ -113,13 +128,33 @@ namespace CorCompare public static string CleanupTypeName (string t) { - return t.Replace ('<', '[').Replace ('>', ']').Replace ('/', '+'); + if (t.IndexOfAny (CharsToCleanup) == -1) + return t; + var sb = new StringBuilder (t.Length); + for (int i = 0; i < t.Length; i++) { + var ch = t [i]; + switch (ch) { + case '<': + sb.Append ('['); + break; + case '>': + sb.Append (']'); + break; + case '/': + sb.Append ('+'); + break; + default: + sb.Append (ch); + break; + } + } + return sb.ToString (); } } class AssemblyCollection { - XmlDocument document; + XmlWriter writer; List<AssemblyDefinition> assemblies = new List<AssemblyDefinition> (); public AssemblyCollection () @@ -140,19 +175,19 @@ namespace CorCompare public void DoOutput () { - if (document == null) + if (writer == null) throw new InvalidOperationException ("Document not set"); - XmlNode nassemblies = document.CreateElement ("assemblies", null); - document.AppendChild (nassemblies); + writer.WriteStartElement ("assemblies"); foreach (AssemblyDefinition a in assemblies) { - AssemblyData data = new AssemblyData (document, nassemblies, a); + AssemblyData data = new AssemblyData (writer, a); data.DoOutput (); } + writer.WriteEndElement (); } - public XmlDocument Document { - set { document = value; } + public XmlWriter Writer { + set { writer = value; } } AssemblyDefinition LoadAssembly (string assembly) @@ -171,22 +206,18 @@ namespace CorCompare abstract class BaseData { - protected XmlDocument document; - protected XmlNode parent; + protected XmlWriter writer; - protected BaseData (XmlDocument doc, XmlNode parent) + protected BaseData (XmlWriter writer) { - this.document = doc; - this.parent = parent; + this.writer = writer; } public abstract void DoOutput (); - protected void AddAttribute (XmlNode node, string name, string value) + protected void AddAttribute (string name, string value) { - XmlAttribute attr = document.CreateAttribute (name); - attr.Value = value; - node.Attributes.Append (attr); + writer.WriteAttributeString (name, value); } } @@ -194,38 +225,34 @@ namespace CorCompare { AssemblyDefinition ass; - public TypeForwardedToData (XmlDocument document, XmlNode parent, AssemblyDefinition ass) - : base (document, parent) + public TypeForwardedToData (XmlWriter writer, AssemblyDefinition ass) + : base (writer) { this.ass = ass; } public override void DoOutput () { - XmlNode natts = parent.SelectSingleNode("attributes"); - if (natts == null) { - natts = document.CreateElement ("attributes", null); - parent.AppendChild (natts); - } - foreach (ExportedType type in ass.MainModule.ExportedTypes) { if (((uint)type.Attributes & 0x200000u) == 0) continue; - XmlNode node = document.CreateElement ("attribute"); - AddAttribute (node, "name", typeof (TypeForwardedToAttribute).FullName); - XmlNode properties = node.AppendChild (document.CreateElement ("properties")); - XmlNode property = properties.AppendChild (document.CreateElement ("property")); - AddAttribute (property, "name", "Destination"); - AddAttribute (property, "value", Utils.CleanupTypeName (type.FullName)); - natts.AppendChild (node); + writer.WriteStartElement ("attribute"); + AddAttribute ("name", typeof (TypeForwardedToAttribute).FullName); + writer.WriteStartElement ("properties"); + writer.WriteStartElement ("property"); + AddAttribute ("name", "Destination"); + AddAttribute ("value", Utils.CleanupTypeName (type.FullName)); + writer.WriteEndElement (); // properties + writer.WriteEndElement (); // properties + writer.WriteEndElement (); // attribute } } - public static void OutputForwarders (XmlDocument document, XmlNode parent, AssemblyDefinition ass) + public static void OutputForwarders (XmlWriter writer, AssemblyDefinition ass) { - TypeForwardedToData tftd = new TypeForwardedToData (document, parent, ass); + TypeForwardedToData tftd = new TypeForwardedToData (writer, ass); tftd.DoOutput (); } } @@ -234,28 +261,23 @@ namespace CorCompare { AssemblyDefinition ass; - public AssemblyData (XmlDocument document, XmlNode parent, AssemblyDefinition ass) - : base (document, parent) + public AssemblyData (XmlWriter writer, AssemblyDefinition ass) + : base (writer) { this.ass = ass; } public override void DoOutput () { - if (document == null) + if (writer == null) throw new InvalidOperationException ("Document not set"); - XmlNode nassembly = document.CreateElement ("assembly", null); + writer.WriteStartElement ("assembly"); AssemblyNameDefinition aname = ass.Name; - AddAttribute (nassembly, "name", aname.Name); - AddAttribute (nassembly, "version", aname.Version.ToString ()); - parent.AppendChild (nassembly); + AddAttribute ("name", aname.Name); + AddAttribute ("version", aname.Version.ToString ()); - if (!Driver.FollowForwarders) { - TypeForwardedToData.OutputForwarders (document, nassembly, ass); - } - - AttributeData.OutputAttributes (document, nassembly, ass); + AttributeData.OutputAttributes (writer, ass); var types = new List<TypeDefinition> (); if (ass.MainModule.Types != null) { @@ -273,17 +295,16 @@ namespace CorCompare } if (types.Count == 0) { + writer.WriteEndElement (); // assembly return; } types.Sort (TypeReferenceComparer.Default); - XmlNode nss = document.CreateElement ("namespaces", null); - nassembly.AppendChild (nss); + writer.WriteStartElement ("namespaces"); string current_namespace = "$%&$&"; - XmlNode ns = null; - XmlNode classes = null; + bool in_namespace = false; foreach (TypeDefinition t in types) { if (string.IsNullOrEmpty (t.Namespace)) continue; @@ -296,16 +317,30 @@ namespace CorCompare if (t.Namespace != current_namespace) { current_namespace = t.Namespace; - ns = document.CreateElement ("namespace", null); - AddAttribute (ns, "name", current_namespace); - nss.AppendChild (ns); - classes = document.CreateElement ("classes", null); - ns.AppendChild (classes); + if (in_namespace) { + writer.WriteEndElement (); // classes + writer.WriteEndElement (); // namespace + } else { + in_namespace = true; + } + writer.WriteStartElement ("namespace"); + AddAttribute ("name", current_namespace); + writer.WriteStartElement ("classes"); } - TypeData bd = new TypeData (document, classes, t); + TypeData bd = new TypeData (writer, t); bd.DoOutput (); + + } + + if (in_namespace) { + writer.WriteEndElement (); // classes + writer.WriteEndElement (); // namespace } + + writer.WriteEndElement (); // namespaces + + writer.WriteEndElement (); // assembly } } @@ -313,31 +348,42 @@ namespace CorCompare { MemberReference [] members; - public MemberData (XmlDocument document, XmlNode parent, MemberReference [] members) - : base (document, parent) + public MemberData (XmlWriter writer, MemberReference [] members) + : base (writer) { this.members = members; } + protected virtual ICustomAttributeProvider GetAdditionalCustomAttributeProvider (MemberReference member) + { + return null; + } + public override void DoOutput () { - XmlNode mclass = document.CreateElement (ParentTag, null); - parent.AppendChild (mclass); + writer.WriteStartElement (ParentTag); foreach (MemberReference member in members) { - XmlNode mnode = document.CreateElement (Tag, null); - mclass.AppendChild (mnode); - AddAttribute (mnode, "name", GetName (member)); + writer.WriteStartElement (Tag); + AddAttribute ("name", GetName (member)); if (!NoMemberAttributes) - AddAttribute (mnode, "attrib", GetMemberAttributes (member)); + AddAttribute ("attrib", GetMemberAttributes (member)); + AddExtraAttributes (member); - AttributeData.OutputAttributes (document, mnode, (ICustomAttributeProvider) member); + AttributeData.OutputAttributes (writer, (ICustomAttributeProvider) member, GetAdditionalCustomAttributeProvider (member)); - AddExtraData (mnode, member); + AddExtraData (member); + writer.WriteEndElement (); // Tag } + + writer.WriteEndElement (); // ParentTag } - protected virtual void AddExtraData (XmlNode p, MemberReference memberDefenition) + protected virtual void AddExtraData (MemberReference memberDefenition) + { + } + + protected virtual void AddExtraAttributes (MemberReference memberDefinition) { } @@ -364,39 +410,42 @@ namespace CorCompare get { return "NoTAG"; } } - public static void OutputGenericParameters (XmlDocument document, XmlNode nclass, IGenericParameterProvider provider) + public static void OutputGenericParameters (XmlWriter writer, IGenericParameterProvider provider) { if (provider.GenericParameters.Count == 0) return; var gparameters = provider.GenericParameters; - XmlElement ngeneric = document.CreateElement ("generic-parameters"); - nclass.AppendChild (ngeneric); + writer.WriteStartElement ("generic-parameters"); foreach (GenericParameter gp in gparameters) { - XmlElement nparam = document.CreateElement ("generic-parameter"); - nparam.SetAttribute ("name", gp.Name); - nparam.SetAttribute ("attributes", ((int) gp.Attributes).ToString ()); - - AttributeData.OutputAttributes (document, nparam, gp); + writer.WriteStartElement ("generic-parameter"); + writer.WriteAttributeString ("name", gp.Name); + writer.WriteAttributeString ("attributes", ((int) gp.Attributes).ToString ()); - ngeneric.AppendChild (nparam); + AttributeData.OutputAttributes (writer, gp); var constraints = gp.Constraints; - if (constraints.Count == 0) + if (constraints.Count == 0) { + writer.WriteEndElement (); // generic-parameter continue; + } - XmlElement nconstraint = document.CreateElement ("generic-parameter-constraints"); + writer.WriteStartElement ("generic-parameter-constraints"); foreach (TypeReference constraint in constraints) { - XmlElement ncons = document.CreateElement ("generic-parameter-constraint"); - ncons.SetAttribute ("name", Utils.CleanupTypeName (constraint)); - nconstraint.AppendChild (ncons); + writer.WriteStartElement ("generic-parameter-constraint"); + writer.WriteAttributeString ("name", Utils.CleanupTypeName (constraint)); + writer.WriteEndElement (); // generic-parameter-constraint } - nparam.AppendChild (nconstraint); + writer.WriteEndElement (); // generic-parameter-constraints + + writer.WriteEndElement (); // generic-parameter } + + writer.WriteEndElement (); // generic-parameters } } @@ -404,112 +453,107 @@ namespace CorCompare { TypeDefinition type; - public TypeData (XmlDocument document, XmlNode parent, TypeDefinition type) - : base (document, parent, null) + public TypeData (XmlWriter writer, TypeDefinition type) + : base (writer, null) { this.type = type; } public override void DoOutput () { - if (document == null) + if (writer == null) throw new InvalidOperationException ("Document not set"); - XmlNode nclass = document.CreateElement ("class", null); - AddAttribute (nclass, "name", type.Name); + writer.WriteStartElement ("class"); + AddAttribute ("name", type.Name); string classType = GetClassType (type); - AddAttribute (nclass, "type", classType); + AddAttribute ("type", classType); if (type.BaseType != null) - AddAttribute (nclass, "base", Utils.CleanupTypeName (type.BaseType)); + AddAttribute ("base", Utils.CleanupTypeName (type.BaseType)); if (type.IsSealed) - AddAttribute (nclass, "sealed", "true"); + AddAttribute ("sealed", "true"); if (type.IsAbstract) - AddAttribute (nclass, "abstract", "true"); + AddAttribute ("abstract", "true"); if ( (type.Attributes & TypeAttributes.Serializable) != 0 || type.IsEnum) - AddAttribute (nclass, "serializable", "true"); + AddAttribute ("serializable", "true"); string charSet = GetCharSet (type); - AddAttribute (nclass, "charset", charSet); + AddAttribute ("charset", charSet); string layout = GetLayout (type); if (layout != null) - AddAttribute (nclass, "layout", layout); + AddAttribute ("layout", layout); if (type.PackingSize >= 0) { - AddAttribute (nclass, "pack", type.PackingSize.ToString ()); + AddAttribute ("pack", type.PackingSize.ToString ()); } if (type.ClassSize >= 0) { - AddAttribute (nclass, "size", type.ClassSize.ToString ()); + AddAttribute ("size", type.ClassSize.ToString ()); } - parent.AppendChild (nclass); + if (type.IsEnum) { + var value_type = GetEnumValueField (type); + if (value_type == null) + throw new NotSupportedException (); - AttributeData.OutputAttributes (document, nclass, type); + AddAttribute ("enumtype", Utils.CleanupTypeName (value_type.FieldType)); + } - XmlNode ifaces = null; + AttributeData.OutputAttributes (writer, type); - foreach (TypeReference iface in TypeHelper.GetInterfaces (type).OrderBy (s => s.FullName)) { - if (!TypeHelper.IsPublic (iface)) - // we're only interested in public interfaces - continue; + var ifaces = TypeHelper.GetInterfaces (type). + Where ((iface) => TypeHelper.IsPublic (iface)). // we're only interested in public interfaces + OrderBy (s => s.FullName, StringComparer.Ordinal); - if (ifaces == null) { - ifaces = document.CreateElement ("interfaces", null); - nclass.AppendChild (ifaces); + if (ifaces.Any ()) { + writer.WriteStartElement ("interfaces"); + foreach (TypeReference iface in ifaces) { + writer.WriteStartElement ("interface"); + AddAttribute ("name", Utils.CleanupTypeName (iface)); + writer.WriteEndElement (); // interface } - - XmlNode iface_node = document.CreateElement ("interface", null); - AddAttribute (iface_node, "name", Utils.CleanupTypeName (iface)); - ifaces.AppendChild (iface_node); + writer.WriteEndElement (); // interfaces } - MemberData.OutputGenericParameters (document, nclass, type); + MemberData.OutputGenericParameters (writer, type); ArrayList members = new ArrayList (); FieldDefinition [] fields = GetFields (type); if (fields.Length > 0) { Array.Sort (fields, MemberReferenceComparer.Default); - FieldData fd = new FieldData (document, nclass, fields); + FieldData fd = new FieldData (writer, fields); members.Add (fd); } - if (type.IsEnum) { - var value_type = GetEnumValueField (type); - if (value_type == null) - throw new NotSupportedException (); - - AddAttribute (nclass, "enumtype", Utils.CleanupTypeName (value_type.FieldType)); - } - if (!Driver.AbiMode) { MethodDefinition [] ctors = GetConstructors (type); if (ctors.Length > 0) { Array.Sort (ctors, MethodDefinitionComparer.Default); - members.Add (new ConstructorData (document, nclass, ctors)); + members.Add (new ConstructorData (writer, ctors)); } PropertyDefinition[] properties = GetProperties (type); if (properties.Length > 0) { Array.Sort (properties, PropertyDefinitionComparer.Default); - members.Add (new PropertyData (document, nclass, properties)); + members.Add (new PropertyData (writer, properties)); } EventDefinition [] events = GetEvents (type); if (events.Length > 0) { Array.Sort (events, MemberReferenceComparer.Default); - members.Add (new EventData (document, nclass, events)); + members.Add (new EventData (writer, events)); } MethodDefinition [] methods = GetMethods (type); if (methods.Length > 0) { Array.Sort (methods, MethodDefinitionComparer.Default); - members.Add (new MethodData (document, nclass, methods)); + members.Add (new MethodData (writer, methods)); } } @@ -535,13 +579,15 @@ namespace CorCompare var nestedArray = nested.ToArray (); Array.Sort (nestedArray, TypeReferenceComparer.Default); - XmlNode classes = document.CreateElement ("classes", null); - nclass.AppendChild (classes); + writer.WriteStartElement ("classes"); foreach (TypeDefinition t in nestedArray) { - TypeData td = new TypeData (document, classes, t); + TypeData td = new TypeData (writer, t); td.DoOutput (); } + writer.WriteEndElement (); // classes } + + writer.WriteEndElement (); // class } static FieldReference GetEnumValueField (TypeDefinition type) @@ -674,7 +720,7 @@ namespace CorCompare var methods = type.Methods;//type.GetMethods (flags); foreach (MethodDefinition method in methods) { - if (method.IsSpecialName && !method.Name.StartsWith ("op_")) + if (method.IsSpecialName && !method.Name.StartsWith ("op_", StringComparison.Ordinal)) continue; // we're only interested in public or protected members @@ -746,8 +792,8 @@ namespace CorCompare class FieldData : MemberData { - public FieldData (XmlDocument document, XmlNode parent, FieldDefinition [] members) - : base (document, parent, members) + public FieldData (XmlWriter writer, FieldDefinition [] members) + : base (writer, members) { } @@ -763,11 +809,12 @@ namespace CorCompare return ((int) field.Attributes).ToString (CultureInfo.InvariantCulture); } - protected override void AddExtraData (XmlNode p, MemberReference memberDefenition) + protected override void AddExtraAttributes (MemberReference memberDefinition) { - base.AddExtraData (p, memberDefenition); - FieldDefinition field = (FieldDefinition) memberDefenition; - AddAttribute (p, "fieldtype", Utils.CleanupTypeName (field.FieldType)); + base.AddExtraAttributes (memberDefinition); + + FieldDefinition field = (FieldDefinition) memberDefinition; + AddAttribute ("fieldtype", Utils.CleanupTypeName (field.FieldType)); if (field.IsLiteral) { object value = field.Constant;//object value = field.GetValue (null); @@ -779,11 +826,11 @@ namespace CorCompare // stringValue = ((Enum) value).ToString ("D", CultureInfo.InvariantCulture); //} //else { - stringValue = Convert.ToString (value, CultureInfo.InvariantCulture); + stringValue = Convert.ToString (value, CultureInfo.InvariantCulture); //} if (stringValue != null) - AddAttribute (p, "value", stringValue); + AddAttribute ("value", stringValue); } } @@ -798,8 +845,8 @@ namespace CorCompare class PropertyData : MemberData { - public PropertyData (XmlDocument document, XmlNode parent, PropertyDefinition [] members) - : base (document, parent, members) + public PropertyData (XmlWriter writer, PropertyDefinition [] members) + : base (writer, members) { } @@ -809,15 +856,13 @@ namespace CorCompare return prop.Name; } - protected override void AddExtraData (XmlNode p, MemberReference memberDefenition) + MethodDefinition [] GetMethods (PropertyDefinition prop, out bool haveParameters) { - base.AddExtraData (p, memberDefenition); - PropertyDefinition prop = (PropertyDefinition) memberDefenition; - AddAttribute (p, "ptype", Utils.CleanupTypeName (prop.PropertyType)); MethodDefinition _get = prop.GetMethod; MethodDefinition _set = prop.SetMethod; bool haveGet = (_get != null && TypeData.MustDocumentMethod(_get)); bool haveSet = (_set != null && TypeData.MustDocumentMethod(_set)); + haveParameters = haveGet || (haveSet && _set.Parameters.Count > 1); MethodDefinition [] methods; if (haveGet && haveSet) { @@ -828,16 +873,41 @@ namespace CorCompare methods = new MethodDefinition [] { _set }; } else { //odd - return; + return null; } - if (haveGet || _set.Parameters.Count > 1) { + return methods; + } + + protected override void AddExtraAttributes (MemberReference memberDefinition) + { + base.AddExtraAttributes (memberDefinition); + + PropertyDefinition prop = (PropertyDefinition) memberDefinition; + AddAttribute ("ptype", Utils.CleanupTypeName (prop.PropertyType)); + + bool haveParameters; + MethodDefinition [] methods = GetMethods ((PropertyDefinition) memberDefinition, out haveParameters); + + if (methods != null && haveParameters) { string parms = Parameters.GetSignature (methods [0].Parameters); if (!string.IsNullOrEmpty (parms)) - AddAttribute (p, "params", parms); + AddAttribute ("params", parms); } - MethodData data = new MethodData (document, p, methods); + } + + protected override void AddExtraData (MemberReference memberDefenition) + { + base.AddExtraData (memberDefenition); + + bool haveParameters; + MethodDefinition [] methods = GetMethods ((PropertyDefinition) memberDefenition, out haveParameters); + + if (methods == null) + return; + + MethodData data = new MethodData (writer, methods); //data.NoMemberAttributes = true; data.DoOutput (); } @@ -859,8 +929,8 @@ namespace CorCompare class EventData : MemberData { - public EventData (XmlDocument document, XmlNode parent, EventDefinition [] members) - : base (document, parent, members) + public EventData (XmlWriter writer, EventDefinition [] members) + : base (writer, members) { } @@ -876,11 +946,12 @@ namespace CorCompare return ((int) evt.Attributes).ToString (CultureInfo.InvariantCulture); } - protected override void AddExtraData (XmlNode p, MemberReference memberDefenition) + protected override void AddExtraAttributes (MemberReference memberDefinition) { - base.AddExtraData (p, memberDefenition); - EventDefinition evt = (EventDefinition) memberDefenition; - AddAttribute (p, "eventtype", Utils.CleanupTypeName (evt.EventType)); + base.AddExtraAttributes (memberDefinition); + + EventDefinition evt = (EventDefinition) memberDefinition; + AddAttribute ("eventtype", Utils.CleanupTypeName (evt.EventType)); } public override string ParentTag { @@ -896,8 +967,8 @@ namespace CorCompare { bool noAtts; - public MethodData (XmlDocument document, XmlNode parent, MethodDefinition [] members) - : base (document, parent, members) + public MethodData (XmlWriter writer, MethodDefinition [] members) + : base (writer, members) { } @@ -916,34 +987,59 @@ namespace CorCompare return ((int)( method.Attributes)).ToString (CultureInfo.InvariantCulture); } - protected override void AddExtraData (XmlNode p, MemberReference memberDefenition) + protected override ICustomAttributeProvider GetAdditionalCustomAttributeProvider (MemberReference member) { - base.AddExtraData (p, memberDefenition); + var mbase = (MethodDefinition) member; + return mbase.MethodReturnType; + } - if (!(memberDefenition is MethodDefinition)) - return; + protected override void AddExtraAttributes (MemberReference memberDefinition) + { + base.AddExtraAttributes (memberDefinition); - MethodDefinition mbase = (MethodDefinition) memberDefenition; + if (!(memberDefinition is MethodDefinition)) + return; - ParameterData parms = new ParameterData (document, p, mbase.Parameters); - parms.DoOutput (); + MethodDefinition mbase = (MethodDefinition) memberDefinition; if (mbase.IsAbstract) - AddAttribute (p, "abstract", "true"); + AddAttribute ("abstract", "true"); if (mbase.IsVirtual) - AddAttribute (p, "virtual", "true"); + AddAttribute ("virtual", "true"); if (mbase.IsFinal && mbase.IsVirtual && mbase.IsReuseSlot) - AddAttribute (p, "sealed", "true"); + AddAttribute ("sealed", "true"); if (mbase.IsStatic) - AddAttribute (p, "static", "true"); - + AddAttribute ("static", "true"); + var baseMethod = TypeHelper.GetBaseMethodInTypeHierarchy (mbase); + if (baseMethod != null && baseMethod != mbase) { + // This indicates whether this method is an override of another method. + // This information is not necessarily available in the api info for any + // particular assembly, because a method is only overriding another if + // there is a base virtual function with the same signature, and that + // base method can come from another assembly. + AddAttribute ("is-override", "true"); + } string rettype = Utils.CleanupTypeName (mbase.MethodReturnType.ReturnType); if (rettype != "System.Void" || !mbase.IsConstructor) - AddAttribute (p, "returntype", (rettype)); + AddAttribute ("returntype", (rettype)); +// +// if (mbase.MethodReturnType.HasCustomAttributes) +// AttributeData.OutputAttributes (writer, mbase.MethodReturnType); + } - AttributeData.OutputAttributes (document, p, mbase.MethodReturnType); + protected override void AddExtraData (MemberReference memberDefenition) + { + base.AddExtraData (memberDefenition); + + if (!(memberDefenition is MethodDefinition)) + return; - MemberData.OutputGenericParameters (document, p, mbase); + MethodDefinition mbase = (MethodDefinition) memberDefenition; + + ParameterData parms = new ParameterData (writer, mbase.Parameters); + parms.DoOutput (); + + MemberData.OutputGenericParameters (writer, mbase); } public override bool NoMemberAttributes { @@ -962,8 +1058,8 @@ namespace CorCompare class ConstructorData : MethodData { - public ConstructorData (XmlDocument document, XmlNode parent, MethodDefinition [] members) - : base (document, parent, members) + public ConstructorData (XmlWriter writer, MethodDefinition [] members) + : base (writer, members) { } @@ -980,23 +1076,20 @@ namespace CorCompare { private IList<ParameterDefinition> parameters; - public ParameterData (XmlDocument document, XmlNode parent, IList<ParameterDefinition> parameters) - : base (document, parent) + public ParameterData (XmlWriter writer, IList<ParameterDefinition> parameters) + : base (writer) { this.parameters = parameters; } public override void DoOutput () { - XmlNode parametersNode = document.CreateElement ("parameters"); - parent.AppendChild (parametersNode); - + writer.WriteStartElement ("parameters"); foreach (ParameterDefinition parameter in parameters) { - XmlNode paramNode = document.CreateElement ("parameter"); - parametersNode.AppendChild (paramNode); - AddAttribute (paramNode, "name", parameter.Name); - AddAttribute (paramNode, "position", parameter.Method.Parameters.IndexOf(parameter).ToString(CultureInfo.InvariantCulture)); - AddAttribute (paramNode, "attrib", ((int) parameter.Attributes).ToString()); + writer.WriteStartElement ("parameter"); + AddAttribute ("name", parameter.Name); + AddAttribute ("position", parameter.Method.Parameters.IndexOf(parameter).ToString(CultureInfo.InvariantCulture)); + AddAttribute ("attrib", ((int) parameter.Attributes).ToString()); string direction = "in"; @@ -1004,102 +1097,111 @@ namespace CorCompare direction = parameter.IsOut ? "out" : "ref"; TypeReference t = parameter.ParameterType; - AddAttribute (paramNode, "type", Utils.CleanupTypeName (t)); + AddAttribute ("type", Utils.CleanupTypeName (t)); if (parameter.IsOptional) { - AddAttribute (paramNode, "optional", "true"); + AddAttribute ("optional", "true"); if (parameter.HasConstant) - AddAttribute (paramNode, "defaultValue", parameter.Constant == null ? "NULL" : parameter.Constant.ToString ()); + AddAttribute ("defaultValue", parameter.Constant == null ? "NULL" : parameter.Constant.ToString ()); } if (direction != "in") - AddAttribute (paramNode, "direction", direction); + AddAttribute ("direction", direction); - AttributeData.OutputAttributes (document, paramNode, parameter); + AttributeData.OutputAttributes (writer, parameter); + writer.WriteEndElement (); // parameter } + writer.WriteEndElement (); // parameters } } - class AttributeData : BaseData + class AttributeData { - IList<CustomAttribute> atts; - - AttributeData (XmlDocument doc, XmlNode parent, IList<CustomAttribute> attributes) - : base (doc, parent) + public static void DoOutput (XmlWriter writer, IList<ICustomAttributeProvider> providers) { - atts = attributes; - } - - public override void DoOutput () - { - if (document == null) + if (writer == null) throw new InvalidOperationException ("Document not set"); - if (atts == null || atts.Count == 0) + if (providers == null || providers.Count == 0) + return; + + if (!providers.Any ((provider) => provider != null && provider.HasCustomAttributes)) return; - XmlNode natts = parent.SelectSingleNode("attributes"); - if (natts == null) { - natts = document.CreateElement ("attributes", null); - parent.AppendChild (natts); - } + writer.WriteStartElement ("attributes"); - foreach (var att in atts.OrderBy ((a) => a.Constructor.DeclaringType.FullName)) { - string attName = Utils.CleanupTypeName (att.Constructor.DeclaringType); - if (SkipAttribute (att)) + foreach (var provider in providers) { + if (provider == null) + continue; + + if (!provider.HasCustomAttributes) continue; - XmlNode node = document.CreateElement ("attribute"); - AddAttribute (node, "name", attName); - - XmlNode properties = null; - - Dictionary<string, object> attribute_mapping = CreateAttributeMapping (att); - - foreach (string name in attribute_mapping.Keys) { - if (name == "TypeId") - continue; - - if (properties == null) { - properties = node.AppendChild (document.CreateElement ("properties")); - } - - object o = attribute_mapping [name]; - - XmlNode n = properties.AppendChild (document.CreateElement ("property")); - AddAttribute (n, "name", name); - if (o == null) { - AddAttribute (n, "value", "null"); - continue; + var ass = provider as AssemblyDefinition; + if (ass != null && !Driver.FollowForwarders) + TypeForwardedToData.OutputForwarders (writer, ass); + + var attributes = provider.CustomAttributes. + Where ((att) => !SkipAttribute (att)). + OrderBy ((a) => a.Constructor.DeclaringType.FullName, StringComparer.Ordinal); + + foreach (var att in attributes) { + string attName = Utils.CleanupTypeName (att.Constructor.DeclaringType); + + writer.WriteStartElement ("attribute"); + writer.WriteAttributeString ("name", attName); + + var attribute_mapping = CreateAttributeMapping (att); + + if (attribute_mapping != null) { + var mapping = attribute_mapping.Where ((attr) => attr.Key != "TypeId"); + if (mapping.Any ()) { + writer.WriteStartElement ("properties"); + foreach (var kvp in mapping) { + string name = kvp.Key; + object o = kvp.Value; + + writer.WriteStartElement ("property"); + writer.WriteAttributeString ("name", name); + + if (o == null) { + writer.WriteAttributeString ("value", "null"); + } else { + string value = o.ToString (); + if (attName.EndsWith ("GuidAttribute", StringComparison.Ordinal)) + value = value.ToUpper (); + writer.WriteAttributeString ("value", value); + } + + writer.WriteEndElement (); // property + } + writer.WriteEndElement (); // properties + } } - - string value = o.ToString (); - if (attName.EndsWith ("GuidAttribute")) - value = value.ToUpper (); - AddAttribute (n, "value", value); + writer.WriteEndElement (); // attribute } - - natts.AppendChild (node); } + + writer.WriteEndElement (); // attributes } static Dictionary<string, object> CreateAttributeMapping (CustomAttribute attribute) { - var mapping = new Dictionary<string, object> (); + Dictionary<string, object> mapping = null; - PopulateMapping (mapping, attribute); + PopulateMapping (ref mapping, attribute); var constructor = attribute.Constructor.Resolve (); if (constructor == null || !constructor.HasParameters) return mapping; - PopulateMapping (mapping, constructor, attribute); + PopulateMapping (ref mapping, constructor, attribute); return mapping; } - static void PopulateMapping (Dictionary<string, object> mapping, CustomAttribute attribute) + static void PopulateMapping (ref Dictionary<string, object> mapping, CustomAttribute attribute) { if (!attribute.HasProperties) return; @@ -1111,13 +1213,15 @@ namespace CorCompare if (arg.Value is CustomAttributeArgument) arg = (CustomAttributeArgument) arg.Value; + if (mapping == null) + mapping = new Dictionary<string, object> (StringComparer.Ordinal); mapping.Add (name, GetArgumentValue (arg.Type, arg.Value)); } } static Dictionary<FieldReference, int> CreateArgumentFieldMapping (MethodDefinition constructor) { - Dictionary<FieldReference, int> field_mapping = new Dictionary<FieldReference, int> (); + Dictionary<FieldReference, int> field_mapping = null; int? argument = null; @@ -1145,6 +1249,9 @@ namespace CorCompare if (!argument.HasValue) break; + if (field_mapping == null) + field_mapping = new Dictionary<FieldReference, int> (); + if (!field_mapping.ContainsKey (field)) field_mapping.Add (field, (int) argument - 1); @@ -1158,7 +1265,7 @@ namespace CorCompare static Dictionary<PropertyDefinition, FieldReference> CreatePropertyFieldMapping (TypeDefinition type) { - Dictionary<PropertyDefinition, FieldReference> property_mapping = new Dictionary<PropertyDefinition, FieldReference> (); + Dictionary<PropertyDefinition, FieldReference> property_mapping = null; foreach (PropertyDefinition property in type.Properties) { if (property.GetMethod == null) @@ -1174,6 +1281,8 @@ namespace CorCompare if (field.DeclaringType.FullName != type.FullName) continue; + if (property_mapping == null) + property_mapping = new Dictionary<PropertyDefinition, FieldReference> (); property_mapping.Add (property, field); break; } @@ -1182,7 +1291,7 @@ namespace CorCompare return property_mapping; } - static void PopulateMapping (Dictionary<string, object> mapping, MethodDefinition constructor, CustomAttribute attribute) + static void PopulateMapping (ref Dictionary<string, object> mapping, MethodDefinition constructor, CustomAttribute attribute) { if (!constructor.HasBody) return; @@ -1195,6 +1304,8 @@ namespace CorCompare new DecimalConstantAttribute ((byte) ca[0].Value, (byte) ca[1].Value, (int) ca[2].Value, (int) ca[3].Value, (int) ca[4].Value) : new DecimalConstantAttribute ((byte) ca[0].Value, (byte) ca[1].Value, (uint) ca[2].Value, (uint) ca[3].Value, (uint) ca[4].Value); + if (mapping == null) + mapping = new Dictionary<string, object> (StringComparer.Ordinal); mapping.Add ("Value", dca.Value); return; case "System.ComponentModel.BindableAttribute": @@ -1202,6 +1313,8 @@ namespace CorCompare break; if (constructor.Parameters[0].ParameterType == constructor.Module.TypeSystem.Boolean) { + if (mapping == null) + mapping = new Dictionary<string, object> (StringComparer.Ordinal); mapping.Add ("Bindable", ca[0].Value); } else { throw new NotImplementedException (); @@ -1211,18 +1324,24 @@ namespace CorCompare } var field_mapping = CreateArgumentFieldMapping (constructor); - var property_mapping = CreatePropertyFieldMapping ((TypeDefinition) constructor.DeclaringType); - - foreach (var pair in property_mapping) { - int argument; - if (!field_mapping.TryGetValue (pair.Value, out argument)) - continue; - - var ca_arg = ca [argument]; - if (ca_arg.Value is CustomAttributeArgument) - ca_arg = (CustomAttributeArgument) ca_arg.Value; - - mapping.Add (pair.Key.Name, GetArgumentValue (ca_arg.Type, ca_arg.Value)); + if (field_mapping != null) { + var property_mapping = CreatePropertyFieldMapping ((TypeDefinition) constructor.DeclaringType); + + if (property_mapping != null) { + foreach (var pair in property_mapping) { + int argument; + if (!field_mapping.TryGetValue (pair.Value, out argument)) + continue; + + var ca_arg = ca [argument]; + if (ca_arg.Value is CustomAttributeArgument) + ca_arg = (CustomAttributeArgument)ca_arg.Value; + + if (mapping == null) + mapping = new Dictionary<string, object> (StringComparer.Ordinal); + mapping.Add (pair.Key.Name, GetArgumentValue (ca_arg.Type, ca_arg.Value)); + } + } } } @@ -1330,19 +1449,15 @@ namespace CorCompare static bool SkipAttribute (CustomAttribute attribute) { - var type_name = Utils.CleanupTypeName (attribute.Constructor.DeclaringType); - - return !TypeHelper.IsPublic (attribute) - || type_name.EndsWith ("TODOAttribute"); + if (!TypeHelper.IsPublic (attribute)) + return true; + + return attribute.Constructor.DeclaringType.Name.EndsWith ("TODOAttribute", StringComparison.Ordinal); } - public static void OutputAttributes (XmlDocument doc, XmlNode parent, ICustomAttributeProvider provider) + public static void OutputAttributes (XmlWriter writer, params ICustomAttributeProvider[] providers) { - if (!provider.HasCustomAttributes) - return; - - AttributeData ad = new AttributeData (doc, parent, provider.CustomAttributes); - ad.DoOutput (); + AttributeData.DoOutput (writer, providers); } } @@ -1414,7 +1529,7 @@ namespace CorCompare public int Compare (PropertyDefinition ma, PropertyDefinition mb) { - int res = String.Compare (ma.Name, mb.Name); + int res = String.Compare (ma.Name, mb.Name, StringComparison.Ordinal); if (res != 0) return res; @@ -1439,7 +1554,7 @@ namespace CorCompare { MethodDefinition ma = (MethodDefinition) a; MethodDefinition mb = (MethodDefinition) b; - int res = String.Compare (ma.Name, mb.Name); + int res = String.Compare (ma.Name, mb.Name, StringComparison.Ordinal); if (res != 0) return res; @@ -1468,7 +1583,7 @@ namespace CorCompare string siga = Parameters.GetSignature (pia); string sigb = Parameters.GetSignature (pib); - return String.Compare (siga, sigb); + return String.Compare (siga, sigb, StringComparison.Ordinal); } } } diff --git a/mcs/tools/nunit-lite/Makefile b/mcs/tools/nunit-lite/Makefile index 87a82157ae7..078a7ebdc0e 100644 --- a/mcs/tools/nunit-lite/Makefile +++ b/mcs/tools/nunit-lite/Makefile @@ -2,3 +2,5 @@ thisdir = tools/nunit-lite SUBDIRS = NUnitLite nunit-lite-console include ../../build/rules.make +all-local-aot: + diff --git a/mcs/tools/nunit-lite/nunit-lite-console/Makefile b/mcs/tools/nunit-lite/nunit-lite-console/Makefile index 5694be3b16d..920f74d29a5 100644 --- a/mcs/tools/nunit-lite/nunit-lite-console/Makefile +++ b/mcs/tools/nunit-lite/nunit-lite-console/Makefile @@ -7,7 +7,3 @@ LOCAL_MCS_FLAGS = /r:nunitlite.dll include ../../../build/executable.make -all-local-aot: - $(TEST_RUNTIME) $(AOT_BUILD) ../../class/lib/$(PROFILE)/nunit-lite-console.exe - - diff --git a/mcs/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config b/mcs/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config index 352f7249246..2ccc2b9ae68 100644 --- a/mcs/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config +++ b/mcs/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config @@ -1,6 +1,12 @@ <?xml version="1.0" encoding="Windows-1252"?>
<configuration>
<runtime>
+ <!--
+ This is necessary to prevent the runner from terminating on
+ any unhandled exceptions which occur. We account for unhandled exceptions on
+ other threads with an event handler, but would still be terminated using the
+ new behavior.
+ -->
<legacyUnhandledExceptionPolicy enabled="1" />
</runtime>
</configuration>
diff --git a/mcs/tools/xbuild/frameworks/net_2.0.xml b/mcs/tools/xbuild/frameworks/net_2.0.xml index 2b8bd9b1dff..4265fcc50ee 100644 --- a/mcs/tools/xbuild/frameworks/net_2.0.xml +++ b/mcs/tools/xbuild/frameworks/net_2.0.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 2.0" TargetFrameworkDirectory="..\..\..\..\2.0"> +<FileList Name=".NET Framework 2.0" TargetFrameworkDirectory="..\..\..\..\2.0-api"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_3.0.xml b/mcs/tools/xbuild/frameworks/net_3.0.xml index ae06c8818c1..1a56750d51b 100644 --- a/mcs/tools/xbuild/frameworks/net_3.0.xml +++ b/mcs/tools/xbuild/frameworks/net_3.0.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 3.0" TargetFrameworkDirectory="..\..\..\..\2.0"> +<FileList Name=".NET Framework 3.0" TargetFrameworkDirectory="..\..\..\..\2.0-api"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_3.5.xml b/mcs/tools/xbuild/frameworks/net_3.5.xml index 122584299a1..3e711014768 100644 --- a/mcs/tools/xbuild/frameworks/net_3.5.xml +++ b/mcs/tools/xbuild/frameworks/net_3.5.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 3.5" TargetFrameworkDirectory="..\..\..\..\3.5" IncludeFramework="v3.0"> +<FileList Name=".NET Framework 3.5" TargetFrameworkDirectory="..\..\..\..\3.5-api" IncludeFramework="v3.0"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_4.0.xml b/mcs/tools/xbuild/frameworks/net_4.0.xml index 701279497fd..841cc536e62 100644 --- a/mcs/tools/xbuild/frameworks/net_4.0.xml +++ b/mcs/tools/xbuild/frameworks/net_4.0.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 4" TargetFrameworkDirectory="..\..\..\..\4.0"> +<FileList Name=".NET Framework 4" TargetFrameworkDirectory="..\..\..\..\4.0-api"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_4.0_client.xml b/mcs/tools/xbuild/frameworks/net_4.0_client.xml index 951933a2f9a..d3fd85ccc0b 100644 --- a/mcs/tools/xbuild/frameworks/net_4.0_client.xml +++ b/mcs/tools/xbuild/frameworks/net_4.0_client.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 4 Client Profile" TargetFrameworkDirectory="..\..\..\..\..\..\4.0"> +<FileList Name=".NET Framework 4 Client Profile" TargetFrameworkDirectory="..\..\..\..\..\..\4.0-api"> <File AssemblyName="System" Version="4.0.0.0" PublicKeyToken="b77a5c561934e089" /> <File AssemblyName="System.Activities" Version="4.0.0.0" PublicKeyToken="31bf3856ad364e35" /> <File AssemblyName="System.Dynamic" Version="4.0.0.0" PublicKeyToken="b03f5f7f11d50a3a" /> diff --git a/mcs/tools/xbuild/frameworks/net_4.5.1.xml b/mcs/tools/xbuild/frameworks/net_4.5.1.xml index c82a4a69902..d9f2d5ed386 100644 --- a/mcs/tools/xbuild/frameworks/net_4.5.1.xml +++ b/mcs/tools/xbuild/frameworks/net_4.5.1.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 4.5.1" TargetFrameworkDirectory="..\..\..\..\4.5"> +<FileList Name=".NET Framework 4.5.1" TargetFrameworkDirectory="..\..\..\..\4.5-api"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_4.5.2.xml b/mcs/tools/xbuild/frameworks/net_4.5.2.xml index ec5a0e96e13..bf92045249c 100644 --- a/mcs/tools/xbuild/frameworks/net_4.5.2.xml +++ b/mcs/tools/xbuild/frameworks/net_4.5.2.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 4.5.2" TargetFrameworkDirectory="..\..\..\..\4.5"> +<FileList Name=".NET Framework 4.5.2" TargetFrameworkDirectory="..\..\..\..\4.5-api"> </FileList> diff --git a/mcs/tools/xbuild/frameworks/net_4.5.xml b/mcs/tools/xbuild/frameworks/net_4.5.xml index 2fa28c496ff..2741a7830e6 100644 --- a/mcs/tools/xbuild/frameworks/net_4.5.xml +++ b/mcs/tools/xbuild/frameworks/net_4.5.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> -<FileList Name=".NET Framework 4.5" TargetFrameworkDirectory="..\..\..\..\4.5"> +<FileList Name=".NET Framework 4.5" TargetFrameworkDirectory="..\..\..\..\4.5-api"> </FileList> diff --git a/mono/metadata/coree.c b/mono/metadata/coree.c index 7c4be6afe7e..c2e47b9ca7b 100644 --- a/mono/metadata/coree.c +++ b/mono/metadata/coree.c @@ -143,7 +143,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void) MonoMethod* method; guint32 entry; gchar* file_name; - gchar* error; + gchar* corlib_version_error; int argc; gunichar2** argvw; gchar** argv; @@ -153,9 +153,9 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void) init_from_coree = TRUE; domain = mono_runtime_load (file_name, NULL); - error = (gchar*) mono_check_corlib_version (); - if (error) { - g_free (error); + corlib_version_error = (gchar*) mono_check_corlib_version (); + if (corlib_version_error) { + g_free (corlib_version_error); g_free (file_name); MessageBox (NULL, L"Corlib not in sync with this runtime.", NULL, MB_ICONERROR); mono_runtime_quit (); diff --git a/mono/mini/exceptions-s390x.c b/mono/mini/exceptions-s390x.c index 83d5f6b1368..18e51bd94ee 100644 --- a/mono/mini/exceptions-s390x.c +++ b/mono/mini/exceptions-s390x.c @@ -59,6 +59,7 @@ #include "mini.h" #include "mini-s390x.h" +#include "support-s390x.h" /*========================= End of Includes ========================*/ @@ -306,12 +307,8 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info, s390_stg (code, s390_r14, 0, STK_BASE, 0); s390_lgr (code, s390_r3, s390_r2); if (corlib) { - s390_basr (code, s390_r13, 0); - s390_j (code, 10); - s390_llong(code, mono_defaults.exception_class->image); - s390_llong(code, mono_exception_from_token); - s390_lg (code, s390_r2, 0, s390_r13, 4); - s390_lg (code, s390_r1, 0, s390_r13, 12); + S390_SET (code, s390_r1, (guint8 *)mono_exception_from_token); + S390_SET (code, s390_r2, (guint8 *)mono_defaults.exception_class->image); s390_basr (code, s390_r14, s390_r1); } @@ -354,12 +351,9 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info, s390_la (code, s390_r7, 0, STK_BASE, S390_THROWSTACK_ACCREGS); s390_stg (code, s390_r7, 0, STK_BASE, S390_THROWSTACK_ACCPRM); s390_stfpc(code, STK_BASE, S390_THROWSTACK_FPCPRM+4); + S390_SET (code, s390_r1, (guint8 *)throw_exception); s390_lghi (code, s390_r7, rethrow); s390_stg (code, s390_r7, 0, STK_BASE, S390_THROWSTACK_RETHROW); - s390_basr (code, s390_r13, 0); - s390_j (code, 6); - s390_llong(code, throw_exception); - s390_lg (code, s390_r1, 0, s390_r13, 4); s390_basr (code, s390_r14, s390_r1); /* we should never reach this breakpoint */ s390_break (code); diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 1f823fccbac..f049daca1ca 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -1266,11 +1266,13 @@ mono_get_native_calli_wrapper (MonoImage *image, MonoMethodSignature *sig, gpoin } static MonoMethod* -constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg) +constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg, MonoError *error) { MonoMethod *m; int vt_slot, iface_offset; + mono_error_init (error); + if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) { MonoObject *this_obj; @@ -1326,11 +1328,17 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k MonoObject* mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gboolean deref_arg, gpointer *args) { + MonoError error; MonoMethod *m; gpointer this_arg; gpointer new_args [16]; - m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg); + m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg, &error); + if (!mono_error_ok (&error)) { + mono_error_set_pending_exception (&error); + return NULL; + } + if (!m) return NULL; if (args && deref_arg) { diff --git a/mono/mini/mini-s390x.c b/mono/mini/mini-s390x.c index 8c27ecee488..368c3bc9882 100644 --- a/mono/mini/mini-s390x.c +++ b/mono/mini/mini-s390x.c @@ -275,6 +275,7 @@ if (ins->inst_target_bb->native_offset) { \ #include "jit-icalls.h" #include "ir-emit.h" #include "trace.h" +#include "mini-gc.h" /*========================= End of Includes ========================*/ @@ -577,6 +578,7 @@ emit_unwind_regs(MonoCompile *cfg, guint8 *code, int start, int end, long offset for (i = start; i < end; i++) { mono_emit_unwind_op_offset (cfg, code, i, offset); + mini_gc_set_slot_type_from_cfa (cfg, offset, SLOT_NOREF); offset += sizeof(gulong); } } @@ -1310,6 +1312,7 @@ mono_arch_init (void) { guint8 *code; + mono_set_partial_sharing_supported (FALSE); mono_os_mutex_init_recursive (&mini_arch_mutex); ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ); @@ -5573,7 +5576,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) CallInfo *cinfo; int tracing = 0, argsClobbered = 0, - lmfOffset; + lmfOffset, + fpOffset; cfg->code_size = 512; @@ -5592,6 +5596,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) emit_unwind_regs(cfg, code, s390_r6, s390_r14, S390_REG_SAVE_OFFSET); s390_stmg (code, s390_r6, s390_r14, STK_BASE, S390_REG_SAVE_OFFSET); mono_emit_unwind_op_offset (cfg, code, s390_r14, S390_RET_ADDR_OFFSET); + mini_gc_set_slot_type_from_cfa (cfg, S390_RET_ADDR_OFFSET, SLOT_NOREF); if (cfg->arch.bkchain_reg != -1) s390_lgr (code, cfg->arch.bkchain_reg, STK_BASE); @@ -5778,6 +5783,12 @@ mono_arch_emit_prolog (MonoCompile *cfg) s390_stmg (code, s390_r2, s390_r6, s390_r13, G_STRUCT_OFFSET(MonoLMF, pregs[0])); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[0]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[1]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[2]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[3]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, pregs[4]), SLOT_NOREF); + /*---------------------------------------------------------------*/ /* On return from this call r2 have the address of the &lmf */ /*---------------------------------------------------------------*/ @@ -5801,6 +5812,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) /*---------------------------------------------------------------*/ s390_stg (code, s390_r2, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, lmf_addr)); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF); /*---------------------------------------------------------------*/ /* Get current lmf */ @@ -5817,6 +5829,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) /*---------------------------------------------------------------*/ s390_stg (code, s390_r0, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, previous_lmf)); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF); /*---------------------------------------------------------------*/ /* save method info */ @@ -5824,6 +5837,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) S390_SET (code, s390_r1, method); s390_stg (code, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, method)); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF); /*---------------------------------------------------------------*/ /* save the current IP */ @@ -5831,15 +5845,32 @@ mono_arch_emit_prolog (MonoCompile *cfg) s390_stg (code, STK_BASE, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, ebp)); s390_basr (code, s390_r1, 0); s390_stg (code, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, eip)); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF); /*---------------------------------------------------------------*/ /* Save general and floating point registers */ /*---------------------------------------------------------------*/ s390_stmg (code, s390_r2, s390_r12, s390_r13, G_STRUCT_OFFSET(MonoLMF, gregs[2])); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[0]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[1]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[2]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[3]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[4]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[5]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[6]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[7]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[8]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[9]), SLOT_NOREF); + mini_gc_set_slot_type_from_fp (cfg, lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, gregs[10]), SLOT_NOREF); + + fpOffset = lmfOffset + MONO_STRUCT_OFFSET (MonoLMF, fregs[0]); for (i = 0; i < 16; i++) { s390_std (code, i, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, fregs[i])); + mini_gc_set_slot_type_from_fp (cfg, fpOffset, SLOT_NOREF); + fpOffset += sizeof(double); } /*---------------------------------------------------------------*/ diff --git a/mono/mini/tramp-s390x.c b/mono/mini/tramp-s390x.c index 4a604f97e16..eb61dc05cd4 100644 --- a/mono/mini/tramp-s390x.c +++ b/mono/mini/tramp-s390x.c @@ -48,6 +48,7 @@ #include "mini.h" #include "mini-s390x.h" #include "support-s390x.h" +#include "jit-icalls.h" /*========================= End of Includes ========================*/ @@ -57,6 +58,7 @@ typedef struct { guint8 stk[S390_MINIMAL_STACK_SIZE]; /* Standard s390x stack */ + guint64 saveFn; /* Call address */ struct MonoLMF LMF; /* LMF */ } trampStack_t; @@ -308,15 +310,22 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf S390_SET (buf, s390_r1, tramp); s390_basr (buf, s390_r14, s390_r1); - /* OK, code address is now on r2. Move it to r1, so that we - can restore r2 and use it from r1 later */ - s390_lgr (buf, s390_r1, s390_r2); + /* OK, code address is now on r2. Save it, so that we + can restore r2 and use it later */ + s390_stg (buf, s390_r2, 0, STK_BASE, G_STRUCT_OFFSET(trampStack_t, saveFn)); + + /* Check for thread interruption */ + S390_SET (buf, s390_r1, (guint8 *)mono_interruption_checkpoint_from_trampoline); + s390_basr (buf, s390_r14, s390_r1); /*---------------------------------------------------------- STEP 3: Restore the LMF ----------------------------------------------------------*/ restoreLMF(buf, STK_BASE, sizeof(trampStack_t)); + /* Reload result */ + s390_lg (buf, s390_r1, 0, STK_BASE, G_STRUCT_OFFSET(trampStack_t, saveFn)); + /*---------------------------------------------------------- STEP 4: call the compiled method ----------------------------------------------------------*/ diff --git a/mono/profiler/ptestrunner.pl b/mono/profiler/ptestrunner.pl index fc29b43b260..2113c25135f 100755 --- a/mono/profiler/ptestrunner.pl +++ b/mono/profiler/ptestrunner.pl @@ -6,7 +6,8 @@ use strict; my $builddir = shift || die "Usage: ptestrunner.pl mono_build_dir\n"; my @errors = (); -my $total_errors = 0; +my $total_errors = 0; # this is reset before each test +my $global_errors = 0; my $report; my $profbuilddir = $builddir . "/mono/profiler"; @@ -106,7 +107,7 @@ report_errors (); emit_nunit_report(); -exit ($total_errors? 1: 0); +exit ($global_errors ? 1 : 0); # utility functions sub append_path { @@ -156,6 +157,7 @@ sub report_errors foreach my $e (@errors) { print "Error: $e\n"; $total_errors++; + $global_errors++; } print "Total errors: $total_errors\n" if $total_errors; #print $report; @@ -168,7 +170,7 @@ sub emit_nunit_report use Net::Domain qw(hostname hostfqdn); use locale; - my $failed = $total_errors ? 1 : 0; + my $failed = $global_errors ? 1 : 0; my $successbool; my $total = 1; my $mylocale = setlocale (LC_CTYPE); |