diff --git a/.editorconfig b/.editorconfig
index 0e572fa692..a25f791987 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,7 +4,7 @@ root = true
indent_style = tab
[*.csproj]
-indent_style = space
+indent_style = tab
indent_size = 2
[*.cs]
diff --git a/Castle.Core.sln b/Castle.Core.sln
index 3e60acdbe5..6c4815b64e 100644
--- a/Castle.Core.sln
+++ b/Castle.Core.sln
@@ -5,6 +5,7 @@ VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Castle Build", "Castle Build", "{1B999D24-B7AB-4997-96E7-08FA05325694}"
ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
diff --git a/appveyor.yml b/appveyor.yml
index b648ffb6f2..bdb193aefc 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -16,7 +16,7 @@ for:
# -----------------
matrix:
only:
- - image: Previous Ubuntu
+ - image: Ubuntu
# build and run tests
build_script:
diff --git a/buildscripts/common.props b/buildscripts/common.props
index 5c654f7cc7..ab2100e275 100644
--- a/buildscripts/common.props
+++ b/buildscripts/common.props
@@ -47,8 +47,8 @@
DEBUG
TRACE;FEATURE_NETCORE_REFLECTION_API;FEATURE_TEST_SERILOGINTEGRATION
$(NetStandard13Constants);FEATURE_CUSTOMMODIFIERS
- TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_EVENTLOG;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY
- TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_EVENTLOG;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY
+ TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY
+ TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY
TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_EVENTLOG;FEATURE_GAC;FEATURE_GET_REFERENCED_ASSEMBLIES;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_REMOTING;FEATURE_SECURITY_PERMISSIONS;FEATURE_SERIALIZATION;FEATURE_SMTP;FEATURE_SYSTEM_CONFIGURATION;FEATURE_TARGETEXCEPTION;FEATURE_TEST_COM;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION
$(CommonDesktopClrConstants)
$(CommonDesktopClrConstants);FEATURE_TEST_PEVERIFY
@@ -118,11 +118,11 @@
$(NetStandard15Constants)
-
+
$(DiagnosticsConstants);$(NetStandard20Constants)
-
+
$(NetStandard20Constants)
diff --git a/ref/Castle.Core-netstandard2.0.cs b/ref/Castle.Core-netstandard2.0.cs
index e22ff5ca76..b2b1ec6f5b 100644
--- a/ref/Castle.Core-netstandard2.0.cs
+++ b/ref/Castle.Core-netstandard2.0.cs
@@ -716,6 +716,28 @@ public class RemoveIfEmptyAttribute : Castle.Components.DictionaryAdapter.Remove
{
public RemoveIfEmptyAttribute() { }
}
+ public class SetProjection : Castle.Components.DictionaryAdapter.ListProjection, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ISet, System.Collections.IEnumerable
+ {
+ public SetProjection(Castle.Components.DictionaryAdapter.ICollectionAdapter adapter) { }
+ public override bool Add(T item) { }
+ public override void Clear() { }
+ public override bool Contains(T item) { }
+ public override void EndNew(int index) { }
+ public void ExceptWith(System.Collections.Generic.IEnumerable other) { }
+ public void IntersectWith(System.Collections.Generic.IEnumerable other) { }
+ public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) { }
+ protected override bool OnInserting(T value) { }
+ protected override bool OnReplacing(T oldValue, T newValue) { }
+ public bool Overlaps(System.Collections.Generic.IEnumerable other) { }
+ public override bool Remove(T item) { }
+ public override void RemoveAt(int index) { }
+ public bool SetEquals(System.Collections.Generic.IEnumerable other) { }
+ public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) { }
+ public void UnionWith(System.Collections.Generic.IEnumerable other) { }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Property | System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
public class StringFormatAttribute : Castle.Components.DictionaryAdapter.DictionaryBehaviorAttribute, Castle.Components.DictionaryAdapter.IDictionaryBehavior, Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter
{
@@ -1633,6 +1655,12 @@ public class XmlSelfCursor : Castle.Components.DictionaryAdapter.IVirtual, Castl
public System.Xml.XmlWriter WriteAttributes() { }
public System.Xml.XmlWriter WriteChildren() { }
}
+ public class XmlSetSerializer : Castle.Components.DictionaryAdapter.Xml.XmlCollectionSerializer
+ {
+ public static readonly Castle.Components.DictionaryAdapter.Xml.XmlSetSerializer Instance;
+ protected XmlSetSerializer() { }
+ public override System.Type ListTypeConstructor { get; }
+ }
public class static XmlSimpleSerializer
{
public static readonly Castle.Components.DictionaryAdapter.Xml.XmlTypeSerializer ForBoolean;
@@ -1678,7 +1706,6 @@ public class XmlSubtreeReader : System.Xml.XmlReader
public override string BaseURI { get; }
public override int Depth { get; }
public override bool EOF { get; }
- public override bool HasValue { get; }
public bool IsAtRootElement { get; }
public bool IsDisposed { get; }
public override bool IsEmptyElement { get; }
@@ -2000,23 +2027,6 @@ public class ConsoleLogger : Castle.Core.Logging.LevelFilteredLogger
public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
- public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
- {
- public DiagnosticsLogger(string logName) { }
- public DiagnosticsLogger(string logName, string source) { }
- public DiagnosticsLogger(string logName, string machineName, string source) { }
- public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- protected override void Finalize() { }
- protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
- }
- public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
- {
- public DiagnosticsLoggerFactory() { }
- public override Castle.Core.Logging.ILogger Create(string name) { }
- public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
- }
public interface IContextProperties
{
object this[string key] { get; set; }
diff --git a/ref/Castle.Core-netstandard2.1.cs b/ref/Castle.Core-netstandard2.1.cs
index e949c52fca..74efe690f4 100644
--- a/ref/Castle.Core-netstandard2.1.cs
+++ b/ref/Castle.Core-netstandard2.1.cs
@@ -716,6 +716,28 @@ public class RemoveIfEmptyAttribute : Castle.Components.DictionaryAdapter.Remove
{
public RemoveIfEmptyAttribute() { }
}
+ public class SetProjection : Castle.Components.DictionaryAdapter.ListProjection, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ISet, System.Collections.IEnumerable
+ {
+ public SetProjection(Castle.Components.DictionaryAdapter.ICollectionAdapter adapter) { }
+ public override bool Add(T item) { }
+ public override void Clear() { }
+ public override bool Contains(T item) { }
+ public override void EndNew(int index) { }
+ public void ExceptWith(System.Collections.Generic.IEnumerable other) { }
+ public void IntersectWith(System.Collections.Generic.IEnumerable other) { }
+ public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) { }
+ public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) { }
+ protected override bool OnInserting(T value) { }
+ protected override bool OnReplacing(T oldValue, T newValue) { }
+ public bool Overlaps(System.Collections.Generic.IEnumerable other) { }
+ public override bool Remove(T item) { }
+ public override void RemoveAt(int index) { }
+ public bool SetEquals(System.Collections.Generic.IEnumerable other) { }
+ public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) { }
+ public void UnionWith(System.Collections.Generic.IEnumerable other) { }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Property | System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
public class StringFormatAttribute : Castle.Components.DictionaryAdapter.DictionaryBehaviorAttribute, Castle.Components.DictionaryAdapter.IDictionaryBehavior, Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter
{
@@ -1633,6 +1655,12 @@ public class XmlSelfCursor : Castle.Components.DictionaryAdapter.IVirtual, Castl
public System.Xml.XmlWriter WriteAttributes() { }
public System.Xml.XmlWriter WriteChildren() { }
}
+ public class XmlSetSerializer : Castle.Components.DictionaryAdapter.Xml.XmlCollectionSerializer
+ {
+ public static readonly Castle.Components.DictionaryAdapter.Xml.XmlSetSerializer Instance;
+ protected XmlSetSerializer() { }
+ public override System.Type ListTypeConstructor { get; }
+ }
public class static XmlSimpleSerializer
{
public static readonly Castle.Components.DictionaryAdapter.Xml.XmlTypeSerializer ForBoolean;
@@ -1678,7 +1706,6 @@ public class XmlSubtreeReader : System.Xml.XmlReader
public override string BaseURI { get; }
public override int Depth { get; }
public override bool EOF { get; }
- public override bool HasValue { get; }
public bool IsAtRootElement { get; }
public bool IsDisposed { get; }
public override bool IsEmptyElement { get; }
@@ -2000,23 +2027,6 @@ public class ConsoleLogger : Castle.Core.Logging.LevelFilteredLogger
public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
- public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
- {
- public DiagnosticsLogger(string logName) { }
- public DiagnosticsLogger(string logName, string source) { }
- public DiagnosticsLogger(string logName, string machineName, string source) { }
- public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- protected override void Finalize() { }
- protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
- }
- public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
- {
- public DiagnosticsLoggerFactory() { }
- public override Castle.Core.Logging.ILogger Create(string name) { }
- public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
- }
public interface IContextProperties
{
object this[string key] { get; set; }
diff --git a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
index 4f600fbfb7..beabbac526 100644
--- a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
+++ b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
@@ -3,7 +3,7 @@
- net461;netcoreapp2.0;netcoreapp3.1
+ net461;netcoreapp2.1;netcoreapp3.1
diff --git a/src/Castle.Core.Tests/Castle.Core.Tests.csproj b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
index d380f16a36..34679082d8 100644
--- a/src/Castle.Core.Tests/Castle.Core.Tests.csproj
+++ b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
@@ -3,7 +3,7 @@
- net461;netcoreapp2.0;netcoreapp3.1
+ net461;netcoreapp2.1;netcoreapp3.1
@@ -20,13 +20,7 @@
Program
-
-
-
-
-
-
-
+
@@ -44,7 +38,7 @@
-
+
@@ -54,38 +48,38 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/Xml/XmlAdapterAcceptanceTestCase.cs b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/Xml/XmlAdapterAcceptanceTestCase.cs
index 0cee70eeb3..83669616d9 100644
--- a/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/Xml/XmlAdapterAcceptanceTestCase.cs
+++ b/src/Castle.Core.Tests/Components.DictionaryAdapter.Tests/Xml/XmlAdapterAcceptanceTestCase.cs
@@ -1,11 +1,11 @@
// Copyright 2004-2010 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.
diff --git a/src/Castle.Core.Tests/Services.Logging.Tests/log4netIntegration/Log4netFactoryTestCase.cs b/src/Castle.Core.Tests/Services.Logging.Tests/log4netIntegration/Log4netFactoryTestCase.cs
index 91e2e781a0..d17c6a5ed2 100644
--- a/src/Castle.Core.Tests/Services.Logging.Tests/log4netIntegration/Log4netFactoryTestCase.cs
+++ b/src/Castle.Core.Tests/Services.Logging.Tests/log4netIntegration/Log4netFactoryTestCase.cs
@@ -16,6 +16,7 @@ namespace Castle.Services.Logging.Log4netIntegration.Tests
{
using System.IO;
using System.Linq;
+ using System.Reflection;
using System.Text;
using NUnit.Framework;
@@ -41,7 +42,7 @@ public void Init()
private string GetLogContent()
{
- var repository = (Hierarchy)LogManager.GetRepository();
+ var repository = (Hierarchy)LogManager.GetRepository(Assembly.GetCallingAssembly());
var memoryAppender = (from appender in repository.GetAppenders().OfType() select appender).Single();
return memoryAppender.GetEvents()[0].RenderedMessage;
diff --git a/src/Castle.Core/Castle.Core.csproj b/src/Castle.Core/Castle.Core.csproj
index ab92be6a2f..7822b519f1 100644
--- a/src/Castle.Core/Castle.Core.csproj
+++ b/src/Castle.Core/Castle.Core.csproj
@@ -3,7 +3,7 @@
- net40;net45;netstandard1.3;netstandard1.5;netstandard2.0;netstandard2.1
+ net40;net45;netstandard1.3;netstandard1.5;netstandard2.0;netstandard2.1
@@ -33,25 +33,23 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
+
-
diff --git a/src/Castle.Core/Core/Smtp/DefaultSmtpSender.cs b/src/Castle.Core/Core/Smtp/DefaultSmtpSender.cs
index d463ac006d..2f30794706 100644
--- a/src/Castle.Core/Core/Smtp/DefaultSmtpSender.cs
+++ b/src/Castle.Core/Core/Smtp/DefaultSmtpSender.cs
@@ -1,11 +1,11 @@
// Copyright 2004-2017 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.
diff --git a/src/Castle.Core/DynamicProxy/ProxyGenerationOptions.cs b/src/Castle.Core/DynamicProxy/ProxyGenerationOptions.cs
index 3885d48898..d9fc68146e 100644
--- a/src/Castle.Core/DynamicProxy/ProxyGenerationOptions.cs
+++ b/src/Castle.Core/DynamicProxy/ProxyGenerationOptions.cs
@@ -1,11 +1,11 @@
// 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.
// 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.