diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000000..d4159e07cc --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,7 @@ + + + + true + + + diff --git a/Jint.Tests/Runtime/InteropTests.cs b/Jint.Tests/Runtime/InteropTests.cs index 3fb9c50ab9..a62b514872 100644 --- a/Jint.Tests/Runtime/InteropTests.cs +++ b/Jint.Tests/Runtime/InteropTests.cs @@ -3334,7 +3334,7 @@ public void CanDestructureInteropTargetMethod() Assert.Equal(3, result); } - private class MetadataWrapper : IDictionary + private class MetadataWrapper : IDictionary { public IEnumerator> GetEnumerator() => throw new NotImplementedException(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -3370,7 +3370,7 @@ private class ShadowedGetter : IReadOnlyDictionary { private Dictionary _dictionary = new(); - public void SetInitial(object? value, string? key) + public void SetInitial(object value, string key) { _dictionary[key] = value; } diff --git a/Jint.sln b/Jint.sln index 7cc5e19cee..fad3255cfe 100644 --- a/Jint.sln +++ b/Jint.sln @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md .editorconfig = .editorconfig Directory.Packages.props = Directory.Packages.props + Directory.Build.props = Directory.Build.props EndProjectSection EndProject Global diff --git a/Jint/Collections/DictionarySlim.cs b/Jint/Collections/DictionarySlim.cs index 6f77fafbb3..03729cd2d3 100644 --- a/Jint/Collections/DictionarySlim.cs +++ b/Jint/Collections/DictionarySlim.cs @@ -12,7 +12,7 @@ namespace Jint.Collections { /// - /// DictionarySlim is similar to Dictionary but optimized in three ways: + /// DictionarySlim<string, TValue> is similar to Dictionary<TKey, TValue> but optimized in three ways: /// 1) It allows access to the value by ref replacing the common TryGetValue and Add pattern. /// 2) It does not store the hash code (assumes it is cheap to equate values). /// 3) It does not accept an equality comparer (assumes Object.GetHashCode() and Object.Equals() or overridden implementation are cheap and sufficient). diff --git a/Jint/Collections/StringDictionarySlim.cs b/Jint/Collections/StringDictionarySlim.cs index d9621f5eb4..2ff194f1ee 100644 --- a/Jint/Collections/StringDictionarySlim.cs +++ b/Jint/Collections/StringDictionarySlim.cs @@ -15,7 +15,7 @@ namespace Jint.Collections { /// - /// DictionarySlim is similar to Dictionary but optimized in three ways: + /// DictionarySlim<string, TValue> is similar to Dictionary<TKey, TValue> but optimized in three ways: /// 1) It allows access to the value by ref replacing the common TryGetValue and Add pattern. /// 2) It does not store the hash code (assumes it is cheap to equate values). /// 3) It does not accept an equality comparer (assumes Object.GetHashCode() and Object.Equals() or overridden implementation are cheap and sufficient). diff --git a/Jint/Jint.csproj b/Jint/Jint.csproj index de8422640d..bcc00fb46c 100644 --- a/Jint/Jint.csproj +++ b/Jint/Jint.csproj @@ -2,14 +2,23 @@ en-US net462;netstandard2.0;netstandard2.1;net6.0 + Jint.snk true - latest true + + latest enable enable true + latest-Recommended + + true + README.md + + $(NoWarn);1591 + diff --git a/Jint/Options.Extensions.cs b/Jint/Options.Extensions.cs index 6c682fb1a2..c103dac322 100644 --- a/Jint/Options.Extensions.cs +++ b/Jint/Options.Extensions.cs @@ -75,6 +75,7 @@ public static Options AddObjectConverter(this Options options, IObjectConverter /// /// Sets maximum allowed depth of recursion. /// + /// Options to modify /// /// The allowed depth. /// a) In case max depth is zero no recursion is allowed. @@ -140,6 +141,7 @@ public static Options SetTypeConverter(this Options options, Func + /// Options to modify /// /// The delegate to invoke for each CLR member. If the delegate /// returns null, the standard evaluation is performed. @@ -246,6 +248,7 @@ public static Options SetTypeResolver(this Options options, TypeResolver resolve /// Registers some custom logic to apply on an instance when the options /// are loaded. /// + /// Options to modify /// The action to register. public static Options Configure(this Options options, Action configuration) { diff --git a/Jint/Options.cs b/Jint/Options.cs index ffc622c00c..7c5a119e9d 100644 --- a/Jint/Options.cs +++ b/Jint/Options.cs @@ -400,7 +400,7 @@ public class ConstraintOptions /// /// Chrome and V8 based engines (ClearScript) that can handle 13955. /// When set to a different value except -1, it can reduce slight performance/stack trace readability drawback. (after hitting the engine's own limit), - /// When max stack size to be exceeded, Engine throws an exception . + /// When max stack size to be exceeded, Engine throws an exception . /// public int MaxExecutionStackCount { get; set; } = StackGuard.Disabled; diff --git a/Jint/Runtime/Debugger/DebuggerStatementHandling.cs b/Jint/Runtime/Debugger/DebuggerStatementHandling.cs index ff756eb121..33452f7c2e 100644 --- a/Jint/Runtime/Debugger/DebuggerStatementHandling.cs +++ b/Jint/Runtime/Debugger/DebuggerStatementHandling.cs @@ -16,7 +16,7 @@ public enum DebuggerStatementHandling Clr, /// - /// debugger statements will trigger a break in Jint's DebugHandler. See . + /// debugger statements will trigger a break in Jint's DebugHandler. See . /// Script }