diff --git a/README.md b/README.md index 5255804a5e..e571daedbc 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,16 @@ 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_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_IDATAERRORINFO` | :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_REFLECTION_API` | :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: @@ -68,17 +72,21 @@ 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_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_IDATAERRORINFO` - enables code that depends on System.ComponentModel.IDataErrorInfo. +* `FEATURE_ISUPPORTINITIALIZE` - enables support for features that make use of System.ComponentModel.ISupportInitialize. * `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_LISTSORT` - enables support for features that make use of System.ComponentModel.ListSortDescription. * `FEATURE_NETCORE_REFLECTION_API` - provides shims to implement missing functionality in .NET Core that has no alternatives. * `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. diff --git a/Settings.proj b/Settings.proj index 5189116eb8..2f41e8df68 100644 --- a/Settings.proj +++ b/Settings.proj @@ -57,10 +57,15 @@ limitations under the License. $(AdditionalDefineConstants) FEATURE_APPDOMAIN $(AdditionalDefineConstants) FEATURE_ASSEMBLYBUILDER_SAVE + $(AdditionalDefineConstants) FEATURE_BINDINGLIST + $(AdditionalDefineConstants) FEATURE_DICTIONARYADAPTER_XML $(AdditionalDefineConstants) FEATURE_EMIT_CUSTOMMODIFIERS $(AdditionalDefineConstants) FEATURE_EVENTLOG $(AdditionalDefineConstants) FEATURE_GAC $(AdditionalDefineConstants) FEATURE_GET_REFERENCED_ASSEMBLIES + $(AdditionalDefineConstants) FEATURE_IDATAERRORINFO + $(AdditionalDefineConstants) FEATURE_ISUPPORTINITIALIZE + $(AdditionalDefineConstants) FEATURE_LISTSORT $(AdditionalDefineConstants) FEATURE_REMOTING $(AdditionalDefineConstants) FEATURE_SECURITY_PERMISSIONS $(AdditionalDefineConstants) FEATURE_SERIALIZATION diff --git a/src/Castle.Core.Tests/BaseTestCaseTestCase.cs b/src/Castle.Core.Tests/BaseTestCaseTestCase.cs index a7f377dd63..5675f99f8a 100644 --- a/src/Castle.Core.Tests/BaseTestCaseTestCase.cs +++ b/src/Castle.Core.Tests/BaseTestCaseTestCase.cs @@ -49,10 +49,8 @@ public void TearDown_DoesNotSaveAnything_IfNoProxyGenerated() Assert.IsFalse(File.Exists(path)); } +#if FEATURE_ASSEMBLYBUILDER_SAVE [Test] -#if SILVERLIGHT - [Ignore("Cannot do in Silverlight")] -#endif #if __MonoCS__ [Ignore("Expected: True But was: False")] #endif @@ -69,6 +67,7 @@ public void TearDown_SavesAssembly_IfProxyGenerated() base.TearDown(); Assert.IsTrue(File.Exists(path)); } +#endif private void FindVerificationErrors() { @@ -91,6 +90,7 @@ private void FindVerificationErrors() base.TearDown(); } +#if FEATURE_ASSEMBLYBUILDER_SAVE [Test] #if SILVERLIGHT [Ignore("Cannot do in Silverlight")] @@ -106,6 +106,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() diff --git a/src/Castle.Core.Tests/BasicClassProxyTestCase.cs b/src/Castle.Core.Tests/BasicClassProxyTestCase.cs index 3b05499eee..d3d873a4d6 100644 --- a/src/Castle.Core.Tests/BasicClassProxyTestCase.cs +++ b/src/Castle.Core.Tests/BasicClassProxyTestCase.cs @@ -89,7 +89,11 @@ public void ProxyForNonPublicClass() var type = Type.GetType("System.AppDomainInitializerInfo, mscorlib"); var exception = Assert.Throws(() => generator.CreateClassProxy(type, new StandardInterceptor())); Assert.AreEqual( +#if FEATURE_STRONGNAME "Can not create proxy for type System.AppDomainInitializerInfo because it is not accessible. Make it public, or internal and mark your assembly with [assembly: InternalsVisibleTo(\"DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7\")] attribute, because assembly mscorlib is strong-named.", +#else + "Can not create proxy for type System.AppDomainInitializerInfo because it is not accessible. Make it public, or internal and mark your assembly with [assembly: InternalsVisibleTo(\"DynamicProxyGenAssembly2\")] attribute, because assembly mscorlib is strong-named.", +#endif exception.Message); } diff --git a/src/Castle.Core.Tests/BasicInterfaceProxyTestCase.cs b/src/Castle.Core.Tests/BasicInterfaceProxyTestCase.cs index 8961d06358..7ab0b54014 100644 --- a/src/Castle.Core.Tests/BasicInterfaceProxyTestCase.cs +++ b/src/Castle.Core.Tests/BasicInterfaceProxyTestCase.cs @@ -252,6 +252,7 @@ public void Cannot_proxy_inaccessible_interface() ex.Message); } +#if FEATURE_STRONGNAME [Test] public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() { @@ -261,6 +262,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() "Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.BasicInterfaceProxyTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.BasicInterfaceProxyTestCase+PrivateInterface is not accessible. Make it public, or internal", ex.Message); } +#endif [Test] public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument() diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/CustomAssert.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/CustomAssert.cs index 81940f8dca..0a96c46741 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/CustomAssert.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/CustomAssert.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Tests { using System; diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/DictionaryAdapterFactoryTestCase.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/DictionaryAdapterFactoryTestCase.cs index 0d150b9733..1e21024a47 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/DictionaryAdapterFactoryTestCase.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/DictionaryAdapterFactoryTestCase.cs @@ -18,6 +18,7 @@ namespace Castle.Components.DictionaryAdapter.Tests using System.Collections; using System.Collections.Generic; using System.Linq; + using System.Reflection; using CastleTests.Components.DictionaryAdapter.Tests; @@ -429,7 +430,7 @@ public void ReadAdapter_WithDefaultConversions_WorksFine() dictionary["Double"] = string.Format("{0}", 3.14D); dictionary["Decimal"] = string.Format("{0}", 100M); dictionary["String"] = "Hello World"; - dictionary["DateTime"] = now.ToShortDateString(); + dictionary["DateTime"] = now.ToString("d"); dictionary["Guid"] = guid.ToString(); var conversions = factory.GetAdapter(dictionary); @@ -468,7 +469,7 @@ public void UpdateAdapter_WithDefaultConversions_WorksFine() #if SILVERLIGHT // SL impl limitation Assert.AreEqual(today.ToString(), dictionary["DateTime"]); #else - Assert.AreEqual(today.ToShortDateString(), dictionary["DateTime"]); + Assert.AreEqual(today.ToString("d"), dictionary["DateTime"]); #endif Assert.AreEqual(guid.ToString(), dictionary["Guid"]); Assert.AreEqual("2124751012,22", dictionary["Phone"]); @@ -484,7 +485,7 @@ public void ReadAdapter_WithDefaultNullableConversions_WorksFine() dictionary["NullFloat"] = string.Format("{0}", 98.6); dictionary["NullDouble"] = string.Format("{0}", 3.14D); dictionary["NullDecimal"] = string.Format("{0}", 100M); - dictionary["NullDateTime"] = now.Value.ToShortDateString(); + dictionary["NullDateTime"] = now.Value.ToString("d"); dictionary["NullGuid"] = guid.ToString(); var conversions = factory.GetAdapter(dictionary); @@ -517,7 +518,7 @@ public void UpdateAdapter_WithDefaultNullableConversions_WorksFine() #if SILVERLIGHT // SL impl limitation Assert.AreEqual(today.Value.ToString(), dictionary["NullDateTime"]); #else - Assert.AreEqual(today.Value.ToShortDateString(), dictionary["NullDateTime"]); + Assert.AreEqual(today.Value.ToString("d"), dictionary["NullDateTime"]); #endif Assert.AreEqual(guid.ToString(), dictionary["NullGuid"]); } @@ -767,7 +768,7 @@ public void WillNotPropagatePropertyChangedEventWhenNestedPropertyChanged() container.Item.Name = "Craig"; } -#if !SILVERLIGHT //no BindingList in Silverlight +#if FEATURE_BINDINGLIST [Test] public void WillPropagatePropertyChangedEventWhenBindingListPropertyChanged() @@ -1123,6 +1124,7 @@ public void CanInitializeTheDictionaryAdapterWithAttributes() Assert.IsTrue(((IDictionaryAdapter)name).Validators.OfType().Any()); } +#if FEATURE_IDATAERRORINFO [Test] public void CanValidateAndObtainDataErrorInformation() { @@ -1188,6 +1190,7 @@ public void WillNotifyPropertyChangesOnValidateGroup() name.LastName = "Monster"; Assert.IsTrue(notifyCalled); } +#endif [Test] public void CanCreateDictionaryAdapterFromExistingAdapter() @@ -1257,7 +1260,7 @@ public void CanGetInterfacePropertyOnDemand() Assert.IsNotNull(container.Phone); } -#if !SILVERLIGHT //no BindingList in Silverlight +#if FEATURE_BINDINGLIST [Test] public void CanAddBindingListItemsOnDemand() @@ -1321,7 +1324,7 @@ public void CanGetNewGuidPropertyOnDemand() public void CanDetermineTheAdaptedInterface() { var person = factory.GetAdapter(dictionary); - var type = person.GetType().GetCustomAttributes( + var type = person.GetType().GetTypeInfo().GetCustomAttributes( typeof(DictionaryAdapterAttribute), false).Cast() .FirstOrDefault(); Assert.IsNotNull(type); diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IAddress.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IAddress.cs index 97b153a1b3..64490f64ec 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IAddress.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IAddress.cs @@ -17,7 +17,10 @@ namespace Castle.Components.DictionaryAdapter.Tests using System.ComponentModel; //[PropagateNotifications(false)] - public interface IAddress : IEditableObject, INotifyPropertyChanged, IDataErrorInfo + public interface IAddress : IEditableObject, INotifyPropertyChanged +#if FEATURE_IDATAERRORINFO + , IDataErrorInfo +#endif { string Line1 { get; set; } string Line2 { get; set; } diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IItemContainer.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IItemContainer.cs index b216012625..b268a99a24 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IItemContainer.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IItemContainer.cs @@ -43,7 +43,7 @@ public interface IItemContainer : IDictionaryAdapter, IDictionaryCreate, IList GenericItems { get; set; } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST BindingList Bindingtems { get; set; } #endif diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPerson.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPerson.cs index efede7f277..d92c8fa00e 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPerson.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPerson.cs @@ -19,7 +19,10 @@ namespace Castle.Components.DictionaryAdapter.Tests using System.ComponentModel; [MultiLevelEdit] - public interface IPerson : IDictionaryAdapter, IEditableObject, IDictionaryNotify, IDataErrorInfo + public interface IPerson : IDictionaryAdapter, IEditableObject, IDictionaryNotify +#if FEATURE_IDATAERRORINFO + , IDataErrorInfo +#endif { [RemoveIf(null)] string Name { get; set; } diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPhone.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPhone.cs index b6a370ae52..81d054709a 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPhone.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/IPhone.cs @@ -16,7 +16,10 @@ namespace Castle.Components.DictionaryAdapter.Tests { using System.ComponentModel; - public interface IPhone : IEditableObject, INotifyPropertyChanged, IDataErrorInfo + public interface IPhone : IEditableObject, INotifyPropertyChanged +#if FEATURE_IDATAERRORINFO + , IDataErrorInfo +#endif { [Fetch]string Number { get; set; } string Extension { get; set; } diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/InfrastructureStub.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/InfrastructureStub.cs index ef827f1ad8..badc0bdc4c 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/InfrastructureStub.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/InfrastructureStub.cs @@ -18,8 +18,9 @@ namespace Castle.Components.DictionaryAdapter.Tests using System.ComponentModel; public abstract class InfrastructureStub : INotifyPropertyChanged, IEditableObject - -, IDataErrorInfo +#if FEATURE_IDATAERRORINFO + , IDataErrorInfo +#endif { public event PropertyChangedEventHandler PropertyChanged; diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/MemberwiseEqualityHashCodeStrategyTestCase.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/MemberwiseEqualityHashCodeStrategyTestCase.cs index febe9a68bd..bb1ad9fd06 100644 --- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/MemberwiseEqualityHashCodeStrategyTestCase.cs +++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/MemberwiseEqualityHashCodeStrategyTestCase.cs @@ -14,7 +14,7 @@ namespace Castle.Components.DictionaryAdapter.Tests { -#if !SILVERLIGHT +#if FEATURE_DICTIONARYADAPTER_XML using System; using System.Collections; using System.Collections.Generic; diff --git a/src/Castle.Core.Tests/Core.Tests/Resources/AssemblyResourceFactoryTestCase.cs b/src/Castle.Core.Tests/Core.Tests/Resources/AssemblyResourceFactoryTestCase.cs index 37136e1742..0e4a8a3c83 100644 --- a/src/Castle.Core.Tests/Core.Tests/Resources/AssemblyResourceFactoryTestCase.cs +++ b/src/Castle.Core.Tests/Core.Tests/Resources/AssemblyResourceFactoryTestCase.cs @@ -55,7 +55,8 @@ public void CanHandleBundleResource() { IResource resource = new AssemblyBundleResource( - new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1")); + new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1") + ); Assert.IsNotNull(resource); var line = resource.GetStreamReader().ReadLine(); @@ -66,7 +67,6 @@ public void CanHandleBundleResource() public void CreateWithAbsolutePath() { var resource = resFactory.Create(new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.file1.txt")); - Assert.IsNotNull(resource); var line = resource.GetStreamReader().ReadLine(); Assert.AreEqual("Something", line); diff --git a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyConstructorsTestCase.cs b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyConstructorsTestCase.cs index d73f7b6630..ccef6b9861 100644 --- a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyConstructorsTestCase.cs +++ b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyConstructorsTestCase.cs @@ -129,6 +129,7 @@ public void Cannot_proxy_inaccessible_class() ex.Message); } +#if FEATURE_STRONGNAME [Test] public void Cannot_proxy_generic_class_with_inaccessible_type_argument() { @@ -138,6 +139,7 @@ public void Cannot_proxy_generic_class_with_inaccessible_type_argument() "Can not create proxy for type System.Collections.Generic.List`1[[Castle.DynamicProxy.Tests.ClassProxyConstructorsTestCase+PrivateClass, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.ClassProxyConstructorsTestCase+PrivateClass is not accessible. Make it public, or internal", ex.Message); } +#endif [Test] public void Cannot_proxy_generic_class_with_type_argument_that_has_inaccessible_type_argument() diff --git a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithTargetTestCase.cs b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithTargetTestCase.cs index 674d504192..ead28674b9 100644 --- a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithTargetTestCase.cs +++ b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithTargetTestCase.cs @@ -111,6 +111,7 @@ public void Cannot_proxy_inaccessible_class() ex.Message); } +#if FEATURE_STRONGNAME [Test] public void Cannot_proxy_generic_class_with_inaccessible_type_argument() { @@ -120,6 +121,7 @@ public void Cannot_proxy_generic_class_with_inaccessible_type_argument() "Can not create proxy for type System.Collections.Generic.List`1[[Castle.DynamicProxy.Tests.ClassProxyWithTargetTestCase+PrivateClass, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.ClassProxyWithTargetTestCase+PrivateClass is not accessible. Make it public, or internal", ex.Message); } +#endif [Test] public void Cannot_proxy_generic_class_with_type_argument_that_has_inaccessible_type_argument() diff --git a/src/Castle.Core.Tests/GenClasses/GenClassWithGenMethods.cs b/src/Castle.Core.Tests/GenClasses/GenClassWithGenMethods.cs index e8eb86a228..c1778fc1b0 100644 --- a/src/Castle.Core.Tests/GenClasses/GenClassWithGenMethods.cs +++ b/src/Castle.Core.Tests/GenClasses/GenClassWithGenMethods.cs @@ -40,11 +40,13 @@ public virtual T DoSomething(Z z) return new T(); } - public virtual void DoSomethingElse(Converter converter, int value) + public virtual void DoSomethingElse(TestConverter converter, int value) { invoked = true; savedParam = converter(value); } } + + public delegate TOutput TestConverter(TInput input); } \ No newline at end of file diff --git a/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs b/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs index 2f1dca1695..fce17bf187 100644 --- a/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs +++ b/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs @@ -299,6 +299,7 @@ public void Cannot_proxy_inaccessible_interface() ex.Message); } +#if FEATURE_STRONGNAME [Test] public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() { @@ -308,6 +309,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() "Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.InterceptorSelectorTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.InterceptorSelectorTestCase+PrivateInterface is not accessible. Make it public, or internal", ex.Message); } +#endif [Test] public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument() diff --git a/src/Castle.Core.Tests/InterfaceProxyWithTargetInterfaceTestCase.cs b/src/Castle.Core.Tests/InterfaceProxyWithTargetInterfaceTestCase.cs index 53b80937cd..165412906d 100644 --- a/src/Castle.Core.Tests/InterfaceProxyWithTargetInterfaceTestCase.cs +++ b/src/Castle.Core.Tests/InterfaceProxyWithTargetInterfaceTestCase.cs @@ -190,6 +190,7 @@ public void Cannot_proxy_inaccessible_interface() ex.Message); } +#if FEATURE_STRONGNAME [Test] public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() { @@ -199,6 +200,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument() "Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.InterfaceProxyWithTargetInterfaceTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.InterfaceProxyWithTargetInterfaceTestCase+PrivateInterface is not accessible. Make it public, or internal", ex.Message); } +#endif [Test] public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument() diff --git a/src/Castle.Core.Tests/ModuleScopeTestCase.cs b/src/Castle.Core.Tests/ModuleScopeTestCase.cs index ce84eef96b..85c4fa990b 100644 --- a/src/Castle.Core.Tests/ModuleScopeTestCase.cs +++ b/src/Castle.Core.Tests/ModuleScopeTestCase.cs @@ -65,6 +65,7 @@ public void ModuleScopeCanHandleSignedAndUnsignedInParallel() #if !SILVERLIGHT +#if FEATURE_STRONGNAME [Test] #if __MonoCS__ [Ignore("Expected: CastleDynProxy2.dll But was: /home/teamcity/buildagent/work/...")] @@ -110,7 +111,6 @@ public void ExplicitModulePaths() Assert.AreEqual(@"d:\Bar", scope.WeakNamedModuleDirectory); } -#if FEATURE_STRONGNAME private static void CheckSignedSavedAssembly(string path) { Assert.IsTrue(File.Exists(path)); diff --git a/src/Castle.Core.Tests/TestDictionaryValidator.cs b/src/Castle.Core.Tests/TestDictionaryValidator.cs index c5902e2669..6911bfa38e 100644 --- a/src/Castle.Core.Tests/TestDictionaryValidator.cs +++ b/src/Castle.Core.Tests/TestDictionaryValidator.cs @@ -47,11 +47,11 @@ public bool IsValid(IDictionaryAdapter dictionaryAdapter) public string Validate(IDictionaryAdapter dictionaryAdapter) { List errors = new List(); - var globalRules = AttributesUtil.GetTypeAttributes(dictionaryAdapter.Meta.Type); + var globalRules = AttributesUtil.GetTypeAttributes(dictionaryAdapter.Meta.Type); foreach (var property in dictionaryAdapter.This.Properties.Values) { - var propertyRules = AttributesUtil.GetAttributes(property.Property); + var propertyRules = AttributesUtil.GetAttributes(property.Property); var propertyValue = dictionaryAdapter.GetProperty(property.PropertyName, true); ApplyValidationRules(dictionaryAdapter, propertyRules, property, propertyValue, errors); ApplyValidationRules(dictionaryAdapter, globalRules, property, propertyValue, errors); @@ -63,9 +63,9 @@ public string Validate(IDictionaryAdapter dictionaryAdapter) public string Validate(IDictionaryAdapter dictionaryAdapter, PropertyDescriptor property) { List errors = new List(); - var globalRules = AttributesUtil.GetTypeAttributes(dictionaryAdapter.Meta.Type); + var globalRules = AttributesUtil.GetTypeAttributes(dictionaryAdapter.Meta.Type); - var propertyRules = AttributesUtil.GetAttributes(property.Property); + var propertyRules = AttributesUtil.GetAttributes(property.Property); var propertyValue = dictionaryAdapter.GetProperty(property.PropertyName, true); ApplyValidationRules(dictionaryAdapter, propertyRules, property, propertyValue, errors); ApplyValidationRules(dictionaryAdapter, globalRules, property, propertyValue, errors); diff --git a/src/Castle.Core.Tests/TraceLoggerTests.cs b/src/Castle.Core.Tests/TraceLoggerTests.cs index e7e96be6c0..dbb4914099 100644 --- a/src/Castle.Core.Tests/TraceLoggerTests.cs +++ b/src/Castle.Core.Tests/TraceLoggerTests.cs @@ -51,6 +51,7 @@ public void Cleanup() Listener.ClearMessages(); } +#if FEATURE_SYSTEM_CONFIGURATION [Test] [Platform(Exclude = "mono", Reason = "Mono has a bug that causes the listeners to not fully work.")] public void WritingToLoggerByType() @@ -118,6 +119,7 @@ public void FallUpToDefaultSource() Listener.AssertContains("defaultrule", "System.Xml.XmlDocument"); Listener.AssertContains("defaultrule", "Logging to non-configured namespace namespace"); } +#endif #region in-memory listener class diff --git a/src/Castle.Core.Tests/project.json b/src/Castle.Core.Tests/project.json index 45652576dd..6c8b989eff 100644 --- a/src/Castle.Core.Tests/project.json +++ b/src/Castle.Core.Tests/project.json @@ -7,6 +7,9 @@ "licenseUrl": "", "dependencies": { "Castle.Core": "3.3.4-*", + "Microsoft.CSharp": "4.0.0", + "System.Console": "4.0.0-beta-23123", + "System.Diagnostics.TraceSource": "4.0.0-beta-23123", "System.Runtime": "4.0.20", "xunit": "2.1.0", "xunit.runner.dnx": "2.1.0-beta6-build191" @@ -21,15 +24,14 @@ "warningsAsErrors": true, "define": [ "FEATURE_XUNITNET" ] }, - "resource": [ - "Core.Tests/Resources/MoreRes/TestRes.resx" - ], + "namedResource": { + "CastleTests.Core.Tests.Resources.MoreRes.TestRes": "Core.Tests/Resources/MoreRes/TestRes.resx", + "CastleTests.Core.Tests.Resources.file1.txt": "Core.Tests/Resources/file1.txt" + }, "exclude": [ - "Components.DictionaryAdapter.Tests/**/*", + "Components.DictionaryAdapter.Tests/Xml/**/*", "log4netIntegration/**/*", "NLogIntegration/**/*", - "SerilogIntegration/**/*", - "TestDictionaryValidator.cs", - "IdEqualityHashCodeStrategy.cs" + "SerilogIntegration/**/*" ] } \ No newline at end of file diff --git a/src/Castle.Core/Compatibility/NetCoreConverterExtensions.cs b/src/Castle.Core/Compatibility/NetCoreConverterExtensions.cs deleted file mode 100644 index ef7a648e1c..0000000000 --- a/src/Castle.Core/Compatibility/NetCoreConverterExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2004-2015 Castle Project - http://www.castleproject.org/ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#if FEATURE_NETCORE_CONVERTER_API - -namespace System -{ - public delegate TOutput Converter(TInput input); -} - -#endif \ No newline at end of file diff --git a/src/Castle.Core/Components.DictionaryAdapter/Attributes/OnDemandAttribute.cs b/src/Castle.Core/Components.DictionaryAdapter/Attributes/OnDemandAttribute.cs index 412c813ce8..0da13ab4bf 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Attributes/OnDemandAttribute.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Attributes/OnDemandAttribute.cs @@ -118,11 +118,13 @@ public object GetPropertyValue(IDictionaryAdapter dictionaryAdapter, string key, { using (dictionaryAdapter.SuppressNotificationsBlock()) { +#if FEATURE_ISUPPORTINITIALIZE if (storedValue is ISupportInitialize) { ((ISupportInitialize)storedValue).BeginInit(); ((ISupportInitialize)storedValue).EndInit(); } +#endif if (initializer != null) { initializer.Initialize(dictionaryAdapter, storedValue); @@ -160,7 +162,7 @@ private static Type GetInferredType(IDictionaryAdapter dictionaryAdapter, Proper var genericDef = type.GetGenericTypeDefinition(); var genericArg = type.GetGenericArguments()[0]; bool isBindingList = -#if SILVERLIGHT +#if !FEATURE_BINDINGLIST false; #else genericDef == typeof(System.ComponentModel.BindingList<>); @@ -170,14 +172,14 @@ private static Type GetInferredType(IDictionaryAdapter dictionaryAdapter, Proper { if (dictionaryAdapter.CanEdit) { -#if SILVERLIGHT +#if !FEATURE_BINDINGLIST collectionType = typeof(EditableList<>); #else collectionType = isBindingList ? typeof(EditableBindingList<>) : typeof(EditableList<>); #endif } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST if (isBindingList && genericArg.GetTypeInfo().IsInterface) { Func addNew = () => dictionaryAdapter.Create(genericArg); diff --git a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathAttribute.cs b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathAttribute.cs index e959ad68e9..59315fb537 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathAttribute.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathAttribute.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathFunctionAttribute.cs b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathFunctionAttribute.cs index fcaf4a2504..2e04e04b94 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathFunctionAttribute.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathFunctionAttribute.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathVariableAttribute.cs b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathVariableAttribute.cs index f2d40ad348..5ec0d23173 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathVariableAttribute.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Attributes/XPathVariableAttribute.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.Validate.cs b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.Validate.cs index 00900e23c1..caa87f235c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.Validate.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.Validate.cs @@ -36,6 +36,7 @@ public bool IsValid } } +#if FEATURE_IDATAERRORINFO public string Error { get @@ -66,6 +67,7 @@ public string this[String columnName] return String.Empty; } } +#endif public DictionaryValidateGroup ValidateGroups(params object[] groups) { diff --git a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.cs b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.cs index 0ddce70537..a7c7da012c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterBase.cs @@ -27,7 +27,11 @@ public DictionaryAdapterBase(DictionaryAdapterInstance instance) CanEdit = typeof(IEditableObject).IsAssignableFrom(Meta.Type); CanNotify = typeof(INotifyPropertyChanged).IsAssignableFrom(Meta.Type); +#if FEATURE_IDATAERRORINFO CanValidate = typeof(IDataErrorInfo).IsAssignableFrom(Meta.Type); +#else + CanValidate = false; +#endif Initialize(); } diff --git a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterFactory.cs b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterFactory.cs index 77f87d48bf..3ff52aef01 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterFactory.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/DictionaryAdapterFactory.cs @@ -30,7 +30,7 @@ namespace Castle.Components.DictionaryAdapter #endif using System.Diagnostics; -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML using Castle.Components.DictionaryAdapter.Xml; #endif using Castle.Core.Internal; @@ -91,7 +91,7 @@ public object GetAdapter(Type type, NameValueCollection nameValues) return GetAdapter(type, new NameValueCollectionAdapter(nameValues)); } -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML /// public T GetAdapter(System.Xml.XmlNode xmlNode) { @@ -155,8 +155,12 @@ private DictionaryAdapterMeta InternalGetAdapterMeta(Type type, if (descriptor == null && other != null) descriptor = other.CreateDescriptor(); +#if FEATURE_LEGACY_REFLECTION_API var appDomain = Thread.GetDomain(); var typeBuilder = CreateTypeBuilder(type, appDomain); +#else + var typeBuilder = CreateTypeBuilder(type); +#endif meta = CreateAdapterMeta(type, typeBuilder, descriptor); interfaceToMeta.Add(type, meta); return meta; @@ -171,7 +175,8 @@ private object InternalGetAdapter(Type type, IDictionary dictionary, PropertyDes } #region Type Builders - + +#if FEATURE_LEGACY_REFLECTION_API private static TypeBuilder CreateTypeBuilder(Type type, AppDomain appDomain) { var assemblyName = new AssemblyName("CastleDictionaryAdapterAssembly"); @@ -179,6 +184,16 @@ private static TypeBuilder CreateTypeBuilder(Type type, AppDomain appDomain) var moduleBuilder = assemblyBuilder.DefineDynamicModule("CastleDictionaryAdapterModule"); return CreateAdapterType(type, moduleBuilder); } +#else + private static TypeBuilder CreateTypeBuilder(Type type) + { + var assemblyName = new AssemblyName("CastleDictionaryAdapterAssembly"); + var assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); + var moduleBuilder = assemblyBuilder.DefineDynamicModule("CastleDictionaryAdapterModule"); + return CreateAdapterType(type, moduleBuilder); + } + +#endif private static TypeBuilder CreateAdapterType(Type type, ModuleBuilder moduleBuilder) { @@ -227,6 +242,7 @@ private DictionaryAdapterMeta CreateAdapterMeta(Type type, TypeBuilder typeBuild CreateAdapterProperty(typeBuilder, property.Value); } +#if FEATURE_LEGACY_REFLECTION_API var implementation = typeBuilder.CreateType(); var creator = (Func)Delegate.CreateDelegate ( @@ -234,13 +250,25 @@ private DictionaryAdapterMeta CreateAdapterMeta(Type type, TypeBuilder typeBuild implementation, "__Create" ); - +#else + var implementation = typeBuilder.CreateTypeInfo().AsType(); + var creator = (Func)implementation + .GetTypeInfo().GetDeclaredMethod("__Create") + .CreateDelegate(typeof(Func)); +#endif + var meta = new DictionaryAdapterMeta(type, implementation, typeBehaviors, initializers.MetaInitializers.ToArray(), initializers.Initializers.ToArray(), propertyMap, this, creator); +#if FEATURE_LEGACY_REFLECTION_API const BindingFlags metaBindings = BindingFlags.Public | BindingFlags.Static | BindingFlags.SetField; implementation.InvokeMember("__meta", metaBindings, null, null, new[] { meta }); +#else + const BindingFlags metaBindings = BindingFlags.Public | BindingFlags.Static; + var field = implementation.GetField("__meta", metaBindings); + field.SetValue(implementation, meta); +#endif return meta; } @@ -440,22 +468,21 @@ private static Dictionary GetPropertyDescriptors(Typ .AddBehaviors(typeBehaviors.OfType ().Cast()); #endif - CollectProperties(type, property => + CollectProperties(type, (property, reflectedType) => { var propertyBehaviors = ExpandBehaviors(property.GetCustomAttributes(false)).ToArray(); var propertyDescriptor = new PropertyDescriptor(property, propertyBehaviors) .AddBehaviors(propertyBehaviors.OfType()) - .AddBehaviors(interfaceBehaviors.OfType().Where(b => b is IDictionaryKeyBuilder == false)) + .AddBehaviors(interfaceBehaviors.OfType().Where(b => b is IDictionaryKeyBuilder == false)); + var expandedBehaviors = ExpandBehaviors(InterfaceAttributeUtil + .GetAttributes(reflectedType, true)) #if DOTNET40 - .AddBehaviors(ExpandBehaviors(InterfaceAttributeUtil - .GetAttributes(property.ReflectedType, true)) - .OfType()); + .OfType(); #else - .AddBehaviors(ExpandBehaviors(InterfaceAttributeUtil - .GetAttributes(property.ReflectedType, true)) - .OfType() - .Cast()); + .OfType() + .Cast(); #endif + propertyDescriptor = propertyDescriptor.AddBehaviors(expandedBehaviors); AddDefaultGetter(propertyDescriptor); @@ -487,7 +514,7 @@ private static Dictionary GetPropertyDescriptors(Typ return; } } - + propertyMap.Add(property.Name, propertyDescriptor); }); @@ -510,17 +537,17 @@ private static IEnumerable ExpandBehaviors(IEnumerable behaviors } } - private static void CollectProperties(Type currentType, Action onProperty) + private static void CollectProperties(Type currentType, Action onProperty) { var types = new List(); types.Add(currentType); types.AddRange(currentType.GetInterfaces()); const BindingFlags publicBindings = BindingFlags.Public | BindingFlags.Instance; - foreach (var type in types.Where(t => InfrastructureTypes.Contains(t) == false)) - foreach (var property in type.GetProperties(publicBindings)) + foreach (var reflectedType in types.Where(t => InfrastructureTypes.Contains(t) == false)) + foreach (var property in reflectedType.GetProperties(publicBindings)) { - onProperty(property); + onProperty(property, reflectedType); } } @@ -533,7 +560,10 @@ private static void AddDefaultGetter(PropertyDescriptor descriptor) private static readonly HashSet InfrastructureTypes = new HashSet { typeof (IEditableObject), typeof (IDictionaryEdit), typeof (IChangeTracking), - typeof (IRevertibleChangeTracking), typeof (IDictionaryNotify), typeof (IDataErrorInfo), + typeof (IRevertibleChangeTracking), typeof (IDictionaryNotify), +#if FEATURE_IDATAERRORINFO + typeof (IDataErrorInfo), +#endif typeof (IDictionaryValidate), typeof (IDictionaryAdapter) }; diff --git a/src/Castle.Core/Components.DictionaryAdapter/DictionaryValidateGroup.cs b/src/Castle.Core/Components.DictionaryAdapter/DictionaryValidateGroup.cs index 3715d4c758..f70f734843 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/DictionaryValidateGroup.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/DictionaryValidateGroup.cs @@ -57,9 +57,14 @@ public bool CanValidate public bool IsValid { +#if FEATURE_IDATAERRORINFO get { return string.IsNullOrEmpty(Error); } +#else + get { throw new NotSupportedException("IDataErrorInfo is not supported on this runtime."); } +#endif } +#if FEATURE_IDATAERRORINFO public string Error { get @@ -81,6 +86,7 @@ public string this[string columnName] return string.Empty; } } +#endif public DictionaryValidateGroup ValidateGroups(params object[] groups) { diff --git a/src/Castle.Core/Components.DictionaryAdapter/IDictionaryAdapterFactory.cs b/src/Castle.Core/Components.DictionaryAdapter/IDictionaryAdapterFactory.cs index 2ddb984bc6..37debd3ce2 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/IDictionaryAdapterFactory.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/IDictionaryAdapterFactory.cs @@ -17,7 +17,7 @@ namespace Castle.Components.DictionaryAdapter { using System; using System.Collections; -#if !SILVERLIGHT +#if FEATURE_DICTIONARYADAPTER_XML using System.Collections.Specialized; using System.Xml.XPath; #endif @@ -60,8 +60,8 @@ public interface IDictionaryAdapterFactory /// The type represented by T must be an interface with properties. /// object GetAdapter(Type type, IDictionary dictionary, PropertyDescriptor descriptor); - -#if !SILVERLIGHT + +#if FEATURE_DICTIONARYADAPTER_XML /// /// Gets a typed adapter bound to the . /// diff --git a/src/Castle.Core/Components.DictionaryAdapter/IDictionaryValidate.cs b/src/Castle.Core/Components.DictionaryAdapter/IDictionaryValidate.cs index e82f3664c3..9893a5a073 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/IDictionaryValidate.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/IDictionaryValidate.cs @@ -20,7 +20,10 @@ namespace Castle.Components.DictionaryAdapter /// /// Contract for validating Dictionary adapter. /// - public interface IDictionaryValidate : IDataErrorInfo + public interface IDictionaryValidate +#if FEATURE_IDATAERRORINFO + : IDataErrorInfo +#endif { bool CanValidate { get; set; } diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/BindingList.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/BindingList.cs index 4e9984f8b6..ae0401b57c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/BindingList.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/BindingList.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_BINDINGLIST // Until support for other platforms is verified namespace Castle.Components.DictionaryAdapter { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/BindingListInitializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/BindingListInitializer.cs index 96240bc34a..6d408d8dbf 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/BindingListInitializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/BindingListInitializer.cs @@ -14,7 +14,7 @@ namespace Castle.Components.DictionaryAdapter { -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST using System; using System.ComponentModel; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/EditableBindingList.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/EditableBindingList.cs index ee5ce5c3ce..bd0cd3aa3e 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/EditableBindingList.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/EditableBindingList.cs @@ -14,7 +14,7 @@ namespace Castle.Components.DictionaryAdapter { -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST using System.Collections.Generic; using System.ComponentModel; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingList.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingList.cs index a59641df78..cf2603db07 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingList.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingList.cs @@ -19,7 +19,7 @@ namespace Castle.Components.DictionaryAdapter using SysPropertyDescriptor = System.ComponentModel.PropertyDescriptor; public interface IBindingList : IList -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST , IBindingListSource, ICancelAddNew, IRaiseItemChangedEvents #endif { @@ -31,9 +31,11 @@ public interface IBindingList : IList bool SupportsSorting { get; } bool IsSorted { get; } SysPropertyDescriptor SortProperty { get; } +#if FEATURE_LISTSORT ListSortDirection SortDirection { get; } +#endif -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST event ListChangedEventHandler ListChanged; #endif @@ -41,7 +43,9 @@ public interface IBindingList : IList int Find (SysPropertyDescriptor property, object key); void AddIndex (SysPropertyDescriptor property); void RemoveIndex(SysPropertyDescriptor property); +#if FEATURE_LISTSORT void ApplySort (SysPropertyDescriptor property, ListSortDirection direction); +#endif void RemoveSort (); } } diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingListSource.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingListSource.cs index 069dc04ad5..1cd8b7e585 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingListSource.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/IBindingListSource.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST namespace Castle.Components.DictionaryAdapter { using System.ComponentModel; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Util/ListProjection.cs b/src/Castle.Core/Components.DictionaryAdapter/Util/ListProjection.cs index f2e36fcda6..ee3afc8140 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Util/ListProjection.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Util/ListProjection.cs @@ -27,7 +27,7 @@ namespace Castle.Components.DictionaryAdapter [DebuggerTypeProxy(typeof(ListProjectionDebugView<>))] public class ListProjection : IBindingList, // Castle -#if SILVERLIGHT +#if !FEATURE_BINDINGLIST IList, #else IBindingList, // System @@ -41,7 +41,7 @@ public class ListProjection : private int addNewIndex = NoIndex; private int addedIndex = NoIndex; private int suspendLevel = 0; -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST private int changedIndex = NoIndex; private PropertyChangedEventHandler propertyHandler; private static PropertyDescriptorCollection itemProperties; @@ -62,7 +62,7 @@ public int Count get { return adapter.Count; } } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST public IBindingList AsBindingList { get { return this; } @@ -88,9 +88,11 @@ public IEqualityComparer Comparer bool IBindingList.SupportsSorting { get { return false; } } bool IBindingList.IsSorted { get { return false; } } SysPropertyDescriptor IBindingList.SortProperty { get { return null; } } +#if FEATURE_LISTSORT ListSortDirection IBindingList.SortDirection { get { return ListSortDirection.Ascending; } } +#endif -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST // System IBindingList Properties bool IBindingList.AllowEdit { get { return true; } } bool IBindingList.AllowNew { get { return true; } } @@ -227,7 +229,7 @@ public virtual T AddNew() return item; } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST object IBindingList.AddNew() { return AddNew(); @@ -425,7 +427,7 @@ public void RejectChanges() CancelEdit(); } -#if SILVERLIGHT +#if !FEATURE_BINDINGLIST [Conditional("NOP")] private void AttachPropertyChanged(T value) { } @@ -528,7 +530,7 @@ private static SysPropertyDescriptor GetChangedProperty(PropertyChangedEventArgs } #endif -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST public event ListChangedEventHandler ListChanged; protected virtual void OnListChanged(ListChangedEventArgs args) { @@ -538,7 +540,7 @@ protected virtual void OnListChanged(ListChangedEventArgs args) } #endif -#if SILVERLIGHT +#if !FEATURE_BINDINGLIST protected enum ListChangedType { ItemAdded, @@ -592,7 +594,7 @@ void IBindingList.AddIndex(SysPropertyDescriptor property) // Do nothing } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST void IBindingList.AddIndex(SysPropertyDescriptor property) { // Do nothing @@ -604,7 +606,7 @@ void IBindingList.RemoveIndex(SysPropertyDescriptor property) // Do nothing } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST void IBindingList.RemoveIndex(SysPropertyDescriptor property) { // Do nothing @@ -616,19 +618,21 @@ int IBindingList.Find(SysPropertyDescriptor property, object key) throw new NotSupportedException(); } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST int IBindingList.Find(SysPropertyDescriptor property, object key) { throw new NotSupportedException(); } #endif +#if FEATURE_LISTSORT void IBindingList.ApplySort(SysPropertyDescriptor property, ListSortDirection direction) { throw new NotSupportedException(); } +#endif -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST void IBindingList.ApplySort(SysPropertyDescriptor property, ListSortDirection direction) { throw new NotSupportedException(); @@ -640,7 +644,7 @@ void IBindingList.RemoveSort() throw new NotSupportedException(); } -#if !SILVERLIGHT +#if FEATURE_BINDINGLIST void IBindingList.RemoveSort() { throw new NotSupportedException(); diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/DefaultXmlReferenceFormat.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/DefaultXmlReferenceFormat.cs index 3b4bef4478..f5efd29656 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/DefaultXmlReferenceFormat.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/DefaultXmlReferenceFormat.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/IXmlReferenceFormat.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/IXmlReferenceFormat.cs index 8074bb3f9b..9204dc8f63 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/IXmlReferenceFormat.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/IXmlReferenceFormat.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public interface IXmlReferenceFormat diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlAdapter.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlAdapter.cs index cf8dedc095..7f8308d329 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlAdapter.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlAdapter.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadata.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadata.cs index a5a6d9578b..07e79006c4 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadata.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadata.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadataBehavior.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadataBehavior.cs index 869b897302..cb2ae26e57 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadataBehavior.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlMetadataBehavior.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System.Collections.Generic; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlReferenceManager.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlReferenceManager.cs index 2723a25132..5369597a4f 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlReferenceManager.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Core/XmlReferenceManager.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlAccessor.cs index 98b37c3ecf..6d42c5a51d 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlBehaviorSemantics.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlBehaviorSemantics.cs index 1d2978a858..a504edb6e8 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlBehaviorSemantics.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlBehaviorSemantics.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlCollectionAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlCollectionAccessor.cs index e84d38fa55..e1c85a0f29 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlCollectionAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlCollectionAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlPropertyAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlPropertyAccessor.cs index 7c7c9d9d9e..30fba63571 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlPropertyAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/IXmlPropertyAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XPathBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XPathBehaviorAccessor.cs index 4c2cbb1fdc..3b32300649 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XPathBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XPathBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessor.cs index 7ca41de472..5c886882d8 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessorFactory.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessorFactory.cs index 91de7f8046..fe83ad5a3b 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessorFactory.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAccessorFactory.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlArrayBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlArrayBehaviorAccessor.cs index b8ee03b760..9026bf22c5 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlArrayBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlArrayBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAttributeBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAttributeBehaviorAccessor.cs index 195c1efa52..da5464735c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAttributeBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlAttributeBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlDefaultBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlDefaultBehaviorAccessor.cs index 083baa3733..8b5f7c7aa0 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlDefaultBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlDefaultBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlElementBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlElementBehaviorAccessor.cs index bd59333202..e1045354f6 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlElementBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlElementBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlIgnoreBehaviorAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlIgnoreBehaviorAccessor.cs index 0dd23108f6..f5d85ad83c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlIgnoreBehaviorAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlIgnoreBehaviorAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlNodeAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlNodeAccessor.cs index 2e907a5125..ddc6392d57 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlNodeAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlNodeAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlSelfAccessor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlSelfAccessor.cs index 88fbb325ee..81da14cee9 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlSelfAccessor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Accessors/XmlSelfAccessor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionAdapter.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionAdapter.cs index f381b99e47..e4b5857251 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionAdapter.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionAdapter.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionItem.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionItem.cs index 5c37d3a127..81fef7756b 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionItem.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlCollectionItem.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { internal struct XmlCollectionItem diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlNodeList.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlNodeList.cs index 00b2e1acb0..4b8ca36533 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlNodeList.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Collections/XmlNodeList.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { internal class XmlNodeList : ListProjection, IXmlNodeSource diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/CursorFlags.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/CursorFlags.cs index f0230d3b49..1183b399a5 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/CursorFlags.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/CursorFlags.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlContext.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlContext.cs index 21e4504c07..6aad211b03 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlContext.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlContext.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlCursor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlCursor.cs index 00d8b3c356..b6450d554e 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlCursor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlCursor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlIterator.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlIterator.cs index 56ab78aafc..cd6078136e 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlIterator.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlIterator.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNamespaceSource.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNamespaceSource.cs index 3ef50f9517..31e8e0d076 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNamespaceSource.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNamespaceSource.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public interface IXmlNamespaceSource diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNode.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNode.cs index 23d313223c..68d1c7cc94 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNode.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNode.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNodeSource.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNodeSource.cs index 21032b74db..f451925660 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNodeSource.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/IXmlNodeSource.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public interface IXmlNodeSource diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContext.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContext.cs index 127fdaf39e..cd2f94b208 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContext.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContext.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContextBase.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContextBase.cs index 858901b0de..24a03c5c33 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContextBase.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlContextBase.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlExtensions.cs index ba0b5d3a28..4cc81ac270 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlName.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlName.cs index 7cf68d97c0..825c94a5a7 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlName.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlName.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNameComparer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNameComparer.cs index 307b593633..ca2a02b46f 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNameComparer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNameComparer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNodeBase.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNodeBase.cs index b1644024d2..45c16c86d9 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNodeBase.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlNodeBase.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlPositionComparer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlPositionComparer.cs index 741dfe9530..a82a29db36 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlPositionComparer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlPositionComparer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public class XmlPositionComparer diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlSelfCursor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlSelfCursor.cs index 822712a886..1c09e89113 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlSelfCursor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/Base/XmlSelfCursor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlCursor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlCursor.cs index f6cfb3cf3c..da76b364ae 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlCursor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlCursor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlExtensions.cs index 9f41d62fcc..c1a371e051 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlNode.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlNode.cs index c73df07110..d964c6a93a 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlNode.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlNode.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlSubtreeIterator.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlSubtreeIterator.cs index 407d2852d7..0ea4cae253 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlSubtreeIterator.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/SystemXml/SysXmlSubtreeIterator.cs @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified -#if !SILVERLIGHT +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; @@ -97,4 +96,3 @@ private enum State } } #endif -#endif diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPath.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPath.cs index d49654cc84..deebdacb79 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPath.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPath.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathNode.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathNode.cs index 8c8a8a54d3..46cb49734d 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathNode.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathNode.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathStep.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathStep.cs index d7b39b744f..a49f3b72a0 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathStep.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/CompiledXPathStep.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathBufferedNodeIterator.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathBufferedNodeIterator.cs index 1c844021c5..2aa08e7246 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathBufferedNodeIterator.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathBufferedNodeIterator.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathCompiler.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathCompiler.cs index 8e151dd011..d4f473db3c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathCompiler.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathCompiler.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathContext.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathContext.cs index fad2c26603..25300cfed8 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathContext.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathContext.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System.Xml.XPath; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathExtensions.cs index b02d524a8b..baad641679 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathMutableCursor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathMutableCursor.cs index 8636eeabea..904a938112 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathMutableCursor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathMutableCursor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathNode.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathNode.cs index 4f78fa9407..6ef0e2fc3d 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathNode.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathNode.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathReadOnlyCursor.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathReadOnlyCursor.cs index cd4b9418d4..fa81eb2b25 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathReadOnlyCursor.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Cursors/XPath/XPathReadOnlyCursor.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Wsdl.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Wsdl.cs index 127011027f..171e39c662 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Wsdl.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Wsdl.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { // Namespace for Guid type diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/XRef.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/XRef.cs index a77dc3f380..565c41a7f2 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/XRef.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/XRef.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xmlns.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xmlns.cs index 530213e3bc..6faf76f3d6 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xmlns.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xmlns.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public static class Xmlns diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsd.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsd.cs index 73782e9bef..fe1aeb318d 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsd.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsd.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public static class Xsd diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsi.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsi.cs index 48e2a37d85..981d4d5b3d 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsi.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Namespaces/Xsi.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlArraySerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlArraySerializer.cs index 996176a5a6..fc04a99da6 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlArraySerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlArraySerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCollectionSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCollectionSerializer.cs index aa72eddd51..e93cc1dfc3 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCollectionSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCollectionSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlComponentSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlComponentSerializer.cs index 1cc9d8f714..1b35f51d7f 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlComponentSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlComponentSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCustomSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCustomSerializer.cs index 1808498224..0971f13e13 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCustomSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlCustomSerializer.cs @@ -1,4 +1,4 @@ - // Copyright 2004-2011 Castle Project - http://www.castleproject.org/ +// Copyright 2004-2011 Castle Project - http://www.castleproject.org/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDefaultSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDefaultSerializer.cs index 4de481cd4c..a1efc78dfd 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDefaultSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDefaultSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDynamicSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDynamicSerializer.cs index 360c05b0de..3c54806518 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDynamicSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlDynamicSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public class XmlDynamicSerializer : XmlTypeSerializer diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlEnumerationSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlEnumerationSerializer.cs index 7978e2fce2..4e8ff8f049 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlEnumerationSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlEnumerationSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlListSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlListSerializer.cs index 0f2580ed18..f470a6d507 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlListSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlListSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlSimpleSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlSimpleSerializer.cs index b4a354775b..5c623591b2 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlSimpleSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlSimpleSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlStringSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlStringSerializer.cs index 5547b5a8f7..9be531c635 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlStringSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlStringSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public class XmlStringSerializer : XmlTypeSerializer diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeKind.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeKind.cs index 3dcb74d233..0dada94e01 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeKind.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeKind.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public enum XmlTypeKind diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializer.cs index 72a711d451..48e34006cb 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializerCache.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializerCache.cs index 9c385d3e7c..91e528dd19 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializerCache.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlTypeSerializerCache.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlXmlNodeSerializer.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlXmlNodeSerializer.cs index 0e9e11eba1..bfd4bb91e5 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlXmlNodeSerializer.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Serializers/XmlXmlNodeSerializer.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIdentity.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIdentity.cs index 19690ddca7..52a9ba866a 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIdentity.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIdentity.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public interface IXmlIdentity diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedType.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedType.cs index ec69298a4c..90931343c4 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedType.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedType.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedTypeMap.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedTypeMap.cs index 92a9f7df8b..facb724c24 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedTypeMap.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlIncludedTypeMap.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownType.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownType.cs index 9b5fcec6e6..24dc0c5de1 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownType.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownType.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownTypeMap.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownTypeMap.cs index 218a45f68c..0ff9edfd50 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownTypeMap.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/IXmlKnownTypeMap.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedType.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedType.cs index 665eb33a44..012ca2c30b 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedType.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedType.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedTypeSet.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedTypeSet.cs index ac59b24519..9db1bfd97a 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedTypeSet.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlIncludedTypeSet.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownType.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownType.cs index 2a38e52ac4..63240b1c3e 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownType.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownType.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownTypeSet.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownTypeSet.cs index b43151e5bd..ea3be1db27 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownTypeSet.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Types/XmlKnownTypeSet.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/DictionaryAdapterExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/DictionaryAdapterExtensions.cs index 5f433e5b6d..b1de739a59 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/DictionaryAdapterExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/DictionaryAdapterExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Error.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Error.cs index 4f3d6bbdc4..a216e4de7c 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Error.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Error.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IConfigurable.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IConfigurable.cs index 97ddeb53b8..58e3ededcf 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IConfigurable.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IConfigurable.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { public interface IConfigurable diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IRealizable.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IRealizable.cs index 8eb350025b..bb1881878a 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IRealizable.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/IRealizable.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { // OBSOLETE: This has been replaced with IVirtual. diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/SingletonDispenser.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/SingletonDispenser.cs index e5293cd40d..a1c24263ba 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/SingletonDispenser.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/SingletonDispenser.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/StringExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/StringExtensions.cs index 634ec72a17..712d39e612 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/StringExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/StringExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Try.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Try.cs index 1c1cf837a8..16a8966899 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Try.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/Try.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System.Diagnostics; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/TypeExtensions.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/TypeExtensions.cs index 057f5016ae..d3c1a112fd 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/TypeExtensions.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/TypeExtensions.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeReader.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeReader.cs index 0b11aa6cd9..953975e04f 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeReader.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeReader.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeWriter.cs b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeWriter.cs index 1c36e7ab84..59e73a5290 100644 --- a/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeWriter.cs +++ b/src/Castle.Core/Components.DictionaryAdapter/Xml/Internal/Utilities/XmlSubtreeWriter.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !SILVERLIGHT // Until support for other platforms is verified +#if FEATURE_DICTIONARYADAPTER_XML namespace Castle.Components.DictionaryAdapter.Xml { using System; diff --git a/src/Castle.Core/Core/Internal/InternalsVisible.cs b/src/Castle.Core/Core/Internal/InternalsVisible.cs index 7824809122..6e03adbf38 100644 --- a/src/Castle.Core/Core/Internal/InternalsVisible.cs +++ b/src/Castle.Core/Core/Internal/InternalsVisible.cs @@ -21,13 +21,21 @@ public class InternalsVisible /// [assembly: InternalsVisibleTo(CoreInternalsVisible.ToCastleCore)] /// public const string ToCastleCore = +#if FEATURE_STRONGNAME "Castle.Core, PublicKey=002400000480000094000000060200000024000052534131000400000100010077F5E87030DADCCCE6902C6ADAB7A987BD69CB5819991531F560785EACFC89B6FCDDF6BB2A00743A7194E454C0273447FC6EEC36474BA8E5A3823147D214298E4F9A631B1AFEE1A51FFEAE4672D498F14B000E3D321453CDD8AC064DE7E1CF4D222B7E81F54D4FD46725370D702A05B48738CC29D09228F1AA722AE1A9CA02FB"; +#else + "Castle.Core"; +#endif /// /// Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when proxying internal types. /// [assembly: InternalsVisibleTo(CoreInternalsVisible.ToDynamicProxyGenAssembly2)] /// public const string ToDynamicProxyGenAssembly2 = +#if FEATURE_STRONGNAME "DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"; +#else + "DynamicProxyGenAssembly2"; +#endif } } \ No newline at end of file diff --git a/src/Castle.Core/project.json b/src/Castle.Core/project.json index c39c8f68b7..8b50493aa7 100644 --- a/src/Castle.Core/project.json +++ b/src/Castle.Core/project.json @@ -8,14 +8,17 @@ "dependencies": { "System.AppContext": "4.0.0", "System.Collections.Specialized": "4.0.0", - "System.Console": "4.0.0-beta-23123", "System.ComponentModel.TypeConverter": "4.0.0", - "System.Diagnostics.TraceSource": "4.0.0-beta-23123", + "System.Console": "4.0.0-beta-23123", "System.Diagnostics.Tools": "4.0.0", + "System.Diagnostics.TraceSource": "4.0.0-beta-23123", + "System.Dynamic.Runtime": "4.0.10", "System.Globalization": "4.0.10", "System.Linq": "4.0.0", + "System.ObjectModel": "4.0.10", "System.Reflection": "4.0.10", "System.Reflection.Emit": "4.0.0", + "System.Reflection.Emit.Lightweight": "4.0.0", "System.Reflection.Extensions": "4.0.0", "System.Reflection.TypeExtensions": "4.0.0", "System.Runtime": "4.0.20", @@ -29,11 +32,8 @@ }, "compilationOptions": { "warningsAsErrors": true, - "define": [ "FEATURE_NETCORE_REFLECTION_API", "FEATURE_NETCORE_CONVERTER_API" ] + "define": [ "FEATURE_NETCORE_REFLECTION_API" ] }, - "exclude": [ - "Components.DictionaryAdapter/**/*" - ], "compileFiles": [ "Properties/InternalsVisibleToTests.cs" ]