-
Notifications
You must be signed in to change notification settings - Fork 475
Port DictionaryAdapter and tests to .Net Core #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 22 commits
13810ca
b4e9bd7
1f1e1b3
123029d
c51e34e
69d4c7a
1e9b118
d701b0f
3e9bf3a
659ef82
25becef
6fdb436
3de0b55
f10ae24
9c96e1b
2f7bc72
2ce7a84
87c36c3
8b23a0c
3b67054
a4ea30c
f9644dd
4369d94
1839d0c
8a7a18c
04bc463
8f1e4b3
6f75c96
ef31f30
42d7c45
ac6d6ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,19 @@ Symbol | NET35 | NET40 | | |
----------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ||
`FEATURE_APPDOMAIN` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_BINDINGLIST` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_CONFIGURATION` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_DICTIONARYADAPTER_XML` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_EMIT_CUSTOMMODIFIERS` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_EVENTLOG` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_GAC` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_GET_REFERENCED_ASSEMBLIES` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_ISUPPORTINITIALIZE` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_LEGACY_REFLECTION_API` | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | ||
`FEATURE_NETCORE_CONVERTER_API` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | ||
`FEATURE_LISTSORT` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_NETCORE_COMPONENTMODEL_API | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | ||
`FEATURE_NETCORE_REFLECTION_API` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | ||
`FEATURE_NETCORE_RESOURCE` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | ||
`FEATURE_REMOTING` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_SECURITY_PERMISSIONS` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
`FEATURE_SERIALIZATION` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign: | ||
|
@@ -68,17 +74,23 @@ Symbol | NET35 | NET40 | | |
|
||
* `FEATURE_APPDOMAIN` - enables support for features that make use of an AppDomain in the host. | ||
* `FEATURE_ASSEMBLYBUILDER_SAVE` - enabled support for saving the dynamically generated proxy assembly. | ||
* `FEATURE_BINDINGLIST` - enables support features that make use of System.ComponentModel.BindingList. | ||
* `FEATURE_CONFIGURATION` - enables System.Configuration features. | ||
* `FEATURE_DICTIONARYADAPTER_XML` - enable DictionaryAdapter Xml features. | ||
* `FEATURE_EMIT_CUSTOMMODIFIERS` - enables emitting optional and required custom modifiers defined on parameters including return parameters. It seems like a defect in corefx not to expose these methods because they are still implemented. | ||
* `FEATURE_EVENTLOG` - provides a diagnostics logger using the Windows Event Log. | ||
* `FEATURE_GAC` - enables support for obtaining assemblies using an assembly long form name. | ||
* `FEATURE_GET_REFERENCED_ASSEMBLIES` - enables code that takes advantage of System.Reflection.Assembly.GetReferencedAssemblies(). | ||
* `FEATURE_ISUPPORTINITIALIZE` - enables support for features that make use of System.ComponentModel.ISupportInitialize. | ||
* `FEATURE_LISTSORT` - enables support for features that make use of System.ComponentModel.ListSortDescription. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* `FEATURE_LEGACY_REFLECTION_API` - provides a shim for .NET 3.5/4.0 that emulates the `TypeInfo` API available in .NET 4.5+ and .NET Core. | ||
* `FEATURE_NETCORE_CONVERTER_API` - provides shims to implement missing Converter in .NET Core. | ||
* `FEATURE_NETCORE_COMPONENTMODEL_API` - provides shims to implement missing System.ComponentModel features in .Net Core. | ||
* `FEATURE_NETCORE_REFLECTION_API` - provides shims to implement missing functionality in .NET Core that has no alternatives. | ||
* `FEATURE_NETCORE_RESOURCE` - enables different resource probing behavior on .Net Core. | ||
* `FEATURE_REMOTING` - supports remoting on various types including inheriting from MarshalByRefObject. | ||
* `FEATURE_SECURITY_PERMISSIONS` - enables the use of CAS and Security[Critical|SafeCritical|Transparent]. | ||
* `FEATURE_SERIALIZATION` - enables support for serialization of dynamic proxies and other types. | ||
* `FEATURE_SMTP` - providers the email sender abstraction and implementation. | ||
* `FEATURE_SMTP` - provides the email sender abstraction and implementation. | ||
* `FEATURE_STRONGNAME` - supports a strong named `Castle.Core.dll` assembly. | ||
* `FEATURE_SYSTEM_CONFIGURATION` - enables features that use System.Configuration and the ConfigurationManager. | ||
* `FEATURE_TARGETEXCEPTION` - enabled catching a `TargetException`. `System.Reflection.TargetException` is implemented by .NET Core but not exposed by corefx. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ public void TearDown_DoesNotSaveAnything_IfNoProxyGenerated() | |
} | ||
|
||
[Test] | ||
#if SILVERLIGHT | ||
#if !FEATURE_ASSEMBLYBUILDER_SAVE | ||
[Ignore("Cannot do in Silverlight")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ignore description is no longer correct, maybe just remove the description because the symbol explains why. Or better yet, put the conditional around the whole unit test like you've done with the other one in this file below. |
||
#endif | ||
#if __MonoCS__ | ||
|
@@ -91,6 +91,7 @@ private void FindVerificationErrors() | |
base.TearDown(); | ||
} | ||
|
||
#if FEATURE_ASSEMBLYBUILDER_SAVE | ||
[Test] | ||
#if SILVERLIGHT | ||
[Ignore("Cannot do in Silverlight")] | ||
|
@@ -106,6 +107,7 @@ public void TearDown_FindsVerificationErrors() | |
StringAssert.Contains("PeVerify reported error(s)", ex.Message); | ||
StringAssert.Contains("fall through end of the method without returning", ex.Message); | ||
} | ||
#endif | ||
|
||
[Test] | ||
public void DisableVerification_DisablesVerificationForTestCase() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,12 @@ public void CanHandleBundleResource() | |
{ | ||
IResource resource = | ||
new AssemblyBundleResource( | ||
new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1")); | ||
#if !FEATURE_NETCORE_RESOURCE | ||
new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1") | ||
#else | ||
new CustomUri("assembly://" + AssemblyName + "/Castle.Core.Tests.Core.Tests.Resources.MoreRes.TestRes/content1") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought you could set the name of the resource in the project.json file? If not, then I'd prefer we rename the .NET Framework one rather than more conditional compilation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, named resources are better here. Fixed. |
||
#endif | ||
); | ||
|
||
Assert.IsNotNull(resource); | ||
var line = resource.GetStreamReader().ReadLine(); | ||
|
@@ -65,8 +70,11 @@ public void CanHandleBundleResource() | |
[Test] | ||
public void CreateWithAbsolutePath() | ||
{ | ||
#if !FEATURE_NETCORE_RESOURCE | ||
var resource = resFactory.Create(new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.file1.txt")); | ||
|
||
#else | ||
var resource = resFactory.Create(new CustomUri("assembly://" + AssemblyName + "/Castle.Core.Tests.Core.Tests.Resources.file1.txt")); | ||
#endif | ||
Assert.IsNotNull(resource); | ||
var line = resource.GetStreamReader().ReadLine(); | ||
Assert.AreEqual("Something", line); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a
FEATURE_SYSTEM_CONFIGURATION
symbol.